Skip to contentPostalForm

Developers

Mail Letters With an API

PostalForm lets developers mail letters with an API by creating a reviewable physical-mail draft from text, HTML, Markdown, RTF, or a PDF. The safest default is to return a hosted checkout URL so the sender can inspect the printable PDF, addresses, mailing options, and price before the letter is printed and mailed.

Published Jan 20, 2026 • Updated May 31, 2026

Direct answer: can I mail letters with an API?

Yes. PostalForm supports API and MCP workflows for creating letter mail drafts, previewing the rendered PDF, routing a sender to checkout, and tracking fulfillment after payment. Use hosted checkout when a human should approve the letter. Use machine-payment flows only when an autonomous runtime has explicit owner approval and spend controls.

Letter API paths

Starting point API path Best default
Plain text letter Create a letter draft and render a PDF preview Hosted checkout
HTML letter Render server-side into printable letter PDF Hosted checkout with preview
Markdown letter Render a readable letter from structured agent output Hosted checkout with preview
RTF letter Convert rich-text content into the mailpiece PDF Hosted checkout with preview
Existing PDF letter Upload the PDF, then create a mail draft Hosted checkout
Agent-generated letter Use MCP tools to create the draft and preview URL Require approval before payment
Approved autonomous mail Use machine-order REST, MPP, or x402 Only with request IDs and spend limits

Hosted-checkout flow for letters

  1. Create the letter content - Send text, HTML, Markdown, RTF, or an uploaded PDF.
  2. Provide addresses - Use sender and recipient address fields or supported address IDs.
  3. Choose options - Set available print and mailing options such as color, duplex, speed, or Certified Mail when eligible.
  4. Show the preview - Let the sender inspect the rendered PDF before payment.
  5. Launch checkout - Use the returned checkout URL for review and payment.
  6. Track status - Poll the order status after checkout completes.

Good fits for mailing letters by API

Use case Why PostalForm fits
Invoices and statements Generate or upload a letter, show the preview, and send through checkout.
Notices and demand letters Keep human review before the mailpiece becomes real postal mail.
Customer support mail Let internal tools create drafts without asking staff to print envelopes.
Case-management workflows Trigger reviewable letters from case records or form submissions.
AI assistant actions Let an agent prepare a letter while preserving review and payment approval.
Certified Mail workflows Request eligible proof options when the route and mailpiece support them.

How PostalForm differs from direct-mail campaign APIs

Many letter-mail APIs are built for broad campaign automation, postcards, CRM sequences, or enterprise transactional mail. PostalForm is focused on reviewable document mail: letters, PDFs, forms, dispute packets, hosted checkout, and agent-created mail with explicit approval guardrails.

Need Compare first
Reviewable letter drafts from text, HTML, Markdown, RTF, or PDFs PostalForm
High-volume transactional print-mail infrastructure Lob or PostGrid
CRM-triggered marketing campaigns Postalytics or a marketing automation platform
Broad self-service print-to-mail catalog Click2Mail
Real-estate investor letter sequences Real-estate direct-mail platforms

Safety defaults for letter APIs

Physical mail has offline consequences. A letter API should not behave like a normal email API where retries and automation are harmless.

  • Prefer hosted checkout when a human can review and pay.
  • Show the rendered PDF preview before payment.
  • Use idempotent request IDs for any direct-payment flow.
  • Require explicit owner approval before MPP or x402 payment.
  • Do not use PostalForm to send spam, harassment, illegal content, or mail the sender is not authorized to send.
  • Follow the applicable recipient, agency, contract, or legal-notice instructions; PostalForm does not provide legal advice.

Sources

FAQs

Do you offer an API for mailing letters?
Yes. PostalForm supports API and MCP workflows for creating reviewable letter drafts, hosted checkout links, and order-status lookups.
Can I create a letter from text instead of uploading a PDF?
Yes. Supported workflows can create letters from text, HTML, Markdown, or RTF, then render a printable PDF preview.
Can an AI agent mail a letter?
Yes, but hosted checkout is the safest default. The agent can create the draft and preview, then a human can review and pay.
Can I control print options?
Yes. PostalForm supports options such as color, duplex, delivery speed, and Certified Mail where eligible.
Does the API send the letter immediately?
Hosted-checkout drafts do not send mail until the sender pays. Direct machine-payment orders should be reserved for approved runtimes with spend controls and idempotent request IDs.
Is this a direct-mail marketing API?
PostalForm can support bulk and developer workflows, but it is not a CRM campaign suite. It is strongest for document and letter workflows that need review before physical mailing.
Does PostalForm provide legal advice for mailed letters?
No. PostalForm helps create and mail letters, but it does not decide whether a letter is legally sufficient.

Ready to send it?

Start with the developer guide and sample requests.