Mail a PDF through the API.

Upload privately, prepare a letter, and inspect the complete PDF proof.

Start with a bearer token from the quickstart. Files must be unlocked PDFs with 8.5×11 inch pages, up to 20 pages and 10 MB. Flatten interactive forms before uploading.

1. Upload your file

curl --fail-with-body 'https://postalmuse.com/v1/assets' \
 -H "Authorization: Bearer $TOKEN" \
 -H 'Idempotency-Key: your-unique-upload-key' \
 -F 'file=@letter.pdf'

2. Prepare the letter

Use the returned asset ID in a draft. Provide both addresses and purpose as in the quickstart.

{
  "kind": "letter",
  "purpose": "operational",
  "content": {
    "type": "pdf",
    "asset_id": "ast_FROM_UPLOAD"
  },
  "options": {
    "color": false,
    "double_sided": false
  }
}

This excerpt omits addresses. See the full request schema. The proof includes a separate address page. Overflow and unsupported dimensions are errors, never silent cropping.

3. Inspect and commit

Poll readiness, inspect all PDF pages and the quote, then use checkout for human approval or send through an existing spending grant. A new revision invalidates its prior proof and quote.