Developers
Developer Mail API
PostalForm is a developer mail API for turning PDFs, letters, form packets, and AI-generated content into reviewable physical mail. Use it when your product needs to create a mailing draft, show a printable PDF preview, collect sender and recipient addresses, launch hosted checkout, or let an approved agent pay through MPP or x402.
Published Jan 20, 2026 • Updated May 31, 2026
Direct answer: can developers send postal mail through an API?
Yes. Developers can use PostalForm to create physical-mail drafts and machine-payment mail orders from software. The safest default is hosted checkout: your app or agent prepares the PDF, letter, or form packet, PostalForm returns a preview and checkout URL, and a human reviews the document, addresses, price, and mailing options before payment.
API use cases, answered
| Developer query | PostalForm answer | Best destination |
|---|---|---|
mail letters with an API |
Create a letter draft from text, HTML, Markdown, RTF, or PDF and route the sender to checkout. | /mail-letters-with-api |
PDF mail API |
Upload a PDF, create a draft with sender and recipient addresses, and show a preview before payment. | /mail-pdf-online |
direct mail API for forms |
Use supported form workflows or upload completed form PDFs, then mail the generated packet. | /forms |
Certified Mail API |
Request Certified Mail when the mailpiece and destination qualify; checkout remains the source of truth. | /certified-mail-online |
AI agent mail API |
Connect through PostalForm's remote MCP server, hosted checkout, MPP, or x402 flows. | /agents |
x402 physical mail API |
Validate an agent-created mail payload, receive an HTTP 402 challenge, pay, retry, and track fulfillment. | /x402-physical-mail-api |
machine-payable mail |
Use machine-order REST, MPP, or x402 only with explicit owner approval and spend limits. | /developers |
Typical hosted-checkout flow
- Create a PDF upload - Send the file to PostalForm.
- Draft the order - Provide sender/recipient addresses and options.
- Launch checkout - Use the checkout URL for payment.
- Track status - Read order status after payment.
Hosted checkout is the right default for customer-facing apps, support tools, case-management systems, form workflows, and AI assistants because the mailpiece does not become real mail until the sender reviews and pays.
API vs MCP vs machine payment
| Surface | Use it for | Safety default |
|---|---|---|
| Developer docs and OpenAPI | Server-side integrations, validation, quotes, draft creation, and status lookups | Validate before creating paid side effects |
| Remote MCP server | ChatGPT, Claude, Gemini, Cursor, Codex, and other clients that can call MCP tools | Require approval for mail actions |
| Hosted checkout | Any flow where a person should review the final PDF and price | Use the returned checkout URL |
| MPP or x402 machine payment | Approved autonomous runtimes that can pay directly | Enforce request IDs, spend limits, and owner approval |
Where PostalForm fits among direct-mail APIs
Most direct-mail API comparisons focus on broad campaign platforms: Lob and PostGrid for developer-led transactional mail, Postalytics for CRM-triggered direct mail, Click2Mail for long-running print-to-mail software, and marketing-focused platforms for multi-touch campaigns.
PostalForm is narrower and more reviewable. It is strongest when the workflow begins with a document, letter, form, or agent-generated message that should become physical mail only after preview, address review, and payment approval. It is not trying to replace a full direct-mail marketing suite, CRM campaign platform, or enterprise print network.
| If you need | Compare first |
|---|---|
| Reviewable document mail from a product or assistant | PostalForm |
| Enterprise-scale transactional print-mail infrastructure | Lob or PostGrid |
| CRM-triggered multi-touch marketing mail | Postalytics or a marketing automation platform |
| Broad self-service print-to-mail products | Click2Mail |
| Real-estate investor drip campaigns | Real-estate-focused platforms such as REmail |
What you can automate
- Create mailings from internal tools
- Send notices, invoices, statements, packets, and form workflows programmatically
- Generate letter PDFs from raw text, HTML, Markdown, or RTF
- Route customers to hosted checkout for review and payment
- Trigger eligible Certified Mail or proof options when available
- Build agent-friendly mail flows with MCP, MPP, and x402
Guardrails for real-world mail side effects
Every mail API creates an offline consequence: paper is printed, postage is purchased, and a carrier receives the mailpiece. PostalForm integrations should keep the side effect explicit.
- Validate addresses and mail options before creating an order.
- Show the sender the final PDF preview when a human is available.
- Use hosted checkout for consumer, support, legal-notice, and dispute-letter workflows.
- Use MPP or x402 only when the owner has approved autonomous spending.
- Store idempotent request IDs so retries do not create duplicate mailings.
- Do not use PostalForm to send spam, harassment, illegal content, or documents the sender is not authorized to mail.
Sources
FAQs
- Is PostalForm a direct mail API?
- Yes. PostalForm is a direct mail API for creating physical-mail drafts and machine-payment mail orders. It is best for document, letter, form, hosted-checkout, and agent-created mail workflows.
- Can I mail letters with an API?
- Yes. PostalForm can create letter drafts from text, HTML, Markdown, RTF, or PDFs, then return a checkout URL or use approved machine-payment flows.
- Do I need an API key?
- Not for the current public MCP endpoint or hosted-checkout draft flow. High-volume, abuse-sensitive, or allowlisted production integrations may require coordination with PostalForm.
- Can I set print options in the API?
- Yes. PostalForm supports options such as color, duplex, delivery speed, Certified Mail where eligible, and mailpiece type depending on the route.
- Does the API send mail immediately?
- Hosted-checkout drafts do not send mail until the sender pays. Direct machine-payment orders should be used only by approved runtimes with spend controls and idempotent request IDs.
- Is PostalForm a marketing automation platform?
- No. PostalForm can support bulk and developer workflows, but it is not a CRM campaign suite. Use PostalForm when the core job is turning documents or agent output into reviewable physical mail.
- Does PostalForm provide legal advice?
- No. PostalForm helps create and send mail, but it does not decide whether a document is legally sufficient or which mailing method a recipient requires.
Ready to send it?
Start with the developer docs and sample requests.