{ "status": "ok", "total_cents": 99, "total": "$0.99", "breakdown": [ { "id": "first_class_letter_1_page", "label": "First-Class letter, 1 page", "amount_cents": 99 } ], "note": "All-in price. Postage, printing and the envelope are included; the breakdown lists what makes up the total."}
Free — creates nothing and never touches payment. The price is all-in (postage, printing and the envelope included); breakdown lists the piece and any options that make up the total. Quoting first is the recommended shape for agents: it is the safe call, and it tells the user what a send will cost.
Supply to plus text (or pdf_url) and the response also carries a single-use confirmation_token bound to that exact letter and price. POST /v1/orders requires one on the agent path, so this is where a send begins.
{ "status": "ok", "total_cents": 99, "total": "$0.99", "breakdown": [ { "id": "first_class_letter_1_page", "label": "First-Class letter, 1 page", "amount_cents": 99 } ], "note": "All-in price. Postage, printing and the envelope are included; the breakdown lists what makes up the total."}
Optional developer API key: Authorization: Bearer pp_live_… (or pp_test_… for a sandbox-only key). Omitting it is a supported way to call every route. A key that is sent and does not verify is refused with 401 rather than treated as anonymous, so a typo fails loudly instead of quietly losing the restriction you meant to apply. Enabled per deployment via SCOPED_API_KEYS.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"paperplane","description":"Letters, Certified Mail and postcards from REST, MCP or the CLI. No API key, no account. Quote, confirm, send.","colors":{"primary":"#1D3FD9","light":"#7A93FF","dark":"#1D3FD9"},"logo":{"light":"https://mintcdn.com/paperplane-524ba6ed/CI1myMp-UEMu_In3/logo/light.svg?fit=max\u0026auto=format\u0026n=CI1myMp-UEMu_In3\u0026q=85\u0026s=f55c736411df18b714c822940c2d1bda","dark":"https://mintcdn.com/paperplane-524ba6ed/CI1myMp-UEMu_In3/logo/dark.svg?fit=max\u0026auto=format\u0026n=CI1myMp-UEMu_In3\u0026q=85\u0026s=22af375831e59b4cdf1c027b5d2c66f3","href":"https://sendpaperplane.com"},"favicon":"https://mintcdn.com/paperplane-524ba6ed/5CDM74Ig-FbdKIpE/favicon.svg?fit=max\u0026auto=format\u0026n=5CDM74Ig-FbdKIpE\u0026q=85\u0026s=ce5eb5f7030b907ba20b5f0f214cfeac","api":{"params":{"expanded":"all"},"playground":{"display":"interactive"},"examples":{"defaults":"required","languages":["curl","python","javascript","typescript","go","ruby","php","java"],"prefill":true}},"appearance":{"default":"dark","strict":false},"background":{"color":{"light":"#FFFFFF","dark":"#0B0E14"}},"navbar":{"links":[{"href":"https://sendpaperplane.com/send","label":"Send a letter"}],"primary":{"type":"button","label":"Back to paperplane","href":"https://sendpaperplane.com"}},"footer":{"links":[{"header":"Product","items":[{"label":"Send a letter","href":"https://sendpaperplane.com/send"},{"label":"Letter credits","href":"https://sendpaperplane.com/credits"},{"label":"Letter templates","href":"https://sendpaperplane.com/templates"},{"label":"Certified Mail","href":"https://sendpaperplane.com/guides/send-certified-mail-online"}]},{"header":"Developers","items":[{"label":"Docs","href":"/"},{"label":"API reference","href":"/api-reference/mail/price-a-letter-before-sending-it"},{"label":"Changelog","href":"/changelog"},{"label":"Status","href":"https://sendpaperplane.com/status"}]},{"header":"Integrations","items":[{"label":"ChatGPT","href":"https://sendpaperplane.com/integrations/chatgpt"},{"label":"Claude \u0026 MCP","href":"https://sendpaperplane.com/integrations/claude-mcp"},{"label":"Zapier","href":"https://sendpaperplane.com/integrations/zapier"},{"label":"Make","href":"https://sendpaperplane.com/integrations/make"},{"label":"n8n","href":"https://sendpaperplane.com/integrations/n8n"}]},{"header":"Company","items":[{"label":"Help center","href":"https://sendpaperplane.com/help"},{"label":"Contact us","href":"https://sendpaperplane.com/contact"},{"label":"Terms of service","href":"https://sendpaperplane.com/terms"},{"label":"Privacy policy","href":"https://sendpaperplane.com/privacy"}]}]},"seo":{"organization":{"name":"paperplane","url":"https://sendpaperplane.com","logo":"https://sendpaperplane.com/logo/dark.svg"}},"fonts":{"family":"Manrope","weight":400},"icons":{"library":"lucide"},"styling":{"eyebrows":"breadcrumbs","latex":true},"errors":{"404":{"redirect":true,"title":"Page not found"}},"contextual":{"options":["copy","view","claude","chatgpt","grok","aistudio","perplexity","windsurf","cursor","vscode","mcp","add-mcp","download-spec"],"display":"header"},"metadata":{"timestamp":true},"navigation":{"global":{"anchors":[{"anchor":"You're an agent? Start here","icon":"bot","href":"/agents"},{"anchor":"Changelog","icon":"list","href":"/changelog"},{"anchor":"Status","icon":"activity","href":"https://sendpaperplane.com/status"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"paperplane-524ba6ed","hasAudioNarration":false,"actualSubdomain":"paperplane-524ba6ed","customDomains":["paperplane-justin-winter-s-projects.vercel.app"],"gitSource":{"type":"github","owner":"justinwinter","repo":"paperplane","deployBranch":"main","contentDirectory":"docs-site","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true,"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6ac06760f8efb5c3b739dff6","clientVersion":"0.0.4102","searchFilterCounts":[{"language":"default","tag":"Overview","count":30},{"language":"default","tag":"Guides","count":21},{"language":"default","tag":"API Reference","count":18},{"language":"default","tag":"Mail","count":8},{"language":"default","tag":"Get started","count":7},{"language":"default","tag":"Credits","count":3},{"language":"default","tag":"Tutorials","count":2},{"language":"default","tag":"Addresses","count":2},{"language":"default","tag":"Meta","count":2},{"language":"default","tag":"Reviews","count":2}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"/docs","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[],"page":{"pagePath":"api-reference/mail/price-a-letter-before-sending-it","slug":"/api-reference/mail/price-a-letter-before-sending-it","pageMetadata":{"title":"Price a letter before sending it","description":"Free — creates nothing and never touches payment. The price is all-in (postage, printing and the envelope included); `breakdown` lists the piece and any options that make up the total. Quoting first is the recommended shape for agents: it is the safe call, and it tells the user what a send will cost.\n\nSupply `to` plus `text` (or `pdf_url`) and the response also carries a single-use `confirmation_token` bound to that exact letter and price. `POST /v1/orders` requires one on the agent path, so this is where a send begins.","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/quotes","href":"/api-reference/mail/price-a-letter-before-sending-it","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsxs(_components.p, {\n children: [\"Free — creates nothing and never touches payment. The price is all-in (postage, printing and the envelope included); \", _jsx(_components.code, {\n children: \"breakdown\"\n }), \" lists the piece and any options that make up the total. Quoting first is the recommended shape for agents: it is the safe call, and it tells the user what a send will cost.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Supply \", _jsx(_components.code, {\n children: \"to\"\n }), \" plus \", _jsx(_components.code, {\n children: \"text\"\n }), \" (or \", _jsx(_components.code, {\n children: \"pdf_url\"\n }), \") and the response also carries a single-use \", _jsx(_components.code, {\n children: \"confirmation_token\"\n }), \" bound to that exact letter and price. \", _jsx(_components.code, {\n children: \"POST /v1/orders\"\n }), \" requires one on the agent path, so this is where a send begins.\"]\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Price a letter before sending it","description":"Free — creates nothing and never touches payment. The price is all-in (postage, printing and the envelope included); `breakdown` lists the piece and any options that make up the total. Quoting first is the recommended shape for agents: it is the safe call, and it tells the user what a send will cost.\n\nSupply `to` plus `text` (or `pdf_url`) and the response also carries a single-use `confirmation_token` bound to that exact letter and price. `POST /v1/orders` requires one on the agent path, so this is where a send begins.","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/quotes","href":"/api-reference/mail/price-a-letter-before-sending-it","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"operationId":"createQuote","summary":"Price a letter before sending it","description":"Free — creates nothing and never touches payment. The price is all-in (postage, printing and the envelope included); `breakdown` lists the piece and any options that make up the total. Quoting first is the recommended shape for agents: it is the safe call, and it tells the user what a send will cost.\n\nSupply `to` plus `text` (or `pdf_url`) and the response also carries a single-use `confirmation_token` bound to that exact letter and price. `POST /v1/orders` requires one on the agent path, so this is where a send begins.","tags":["Mail"],"security":["5d29dcc7-5a18-426a-a6d9-8ecaa27844a0","c74505ca-45b0-41b5-bf33-f1fa7a3b6a41"],"requestBody":"960d74f2-5e72-4fbe-be0e-2c8bfa476acf","responses":{"200":"cda7024d-1cc8-409a-abd8-9948cf228812","400":"2a1c8d60-7014-4988-ad28-72d25af2fdaa","401":"4228c076-9446-4751-b2b6-ac13dafa29ff","403":"502b90d5-23c6-4896-8fb3-98f56ab52cb2","503":"cda24b3e-f2cf-421c-9a8e-ea6361a2f07f"},"method":"post","type":"path","servers":["f186af28-fc7f-4e4d-ae07-81b0958d61e8"],"path":"/v1/quotes","baseUrlOptions":["https://sendpaperplane.com"],"title":"Price a letter before sending it","codeSamples":[],"requestExampleLanguages":["bash","python","javascript","typescript","go","ruby","php","java"],"requiredOnlyExamples":true,"requestExampleType":"generated","responseExampleType":"generated","prefillPlaygroundWithExample":true,"prefillPlaygroundExamples":[{"body.mail_class":"first_class","body.page_count":1,"body.color":false,"body.tracking":false}]},"dependencies":{"parameters":{},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mail_class":{"type":"string","enum":["first_class","certified","certified_err","priority"],"isRequired":true,"uniqueKey":"mail_class","typeLabel":"enum\u003cstring>"},"page_count":{"type":"integer","minimum":1,"maximum":12,"isRequired":true,"uniqueKey":"page_count","typeLabel":"integer"},"color":{"type":"boolean","uniqueKey":"color","typeLabel":"boolean"},"tracking":{"type":"boolean","uniqueKey":"tracking","typeLabel":"boolean"},"to":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80,"isRequired":true,"uniqueKey":"to.name","typeLabel":"string"},"line1":{"type":"string","minLength":1,"maxLength":120,"isRequired":true,"uniqueKey":"to.line1","typeLabel":"string"},"city":{"type":"string","minLength":1,"maxLength":80,"isRequired":true,"uniqueKey":"to.city","typeLabel":"string"},"state":{"type":"string","minLength":2,"maxLength":2,"isRequired":true,"uniqueKey":"to.state","typeLabel":"string"},"zip":{"type":"string","pattern":"^\\d{5}(-\\d{4})?$","isRequired":true,"uniqueKey":"to.zip","typeLabel":"string"},"line2":{"type":"string","maxLength":120,"uniqueKey":"to.line2","typeLabel":"string"},"country":{"type":"string","const":"US","uniqueKey":"to.country","typeLabel":"string"}},"required":["name","line1","city","state","zip"],"uniqueKey":"to","typeLabel":"object"},"text":{"type":"string","maxLength":50000,"uniqueKey":"text","typeLabel":"string"},"upload_key":{"type":"string","pattern":"^up_[0-9a-f]{32}\\.pdf$","uniqueKey":"upload_key","typeLabel":"string"},"pdf_url":{"type":"string","format":"uri","uniqueKey":"pdf_url","typeLabel":"string\u003curi>"}},"required":["mail_class","page_count"],"uniqueKey":"","typeLabel":"object"},"example":{"mail_class":"first_class","page_count":1,"color":false,"tracking":false},"examples":{"Example":{"title":"Example","value":{"mail_class":"first_class","page_count":1,"color":false,"tracking":false}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"cda7024d-1cc8-409a-abd8-9948cf228812":{"description":"Priced quote. `confirmation_token`, `expires_in_minutes`, and `next` appear only when `to` and content were supplied.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"ok","isRequired":true,"uniqueKey":"status","typeLabel":"string"},"total_cents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"isRequired":true,"uniqueKey":"total_cents","typeLabel":"integer"},"total":{"type":"string","isRequired":true,"uniqueKey":"total","typeLabel":"string"},"breakdown":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","isRequired":true,"uniqueKey":"breakdown.items.[INDEX].id","typeLabel":"string"},"label":{"type":"string","isRequired":true,"uniqueKey":"breakdown.items.[INDEX].label","typeLabel":"string"},"amount_cents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"isRequired":true,"uniqueKey":"breakdown.items.[INDEX].amount_cents","typeLabel":"integer"}},"required":["id","label","amount_cents"],"uniqueKey":"breakdown.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"breakdown","typeLabel":"object[]"},"note":{"type":"string","isRequired":true,"uniqueKey":"note","typeLabel":"string"},"confirmation_token":{"type":"string","uniqueKey":"confirmation_token","typeLabel":"string"},"expires_in_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"uniqueKey":"expires_in_minutes","typeLabel":"integer"},"next":{"type":"array","items":{"type":"string","uniqueKey":"next.items.[INDEX]","typeLabel":"string"},"uniqueKey":"next","typeLabel":"string[]"}},"required":["status","total_cents","total","breakdown","note"],"uniqueKey":"","typeLabel":"object"},"example":{"status":"ok","total_cents":99,"total":"$0.99","breakdown":[{"id":"first_class_letter_1_page","label":"First-Class letter, 1 page","amount_cents":99}],"note":"All-in price. Postage, printing and the envelope are included; the breakdown lists what makes up the total."},"examples":{"Example":{"title":"Example","value":{"status":"ok","total_cents":99,"total":"$0.99","breakdown":[{"id":"first_class_letter_1_page","label":"First-Class letter, 1 page","amount_cents":99}],"note":"All-in price. Postage, printing and the envelope are included; the breakdown lists what makes up the total."}}},"exampleType":"examples"}},"exampleType":"examples"},"2a1c8d60-7014-4988-ad28-72d25af2fdaa":{"description":"Invalid request, or the letter violates a pricing rule (page limit, tracking on a class that already includes it).","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["failed","action_required"],"isRequired":true,"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"code":{"type":"string","isRequired":true,"uniqueKey":"code","typeLabel":"string"},"reason":{"type":"string","isRequired":true,"uniqueKey":"reason","typeLabel":"string"},"next":{"type":"array","items":{"type":"string","uniqueKey":"next.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"next","typeLabel":"string[]"}},"required":["status","code","reason","next"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"status":"failed","code":"\u003cstring>","reason":"\u003cstring>","next":["\u003cstring>"]}}},"exampleType":"generated"}},"exampleType":"generated"},"4228c076-9446-4751-b2b6-ac13dafa29ff":{"description":"`invalid_key` — an Authorization header was sent and it did not verify. A presented credential is never silently downgraded to anonymous.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["failed","action_required"],"isRequired":true,"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"code":{"type":"string","isRequired":true,"uniqueKey":"code","typeLabel":"string"},"reason":{"type":"string","isRequired":true,"uniqueKey":"reason","typeLabel":"string"},"next":{"type":"array","items":{"type":"string","uniqueKey":"next.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"next","typeLabel":"string[]"}},"required":["status","code","reason","next"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"status":"failed","code":"\u003cstring>","reason":"\u003cstring>","next":["\u003cstring>"]}}},"exampleType":"generated"}},"exampleType":"generated"},"502b90d5-23c6-4896-8fb3-98f56ab52cb2":{"description":"`key_disabled`, or `insufficient_scope` when the key is valid but does not carry the scope this route needs.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["failed","action_required"],"isRequired":true,"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"code":{"type":"string","isRequired":true,"uniqueKey":"code","typeLabel":"string"},"reason":{"type":"string","isRequired":true,"uniqueKey":"reason","typeLabel":"string"},"next":{"type":"array","items":{"type":"string","uniqueKey":"next.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"next","typeLabel":"string[]"}},"required":["status","code","reason","next"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"status":"failed","code":"\u003cstring>","reason":"\u003cstring>","next":["\u003cstring>"]}}},"exampleType":"generated"}},"exampleType":"generated"},"cda24b3e-f2cf-421c-9a8e-ea6361a2f07f":{"description":"`key_store_unavailable` — the key could not be checked, so it is not honoured. Retry, or omit the header to call anonymously.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["failed","action_required"],"isRequired":true,"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"code":{"type":"string","isRequired":true,"uniqueKey":"code","typeLabel":"string"},"reason":{"type":"string","isRequired":true,"uniqueKey":"reason","typeLabel":"string"},"next":{"type":"array","items":{"type":"string","uniqueKey":"next.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"next","typeLabel":"string[]"}},"required":["status","code","reason","next"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"status":"failed","code":"\u003cstring>","reason":"\u003cstring>","next":["\u003cstring>"]}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"5d29dcc7-5a18-426a-a6d9-8ecaa27844a0":{},"c74505ca-45b0-41b5-bf33-f1fa7a3b6a41":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Optional developer API key: `Authorization: Bearer pp_live_…` (or `pp_test_…` for a sandbox-only key). Omitting it is a supported way to call every route. A key that is sent and does not verify is refused with 401 rather than treated as anonymous, so a typo fails loudly instead of quietly losing the restriction you meant to apply. Enabled per deployment via `SCOPED_API_KEYS`.","scopes":[]}}},"servers":{"f186af28-fc7f-4e4d-ae07-81b0958d61e8":{"url":"https://sendpaperplane.com","description":"Production"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","description":"Optional developer API key: `Authorization: Bearer pp_live_…` (or `pp_test_…` for a sandbox-only key). Omitting it is a supported way to call every route. A key that is sent and does not verify is refused with 401 rather than treated as anonymous, so a typo fails loudly instead of quietly losing the restriction you meant to apply. Enabled per deployment via `SCOPED_API_KEYS`.","scopes":[]},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Optional developer API key: `Authorization: Bearer pp_live_…` (or `pp_test_…` for a sandbox-only key). Omitting it is a supported way to call every route. A key that is sent and does not verify is refused with 401 rather than treated as anonymous, so a typo fails loudly instead of quietly losing the restriction you meant to apply. Enabled per deployment via `SCOPED_API_KEYS`.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"openapi.json"},"subdomain":"paperplane-524ba6ed","siteName":"paperplane","title":"Price a letter before sending it - paperplane","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-01T20:21:20.768Z","originalFileLocation":"api-reference/mail/price-a-letter-before-sending-it.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Free — creates nothing and never touches payment. The price is all-in (postage, printing and the envelope included); breakdown lists the piece and any options that make up the total. Quoting first is the recommended shape for agents: it is the safe call, and it tells the user what a send will cost. Supply to plus text (or pdf_url) and the response also carries a single-use confirmation_token bound to that exact letter and price. POST /v1/orders requires one on the agent path, so this is where a send begins.\">\u003cmeta data-mint-head name=\"application-name\" content=\"paperplane\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/paperplane-524ba6ed/4_JfwOH6MgSv74fH/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/paperplane-524ba6ed/4_JfwOH6MgSv74fH/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/paperplane-524ba6ed/4_JfwOH6MgSv74fH/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/paperplane-524ba6ed/4_JfwOH6MgSv74fH/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/paperplane-524ba6ed/4_JfwOH6MgSv74fH/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/paperplane-524ba6ed/4_JfwOH6MgSv74fH/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/paperplane-524ba6ed/4_JfwOH6MgSv74fH/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/paperplane-524ba6ed/4_JfwOH6MgSv74fH/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/paperplane-524ba6ed/4_JfwOH6MgSv74fH/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Price a letter before sending it - paperplane\">\u003cmeta data-mint-head property=\"og:description\" content=\"Free — creates nothing and never touches payment. The price is all-in (postage, printing and the envelope included); breakdown lists the piece and any options that make up the total. Quoting first is the recommended shape for agents: it is the safe call, and it tells the user what a send will cost. Supply to plus text (or pdf_url) and the response also carries a single-use confirmation_token bound to that exact letter and price. POST /v1/orders requires one on the agent path, so this is where a send begins.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"paperplane\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://paperplane-justin-winter-s-projects.vercel.app/docs/api-reference/mail/price-a-letter-before-sending-it\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://paperplane-524ba6ed.mintlify.site/docs/_mintlify/api/og/v2?division=Mail\u0026amp;title=Price+a+letter+before+sending+it\u0026amp;description=Free+%E2%80%94+creates+nothing+and+never+touches+payment.+The+price+is+all-in+%28postage%2C+printing+and+the+envelope+included%29%3B+%60breakdown%60+lists+the+piece+and+any+options\u0026amp;theme=2f654f31cdda48e5bfdf92ff\u0026amp;signature=e6a2ab9871a81c102023a5e10d3729a47bea18f162a3026ecebb2d11ec9d2d81\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Price a letter before sending it - paperplane\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Free — creates nothing and never touches payment. The price is all-in (postage, printing and the envelope included); breakdown lists the piece and any options that make up the total. Quoting first is the recommended shape for agents: it is the safe call, and it tells the user what a send will cost. Supply to plus text (or pdf_url) and the response also carries a single-use confirmation_token bound to that exact letter and price. POST /v1/orders requires one on the agent path, so this is where a send begins.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://paperplane-524ba6ed.mintlify.site/docs/_mintlify/api/og/v2?division=Mail\u0026amp;title=Price+a+letter+before+sending+it\u0026amp;description=Free+%E2%80%94+creates+nothing+and+never+touches+payment.+The+price+is+all-in+%28postage%2C+printing+and+the+envelope+included%29%3B+%60breakdown%60+lists+the+piece+and+any+options\u0026amp;theme=2f654f31cdda48e5bfdf92ff\u0026amp;signature=e6a2ab9871a81c102023a5e10d3729a47bea18f162a3026ecebb2d11ec9d2d81\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/paperplane-524ba6ed/4_JfwOH6MgSv74fH/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"paperplane\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#1D3FD9\">\u003clink data-mint-head rel=\"canonical\" href=\"https://paperplane-justin-winter-s-projects.vercel.app/docs/api-reference/mail/price-a-letter-before-sending-it\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/api-reference/mail/price-a-letter-before-sending-it.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://sendpaperplane.com/#organization\",\"name\":\"paperplane\",\"url\":\"https://sendpaperplane.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://sendpaperplane.com/logo/dark.svg\"}},{\"@type\":\"WebSite\",\"@id\":\"https://paperplane-justin-winter-s-projects.vercel.app/docs#website\",\"name\":\"paperplane\",\"url\":\"https://paperplane-justin-winter-s-projects.vercel.app/docs\",\"publisher\":{\"@id\":\"https://sendpaperplane.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://paperplane-justin-winter-s-projects.vercel.app/docs/api-reference/mail/price-a-letter-before-sending-it#webpage\",\"url\":\"https://paperplane-justin-winter-s-projects.vercel.app/docs/api-reference/mail/price-a-letter-before-sending-it\",\"name\":\"Price a letter before sending it\",\"description\":\"Free — creates nothing and never touches payment. The price is all-in (postage, printing and the envelope included); breakdown lists the piece and any options that make up the total. Quoting first is the recommended shape for agents: it is the safe call, and it tells the user what a send will cost. Supply to plus text (or pdf_url) and the response also carries a single-use confirmation_token bound to that exact letter and price. POST /v1/orders requires one on the agent path, so this is where a send begins.\",\"dateModified\":\"2026-10-01T20:21:20.768Z\",\"isPartOf\":{\"@id\":\"https://paperplane-justin-winter-s-projects.vercel.app/docs#website\"},\"breadcrumb\":{\"@id\":\"https://paperplane-justin-winter-s-projects.vercel.app/docs/api-reference/mail/price-a-letter-before-sending-it#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://paperplane-justin-winter-s-projects.vercel.app/docs/api-reference/mail/price-a-letter-before-sending-it#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"paperplane\",\"item\":\"https://paperplane-justin-winter-s-projects.vercel.app/docs\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Price a letter before sending it\",\"item\":\"https://paperplane-justin-winter-s-projects.vercel.app/docs/api-reference/mail/price-a-letter-before-sending-it\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://paperplane-justin-winter-s-projects.vercel.app/docs/api-reference/mail/price-a-letter-before-sending-it#apireference\",\"headline\":\"Price a letter before sending it\",\"name\":\"Price a letter before sending it\",\"description\":\"Free — creates nothing and never touches payment. The price is all-in (postage, printing and the envelope included); breakdown lists the piece and any options that make up the total. Quoting first is the recommended shape for agents: it is the safe call, and it tells the user what a send will cost. Supply to plus text (or pdf_url) and the response also carries a single-use confirmation_token bound to that exact letter and price. POST /v1/orders requires one on the agent path, so this is where a send begins.\",\"url\":\"https://paperplane-justin-winter-s-projects.vercel.app/docs/api-reference/mail/price-a-letter-before-sending-it\",\"mainEntityOfPage\":{\"@id\":\"https://paperplane-justin-winter-s-projects.vercel.app/docs/api-reference/mail/price-a-letter-before-sending-it#webpage\"},\"dateModified\":\"2026-10-01T20:21:20.768Z\",\"publisher\":{\"@id\":\"https://sendpaperplane.com/#organization\"},\"isPartOf\":{\"@id\":\"https://paperplane-justin-winter-s-projects.vercel.app/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"paperplane\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"paperplane\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/docs/api-reference/mail/price-a-letter-before-sending-it.md","siteName":"paperplane","nav":{"global":{"anchors":[{"anchor":"You're an agent? Start here","icon":"bot","href":"/agents"},{"anchor":"Changelog","icon":"list","href":"/changelog"},{"anchor":"Status","icon":"activity","href":"https://sendpaperplane.com/status"}]},"tabs":[{"tab":"Overview","icon":"book-open","pages":[{"title":"Overview","href":""}]},{"tab":"API Reference","icon":"square-terminal","groups":[{"group":"Mail","pages":[{"title":"Price a letter before sending it","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/quotes","href":"/api-reference/mail/price-a-letter-before-sending-it"},{"title":"Send a letter","description":"Renders the document, prices it, verifies both addresses with USPS, then either charges a prepaid credit code or returns a paperplane payment link. **This spends money and mails a physical object to a real address.** Charges the sender once payment is captured — immediately if a credit code covers it, otherwise when the returned `payment_url` is paid — or spends a sandbox no-op if `sandbox: true` for a free, instant, end-to-end simulation. Provide exactly one of `text`, `upload_key`, `pdf_base64`, or `pdf_url`.\n\nSend an `Idempotency-Key` header on every call. A repeat with the same key returns the original order with `replayed: true` and HTTP 200 instead of mailing a second letter, which makes a timeout safe to retry.\n\nOn the agent path a `confirmation_token` from `POST /v1/quotes` is required; without one the call fails `428 confirmation_required` rather than sending.","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/orders","href":"/api-reference/mail/send-a-letter"},{"title":"Fetch an order","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/orders/{id}","href":"/api-reference/mail/fetch-an-order"},{"title":"Cancel an order","deprecated":null,"version":null,"openapi":"/openapi.json delete /v1/orders/{id}","href":"/api-reference/mail/cancel-an-order"},{"title":"Get a signed URL to upload a PDF","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/uploads","href":"/api-reference/mail/get-a-signed-url-to-upload-a-pdf"},{"title":"Upload PDF bytes (keyless dev only)","deprecated":null,"version":null,"openapi":"/openapi.json put /v1/uploads/{key}","href":"/api-reference/mail/upload-pdf-bytes-keyless-dev-only"},{"title":"Propose a header→field mapping for a bulk import","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/csv-map","href":"/api-reference/mail/propose-a-header→field-mapping-for-a-bulk-import"},{"title":"Suggest a mail class for a draft","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/suggest-class","href":"/api-reference/mail/suggest-a-mail-class-for-a-draft"}]},{"group":"Credits","pages":[{"title":"Look up a prepaid credit balance","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/credits/{code}","href":"/api-reference/credits/look-up-a-prepaid-credit-balance"},{"title":"Buy a credit pack","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/credits/checkout","href":"/api-reference/credits/buy-a-credit-pack"},{"title":"Buy a credit pack via x402 (agent payments)","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/x402/credits","href":"/api-reference/credits/buy-a-credit-pack-via-x402-agent-payments"}]},{"group":"Reviews","pages":[{"title":"List published reviews","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/reviews","href":"/api-reference/reviews/list-published-reviews"},{"title":"Review a delivered order","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/reviews","href":"/api-reference/reviews/review-a-delivered-order"}]},{"group":"Feedback","pages":[{"title":"Report a problem to paperplane","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/feedback","href":"/api-reference/feedback/report-a-problem-to-paperplane"}]},{"group":"Addresses","pages":[{"title":"Address typeahead","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/address/autocomplete","href":"/api-reference/addresses/address-typeahead"},{"title":"Nearest mailable address for a coordinate","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/address/reverse","href":"/api-reference/addresses/nearest-mailable-address-for-a-coordinate"}]},{"group":"Meta","pages":[{"title":"Public site totals","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/stats","href":"/api-reference/meta/public-site-totals"},{"title":"This document","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/openapi.json","href":"/api-reference/meta/this-document"}]}]}]},"basePath":"","title":"Price a letter before sending it - paperplane","buildId":"dpl_2AK98Hxhwu4fUXpx9atbv41cC328","deploymentId":"dpl_2AK98Hxhwu4fUXpx9atbv41cC328","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-EBSrFTg1.js","utils-Y_7TcRh4.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-D1wvvkPH.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-aT0ty6oN.js","snippetPresets-DoNRuyJc.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-CXRajFpn.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-BAyOsINj.js","shallow-CIcHqV1v.js","getApiPlaygroundDisplay-C5igZwEf.js","CodeSnippet-BFWnQLNh.js","CodeSnippets-Cx2mFgZW.js","Page-DCFaZE46.js","getPastedJson-BOy09PZp.js","icon-BwmYtB6R.js","MethodPill-DAIhq-iu.js","DuplicateIcon-DFM8Q3ph.js","createIcon-0UdvzB4Z.js","DynamicMarkdown-DYYZTGpa.js","SectionHeading-BFCDRUuH.js","axios-vUo_bRtp.js","Markdown-C6TcKjiR.js","clsx-Y_UC780V.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-PCbBHBTv.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-D4q_oRML.js"]}