mail

Send a letter

Print and mail a physical letter through the USPS. CONSEQUENTIAL and charged: from 249 credits, plus 30 per extra page, 50 for color, 950 for certified, 699 over 6 sheets; a pdf_url is priced on its real page count. A mailed letter cannot be recalled. Sensitive write: it requires the human's approval of the recipient, content and price. A replay with the same idempotency_key returns the original result and never mails twice.

post/v1/letters

Request

  • Base URL: https://api.noerrands.com/c/mail
  • URL: https://api.noerrands.com/c/mail/v1/letters
  • Auth: HTTP bearer

Request body

subjectstring

Optional subject line printed above the body.

body_markdownstring

Letter body as Markdown. Exactly one of body_markdown, body_html or pdf_url.

body_htmlstring

Letter body as HTML. Sanitized server-side: scripts, event handlers and external stylesheets are stripped.

pdf_urlstring uri

HTTPS URL of a print-ready PDF to mail as-is.

colorboolean
double_sidedboolean
certifiedboolean
idempotency_keystring

Use one key per human request. Replays within 24 hours return the original result instead of sending again.

Response

Success.

mail_idstring required

Opaque id, "ml_...". Use it with get_mail_status.

kind'letter' | 'postcard' required
status'created' | 'processing' | 'in_transit' | 'delivered' | 'returned' | 'failed' | 'cancelled' required
created_atstring date-time required
expected_delivery_datestring date

YYYY-MM-DD.

credits_charged_centsinteger required
tracking_urlstring uri
balance_centsinteger required

Remaining credit balance after the charge.

Changes

No recorded changes to this operation across all 1 revision of this API.