Create a certified letter draft
create_letterCreate a US domestic letter draft from exactly one of text, pdf_base64 or pdf_url. Creating a draft is free. Drafts cannot be edited. To change the text, an address or the service: create_letter with a new idempotency_key, give the person the new approval_url, then cancel_letter the old draft so the person cannot pay for the outdated draft. Tell the person the price from quote_letter before making the draft, unless they have already seen it. Unknown fields in the input, to or from are rejected with invalid_request; error.fix names each unknown field. Use organization for a company name, not company. For a return receipt, use service certified_err. An undeliverable address returns error.address_reason with a stable code, affected fields and USPS lookup URL; ask the person about that specific part. One page costs $9.04 for certified or $12.24 with an electronic Return Receipt; use quote_letter for the exact page count. Show approval_url to the person who will review and pay. For text, send the body from the greeting on; we add both addresses and the date. A different leading address block or date is refused with text_has_letterhead (422); remove the line named in the error. People who prefer to write or upload it themselves can use https://certifiedmailsender.com/send. Paid letters wait 30 minutes; send_now:true skips that hold only when the person asks. Screening still applies. Normally the person approves and pays; an auto-send key pays from its account balance. No refund once USPS accepts the letter, even if USPS can't deliver it. If the person mentioned a deadline, compare it with the delivery estimate and tell them plainly when the estimate falls after it. Test mode never mails. Example: {"to":{"name":"Jordan Lee","line1":"500 Market St","line2":"Suite 200","city":"Philadelphia","state":"PA","zip":"19106"},"from":{"name":"Sam Ortiz","line1":"12 Oak Ave","city":"Columbus","state":"OH","zip":"43215"},"service":"certified_err","text":"Dear Jordan,\n\n...","idempotency_key":""}
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"to": "<to>",
"from": "<from>",
"service": "<service>",
"idempotency_key": "<idempotency_key>"
},
"name": "create_letter"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Recipient address, checked by our printing partner against USPS records. If undeliverable during creation, the request is refused with address_undeliverable (422) and no draft is created. Read error.address_reason for its stable code, affected fields, plain explanation and USPS lookup URL; ask the person the specific question rather than guessing variants. | |
| from | Yes | ||
| text | No | The letter body, from the greeting on. We add the sender's address, the date and the recipient's address. Complete matching leading blocks are removed; a different leading address block or date is refused with text_has_letterhead (422), naming the line to remove. Subject lines and addresses after the greeting or first prose are allowed. Provide exactly one of text, pdf_base64 or pdf_url. | |
| pdf_url | No | ||
| service | Yes | certified sends USPS Certified Mail with USPS tracking. certified_err adds the electronic Return Receipt: a USPS PDF with the recipient's signature, once USPS provides it. Choose certified_err when the person wants proof of receipt. | |
| send_now | No | Choose true only when the person asks to skip the 30-minute cancellation hold after payment. Payment and any required approval are still required (auto-send pays from balance without per-letter approval), and every screening check must pass before submission. The letter can be canceled only until it is sent to the printing partner; skipping leaves no guaranteed cancellation period. | |
| pdf_base64 | No | ||
| idempotency_key | Yes | Use a new UUID for a new letter; reuse it with the same body on retries. Anonymous keys need at least 16 characters. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| to | Yes | ||
| from | Yes | ||
| mode | Yes | ||
| pages | Yes | ||
| quote | Yes | ||
| state | Yes | Persisted lifecycle state, not proof of mailing. printed comes from a Printed tracking observation; USPS acceptance requires proof_of_mailing. Reads can skip intermediate states. Test letters stop at submitted and never print or mail. | |
| origin | Yes | ||
| refund | Yes | Refund record for a canceled, rejected or failed letter; null when no refund is due. Use state and amount_cents to tell the person what happened to their payment. Card refunds usually show within 5 to 10 business days; the bank decides exactly when. | |
| service | Yes | ||
| send_now | Yes | Whether someone chose to skip the 30-minute cancellation hold. This never skips required payment or screening; auto-send keys have no per-letter approval step. | |
| timeline | Yes | ||
| next_step | Yes | ||
| created_at | Yes | UTC RFC 3339 timestamp with milliseconds, YYYY-MM-DDTHH:mm:ss.sssZ. | |
| letter_url | Yes | Keep this complete private link, including its t token. An anonymous letter can be read and canceled only with that token; an id alone or an API key created later cannot open it. A letter created with an API key can also be read and canceled with that same key. | |
| preview_url | Yes | ||
| receipt_url | No | Private token link to the USPS electronic Return Receipt PDF. Present only for certified_err in receipt_ready while files are retained; omitted means no downloadable receipt is available here, not that delivery failed. Keep the t token; this receipt is private like the letter PDF. | |
| review_note | Yes | ||
| address_note | Yes | The address partner’s raw note, not wording to relay to the person. Use next_step for the plain-language version to tell the person. | |
| approval_url | No | Private review page with the expected mailing date and USPS delivery estimate (not guaranteed). If the person mentioned a deadline, compare it with the delivery estimate and tell them plainly when the estimate falls after it. | |
| cancel_until | Yes | The scheduled end of the 30-minute cancellation hold, as an ISO 8601 / UTC RFC 3339 timestamp with milliseconds (YYYY-MM-DDTHH:mm:ss.sssZ); null for drafts or letters no longer cancellable. If skipped, this is when sending became eligible after payment. Cancellation remains possible until actual submission, even after this timestamp or during review; no extra cancellation period is guaranteed. | |
| tracking_url | Yes | ||
| address_status | Yes | ||
| document_source | Yes | ||
| first_usps_scan | Yes | Earliest recorded individual-letter USPS scan, including acceptance: at is UTC, date is the scan’s local YYYY-MM-DD date, scan is USPS’s wording. Excludes shipment acceptance-pending and printing-partner scans. Null means no individual-letter scan is recorded, not that the letter was never mailed. Only proof_of_mailing establishes an acceptance date. | |
| tracking_number | Yes | ||
| address_as_given | Yes | ||
| files_deleted_at | Yes | UTC time the letter files were deleted, or null. After deletion, preview_url is retained for compatibility but no longer downloads a file; receipt_url is omitted. Tracking and the record stay available at letter_url. | |
| proof_of_mailing | Yes | The acceptance scan records when USPS accepted the letter; null until an acceptance scan is recorded. Assistants cite date as the mailing date. This is not a postmarked receipt or a legal-status determination. | |
| partner_checked_at | Yes | UTC time of the last successful live tracking poll recorded by this service, even if USPS supplied no new scans. Null means no successful poll time is recorded (including test or legacy letters). A read never polls the partner; this is not a delivery or mailing time or a freshness guarantee. | |
| acceptance_expected_by | Yes | Eastern date (YYYY-MM-DD) by whose end the acceptance scan usually appears. Present from submission while no acceptance or individual-piece network/delivery scan is recorded and next_step gives this date. Null after an individual-piece scan even if acceptance is missing; proof_of_mailing remains null. Before it ends, tell the person when to contact support; after it ends, contact support now so we can check with the printing partner and USPS. |