PostalForm is an MCP server published by com.postalform, hosted at postalform.com. When last checked on 2026-11-22 it was working: it answers and lists its tools. It declares 13 tools, including postalform.list_forms, postalform.get_form_schema, postalform.search_addresses, postalform.create_pdf_upload, postalform.create_order_draft.
Create mail drafts, upload PDFs, browse forms, track orders, and pay via MPP or x402.
Nothing else in the archive shares these values.
Squares are this server's values; dots are other servers sharing them. A shared address or publisher is a lead, not proof of a common operator.
Inferred from the host name and headers: what a server runs on, not who runs it.
Use this when you need the published single-mailpiece PostalForm workflow catalog available to agents. Coordinated statutory multi-recipient workflows are excluded.
| Parameter | Type | Description |
|---|---|---|
| q | string | Optional search query (matches slug/name). |
| limit | integer | Max results (default 50). |
| cursor | string | Pagination cursor (opaque string). |
{
"name": "postalform.list_forms",
"title": "List available forms",
"description": "Use this when you need the published single-mailpiece PostalForm workflow catalog available to agents. Coordinated statutory multi-recipient workflows are excluded.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"q": {
"type": "string",
"description": "Optional search query (matches slug/name)."
},
"limit": {
"type": "integer",
"maximum": 200,
"description": "Max results (default 50).",
"exclusiveMinimum": 0
},
"cursor": {
"type": "string",
"description": "Pagination cursor (opaque string)."
}
}
},
"outputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"forms",
"next_cursor"
],
"properties": {
"forms": {
"type": "array",
"items": {
"type": "object",
"required": [
"slug",
"name"
],
"properties": {
"name": {
"type": "string"
},
"slug": {
"type": "string"
},
"aliases": {
"type": "array",
"items": {
"type": "string"
}
},
"category": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"attachments": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"label",
"required"
],
"properties": {
"id": {
"type": "string"
},
"label": {
"type": "string"
},
"required": {
"type": "boolean"
}
},
"additionalProperties": false
}
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"published_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"certified_mail": {
"enum": [
"required",
"optional",
"none"
],
"type": "string"
},
"recipient_mode": {
"enum": [
"user",
"predefined",
"computed"
],
"type": "string"
},
"multi_recipient": {
"type": "boolean"
}
},
"additionalProperties": false
}
},
"next_cursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
"annotations": {
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}Use this when you need a machine-usable schema for one supported single-mailpiece PostalForm workflow (fields, groups, attachments, and dependencies).
| Parameter | Type | Description |
|---|---|---|
| slug * | string | Workflow slug (e.g. "8822"). |
{
"name": "postalform.get_form_schema",
"title": "Get form schema",
"description": "Use this when you need a machine-usable schema for one supported single-mailpiece PostalForm workflow (fields, groups, attachments, and dependencies).",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"slug"
],
"properties": {
"slug": {
"type": "string",
"minLength": 1,
"description": "Workflow slug (e.g. \"8822\")."
}
}
},
"outputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"schema_version",
"workflow_version",
"slug",
"name",
"llms",
"indexable",
"certified_mail",
"recipient",
"groups",
"fields",
"attachments",
"attachments_max_total_size_mb"
],
"properties": {
"llms": {
"type": "boolean"
},
"name": {
"type": "string"
},
"slug": {
"type": "string"
},
"fields": {
"type": "array",
"items": {}
},
"groups": {
"type": "array",
"items": {}
},
"topics": {
"type": "array",
"items": {
"type": "string"
}
},
"aliases": {
"type": "array",
"items": {
"type": "string"
}
},
"pricing": {
"type": "object",
"required": [
"minimumTotalCents",
"currency",
"description",
"additiveMailServices"
],
"properties": {
"currency": {
"type": "string",
"const": "USD"
},
"description": {
"type": "string"
},
"minimumTotalCents": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
},
"additiveMailServices": {
"type": "array",
"items": {
"enum": [
"certified_return_receipt"
],
"type": "string"
}
}
},
"additionalProperties": false
},
"category": {
"type": "string"
},
"bulk_form": {},
"indexable": {
"type": "boolean"
},
"recipient": {
"type": "object",
"required": [
"mode"
],
"properties": {
"mode": {
"enum": [
"user",
"predefined",
"computed"
],
"type": "string"
},
"name": {
"type": "string"
},
"address": {
"type": "object",
"required": [
"line1",
"city",
"state",
"zip"
],
"properties": {
"zip": {
"type": "string"
},
"city": {
"type": "string"
},
"line1": {
"type": "string"
},
"line2": {
"type": "string"
},
"state": {
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"updated_at": {
"type": "string"
},
"attachments": {
"type": "array",
"items": {}
},
"description": {
"type": "string"
},
"form_summary": {
"type": "string"
},
"published_at": {
"type": "string"
},
"agent_summary": {
"type": "string"
},
"checkout_flow": {
"enum": [
"home",
"forms_order"
],
"type": "string"
},
"publish_state": {
"type": "string"
},
"certified_mail": {
"enum": [
"required",
"optional",
"none"
],
"type": "string"
},
"data_collected": {
"type": "array",
"items": {
"type": "string"
}
},
"schema_version": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": -9007199254740991
},
"deadline_helper": {},
"multi_recipient": {},
"recipient_rules": {},
"workflow_version": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": -9007199254740991
},
"compliance_policy": {},
"recipient_presets": {},
"attachments_max_total_size_mb": {
"type": "number",
"exclusiveMinimum": 0
}
},
"additionalProperties": false
},
"annotations": {
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}Use this to search for a mailing address and return Loqate suggestions with IDs. Pass country_code to filter by country; it defaults to US. If a suggestion has type "Container" (building/complex), call this tool again with container=<id> and a refined query to drill down to type "Address". Only type "Address" is valid for order creation.
| Parameter | Type | Description |
|---|---|---|
| query * | string | Partial address text, e.g. "123 Main St" |
| target | string | Which address field is being searched (used for UI context). |
| container | string | Loqate container id for drilling into suggestions, if provided |
| country_code | string | Two-letter country code to filter suggestions. Defaults to US. |
{
"name": "postalform.search_addresses",
"title": "Search mailing addresses",
"description": "Use this to search for a mailing address and return Loqate suggestions with IDs. Pass country_code to filter by country; it defaults to US. If a suggestion has type \"Container\" (building/complex), call this tool again with container=<id> and a refined query to drill down to type \"Address\". Only type \"Address\" is valid for order creation.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"query"
],
"properties": {
"query": {
"type": "string",
"minLength": 3,
"description": "Partial address text, e.g. \"123 Main St\""
},
"target": {
"enum": [
"sender",
"recipient"
],
"type": "string",
"description": "Which address field is being searched (used for UI context)."
},
"container": {
"type": "string",
"description": "Loqate container id for drilling into suggestions, if provided"
},
"country_code": {
"type": "string",
"maxLength": 2,
"minLength": 2,
"description": "Two-letter country code to filter suggestions. Defaults to US."
}
}
},
"outputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"view",
"query",
"suggestions"
],
"properties": {
"view": {
"type": "string",
"const": "address_suggestions"
},
"query": {
"type": "string"
},
"target": {
"enum": [
"sender",
"recipient"
],
"type": "string"
},
"suggestions": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"text",
"type",
"description"
],
"properties": {
"id": {
"type": "string"
},
"text": {
"type": "string"
},
"type": {
"type": "string"
},
"countryCode": {
"type": "string"
},
"countryName": {
"type": "string"
},
"description": {
"type": "string"
}
},
"additionalProperties": false
}
}
},
"additionalProperties": false
},
"annotations": {
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}Use this when the host cannot provide a PDF file param directly. It creates a short-lived PDF upload URL and upload token (multipart/form-data, file field). Let the HTTP client generate Content-Type with its multipart boundary.
| Parameter | Type | Description |
|---|---|---|
| file_name | string | Optional original file name. |
| request_id | string | Optional idempotency key. Reuse the same value if retrying the call. |
| content_type | string | Optional content type hint (application/pdf). |
| content_length | integer | Optional content length in bytes. |
{
"name": "postalform.create_pdf_upload",
"title": "Create a PDF upload",
"description": "Use this when the host cannot provide a PDF file param directly. It creates a short-lived PDF upload URL and upload token (multipart/form-data, file field). Let the HTTP client generate Content-Type with its multipart boundary.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"file_name": {
"type": "string",
"maxLength": 255,
"minLength": 1,
"description": "Optional original file name."
},
"request_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Optional idempotency key. Reuse the same value if retrying the call."
},
"content_type": {
"type": "string",
"maxLength": 255,
"minLength": 1,
"description": "Optional content type hint (application/pdf)."
},
"content_length": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0,
"description": "Optional content length in bytes."
}
}
},
"outputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"upload_url",
"upload_token",
"expires_at",
"max_bytes",
"required_headers"
],
"properties": {
"max_bytes": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
},
"expires_at": {
"type": "string"
},
"upload_url": {
"type": "string",
"format": "uri"
},
"upload_token": {
"type": "string"
},
"required_headers": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "string"
}
}
},
"additionalProperties": false
},
"annotations": {
"readOnlyHint": false,
"openWorldHint": true,
"destructiveHint": false
}
}Prepare an existing PDF for mailing and return the order ID, total, hosted checkout URL, and checkout session. After buyer approval, a compatible client can pass a Stripe shared payment token to complete_checkout; otherwise present the hosted checkout URL. To prepare for MPP, set payment_protocol=mpp and buyer_email; receive a PDF preview, hosted checkout_url fallback and MPP challenge, then use postalform.pay_order with the order_id after buyer approval. Draft creation never pays. For x402, use postalform.create_machine_order.
| Parameter | Type | Description |
|---|---|---|
| pdf * | any | The PDF to mail. Accepts attachment objects ({ download_url, file_id }). Fallbacks: upload_token from postalform.create_pdf_upload, data:application/pdf;base64,..., or a public HTTPS download URL. |
| color | boolean | Whether to print in color (default: false). |
| certified | boolean | Whether to add proof mail: USPS Certified Mail for US destinations, Canada Post Registered Mail through PostGrid for Canadian destinations, or PinGen registered mail for supported European destinations (default: false). |
| file_name | string | Optional display file name. |
| buyer_name | string | Receipt name; defaults to sender_name for MPP. |
| mail_class | string | Mail service level (standard, priority, express). |
| request_id | string | Optional idempotency key. Reuse the same value if retrying the call. |
Use this to prepare a non-writing preview for a mailed letter before creating checkout. It renders the letter, validates the addresses, and returns a widget with a create-draft action.
| Parameter | Type | Description |
|---|---|---|
| color | boolean | |
| letter * | object | |
| certified | boolean | |
| mail_class | string | one of ["standard","priority","express"] |
| request_id | string | |
| sender_name * | string | |
| double_sided | boolean | |
| recipient_name * | string | |
| sender_address_id | string | |
| sender_address_text | string | |
| sender_address_type * | string |
Prepare letter text for mailing and return the order ID, total, hosted checkout URL, and checkout session. Accepts text directly; no PDF upload or browser is needed. Letter drafts may include typed or drawn signatures. After buyer approval, a compatible client can use complete_checkout with a Stripe shared payment token; otherwise present the hosted checkout URL. To prepare for MPP, set payment_protocol=mpp and buyer_email; receive a PDF preview, hosted checkout_url fallback and MPP challenge, then use postalform.pay_order with the order_id after buyer approval. Draft creation never pays. For x402, use postalform.create_machine_order.
| Parameter | Type | Description |
|---|---|---|
| color | boolean | |
| letter * | object | |
| certified | boolean | |
| buyer_name | string | Receipt name; defaults to sender_name for MPP. |
| mail_class | string | one of ["standard","priority","express"] |
| request_id | string | |
| buyer_email | string | Required for MPP receipt delivery. |
| sender_name * | string | |
| double_sided | boolean |
Prepare a supported workflow form for mailing and return the order ID, total, hosted checkout URL, and checkout session. After buyer approval, a compatible client can use complete_checkout with a Stripe shared payment token; otherwise present the hosted checkout URL. To prepare for MPP, set payment_protocol=mpp and buyer_email; receive a PDF preview, hosted checkout_url fallback and MPP challenge, then use postalform.pay_order with the order_id after buyer approval. Draft creation never pays. For x402, use postalform.create_machine_order.
| Parameter | Type | Description |
|---|---|---|
| slug * | string | |
| color | boolean | |
| fields | object | |
| certified | boolean | |
| buyer_name | string | Receipt name; defaults to sender_name for MPP. |
| mail_class | string | one of ["standard","priority","express"] |
| request_id | string | |
| attachments | array | |
| buyer_email | string | Required for MPP receipt delivery. |
| sender_name |
Create a single PDF, letter, workflow-form order, or bulk letter campaign and pay through MPP or x402 after buyer approval. For bulk, provide exactly one of bulk.csv_content or bulk.recipients (JSON address objects with optional merge_fields), plus a shared PDF or text/HTML template. Omit top-level recipient fields and review campaign_url, recipient count and total. Bulk MPP orders can also use postalform.pay_order after fetching its challenge. The unpaid response also includes checkout_url and status_url for this same order. Without an available compatible wallet, give the buyer checkout_url and poll status_url; never recreate the order to change payment paths. Single-recipient clients with a Stripe shared payment token can instead use a draft tool followed by complete_checkout; other clients should present the hosted checkout URL.
| Parameter | Type | Description |
|---|---|---|
| any | Existing PDF to mail. For a single recipient, provide exactly one of pdf, letter, or form. For bulk.content_mode=pdf, this PDF is sent to every CSV or JSON recipient. Prefer upload_token from postalform.create_pdf_upload. | |
| bulk | object | Bulk letter campaign: exactly one of csv_content or recipients (JSON list), plus shared PDF or text/HTML template. Omit single-recipient fields, letter, form, and postcard options. color and double_sided apply to every mailpiece. |
| form | object | Workflow form payload from postalform.get_form_schema. Provide exactly one of pdf, letter, or form. |
| color | boolean | |
| letter | object | Letter text to render and mail. Provide exactly one of pdf, letter, or form. Optional format may be text, html, markdown, or rtf; default is text. Optional signature may be a typed string or drawn signature payload. |
Get an MPP challenge or pay an existing MPP PDF, letter, workflow-form order, or bulk letter campaign after buyer approval. Use the order_id returned by any draft tool with payment_protocol=mpp or by create_machine_order. When switching from create_machine_order, omit the credential first to get this payment endpoint’s challenge. Review the preview or campaign_url, recipient count and total. No document or addresses are resubmitted. Without payment_authorization this only returns a challenge; with it, this can pay and send real mail. Reuse the same order_id on retries and follow the returned payment status.
| Parameter | Type | Description |
|---|---|---|
| order_id * | string | |
| payment_authorization | string | Buyer-approved MPP Authorization header, usually Payment ... . Omit to retrieve the challenge. |
{
"name": "postalform.pay_order",
"title": "Pay a prepared order with MPP",
"description": "Get an MPP challenge or pay an existing MPP PDF, letter, workflow-form order, or bulk letter campaign after buyer approval. Use the order_id returned by any draft tool with payment_protocol=mpp or by create_machine_order. When switching from create_machine_order, omit the credential first to get this payment endpoint’s challenge. Review the preview or campaign_url, recipient count and total. No document or addresses are resubmitted. Without payment_authorization this only returns a challenge; with it, this can pay and send real mail. Reuse the same order_id on retries and follow the returned payment status.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"order_id"
],
"properties": {
"order_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"payment_authorization": {
"type": "string",
"minLength": 1,
"description": "Buyer-approved MPP Authorization header, usually Payment ... . Omit to retrieve the challenge."
}
}
},
"outputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"view",
"protocol",
"order_id",
"request_id",
"endpoint",
"status",
"payment_status",
"payment_status_label",
"payment_status_description",
"paid_at",
"is_paid",
"price_usd",
"currency",
"mailpiece_type",
"postcard_size",
"order_complete_url"
],
"properties": {
"bulk": {
"type": "object",
"required": [
"campaign_id",
"recipient_count",
"content_mode",
"status",
"status_counts"
],
"properties": {
"status": {
"type": "string"
},
"campaign_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"content_mode": {
"enum": [
"text",
"html",
"pdf"
],
"type": "string"
},
"status_counts": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"recipient_count": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
},
"additionalProperties": false
},
"view": {
"type": "string",
"const": "machine_order"
},
"status": {
"type": "string"
},
"is_paid": {
"type": "boolean"
},
"paid_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"payment": {},
"currency": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"endpoint": {
"type": "string",
"format": "uri"
},
"order_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"protocol": {
"enum": [
"mpp",
"x402"
],
"type": "string"
},
"next_step": {
"type": "string"
},
"price_usd": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"page_count": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"request_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"status_url": {
"type": "string",
"format": "uri"
},
"next_action": {
"type": "string"
},
"preview_url": {
"anyOf": [
{
"type": "string",
"format": "uri"
},
{
"type": "null"
}
]
},
"campaign_url": {
"type": "string",
"format": "uri"
},
"checkout_url": {
"anyOf": [
{
"type": "string",
"format": "uri"
},
{
"type": "null"
}
]
},
"postcard_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"mailpiece_type": {
"enum": [
"letter",
"postcard"
],
"type": "string"
},
"payment_status": {
"type": "string"
},
"payment_options": {
"type": "array",
"items": {
"type": "object",
"required": [
"type"
],
"properties": {
"url": {
"type": "string",
"format": "uri"
},
"type": {
"type": "string"
}
},
"additionalProperties": false
}
},
"order_complete_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"payment_status_label": {
"type": "string"
},
"payment_status_description": {
"type": "string"
}
},
"additionalProperties": false
},
"annotations": {
"readOnlyHint": false,
"openWorldHint": true,
"destructiveHint": false
}
}After the buyer approves the prepared order and total, pay its existing checkout session using a compatible Stripe payment token, including a shared payment token (spt_...). Pass the order ID as checkout_session_id; do not resend the document or addresses. On an interrupted request, retry the same checkout and token. Existing authorized, processing, or paid payments are reused; follow the returned status and messages.
| Parameter | Type | Description |
|---|---|---|
| buyer * | any | Buyer identity details for the approved checkout. |
| payment_data * | object | Buyer-authorized payment token details. Use provider=stripe. |
| checkout_session_id * | string | The checkout session id to finalize. |
{
"name": "complete_checkout",
"title": "Pay a prepared checkout",
"description": "After the buyer approves the prepared order and total, pay its existing checkout session using a compatible Stripe payment token, including a shared payment token (spt_...). Pass the order ID as checkout_session_id; do not resend the document or addresses. On an interrupted request, retry the same checkout and token. Existing authorized, processing, or paid payments are reused; follow the returned status and messages.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"checkout_session_id",
"buyer",
"payment_data"
],
"properties": {
"buyer": {
"anyOf": [
{
"type": "object",
"required": [
"first_name",
"email"
],
"properties": {
"email": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
"maxLength": 256
},
"last_name": {
"type": "string",
"maxLength": 256,
"minLength": 1
},
"first_name": {
"type": "string",
"maxLength": 256,
"minLength": 1
},
"phone_number": {
"type": "string",
"maxLength": 32,
"minLength": 1
}
}
},
{
"type": "object",
"required": [
"name",
"email"
],
"properties": {
"name": {
"type": "string",
"maxLength": 256,
"minLength": 1
},
"email": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
"maxLength": 256
},
"phone_number": {
"type": "string",
"maxLength": 32,
"minLength": 1
}
}
}
],
"description": "Buyer identity details for the approved checkout."
},
"payment_data": {
"type": "object",
"required": [
"token",
"provider"
],
"properties": {
"token": {
"type": "string",
"minLength": 1
},
"provider": {
"enum": [
"stripe",
"adyen"
],
"type": "string"
},
"billing_address": {
"type": "object",
"required": [
"name",
"line_one",
"city",
"state",
"country",
"postal_code"
],
"properties": {
"city": {
"type": "string",
"maxLength": 60,
"minLength": 1
},
"name": {
"type": "string",
"maxLength": 255,
"minLength": 1
},
"state": {
"type": "string",
"maxLength": 60,
"minLength": 1
},
"country": {
"type": "string",
"maxLength": 2,
"minLength": 1
},
"line_one": {
"type": "string",
"maxLength": 60,
"minLength": 1
},
"line_two": {
"type": "string",
"maxLength": 60,
"minLength": 1
},
"postal_code": {
"type": "string",
"maxLength": 20,
"minLength": 1
},
"phone_number": {
"type": "string",
"maxLength": 32,
"minLength": 1
}
}
}
},
"description": "Buyer-authorized payment token details. Use provider=stripe."
},
"checkout_session_id": {
"type": "string",
"minLength": 1,
"description": "The checkout session id to finalize."
}
}
},
"outputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"id",
"buyer",
"status",
"currency",
"line_items",
"fulfillment_options",
"totals",
"messages",
"links"
],
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"buyer": {
"type": "object",
"required": [
"first_name",
"email"
],
"properties": {
"email": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
"maxLength": 256
},
"last_name": {
"type": "string",
"maxLength": 256,
"minLength": 1
},
"first_name": {
"type": "string",
"maxLength": 256,
"minLength": 1
},
"phone_number": {
"type": "string",
"maxLength": 32,
"minLength": 1
}
},
"additionalProperties": false
},
"links": {
"type": "array",
"items": {
"type": "object",
"required": [
"type"
],
"properties": {
"url": {
"type": "string",
"format": "uri"
},
"type": {
"enum": [
"terms_of_use",
"privacy_policy",
"seller_shop_policies"
],
"type": "string"
},
"value": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
}
},
"order": {
"type": "object",
"required": [
"id",
"checkout_session_id",
"permalink_url"
],
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"permalink_url": {
"type": "string",
"format": "uri"
},
"checkout_session_id": {
"type": "string",
"minLength": 1
}
},
"additionalProperties": false
},
"status": {
"enum": [
"not_ready_for_payment",
"ready_for_payment",
"completed",
"canceled"
],
"type": "string"
},
"totals": {
"type": "array",
"items": {
"type": "object",
"required": [
"type",
"display_text",
"amount"
],
"properties": {
"type": {
"enum": [
"items_base_amount",
"items_discount",
"subtotal",
"discount",
"fulfillment",
"tax",
"fee",
"total"
],
"type": "string"
},
"amount": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
},
"display_text": {
"type": "string",
"minLength": 1
}
},
"additionalProperties": false
}
},
"currency": {
"type": "string"
},
"messages": {
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"required": [
"type",
"param",
"content_type",
"content"
],
"properties": {
"type": {
"type": "string",
"const": "info"
},
"param": {
"type": "string",
"minLength": 1
},
"content": {
"type": "string",
"minLength": 1
},
"content_type": {
"enum": [
"plain",
"markdown"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"type",
"code",
"content_type",
"content"
],
"properties": {
"code": {
"enum": [
"missing",
"invalid",
"out_of_stock",
"payment_declined",
"requires_sign_in",
"requires_3ds"
],
"type": "string"
},
"type": {
"type": "string",
"const": "error"
},
"param": {
"type": "string",
"minLength": 1
},
"content": {
"type": "string",
"minLength": 1
},
"content_type": {
"enum": [
"plain",
"markdown"
],
"type": "string"
}
},
"additionalProperties": false
}
]
}
},
"line_items": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"item",
"base_amount",
"discount",
"subtotal",
"tax",
"total"
],
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"tax": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
},
"item": {
"type": "object",
"required": [
"id",
"quantity"
],
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"quantity": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
},
"additionalProperties": false
},
"total": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
},
"discount": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
},
"subtotal": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
},
"base_amount": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"additionalProperties": false
}
},
"fulfillment_address": {
"type": "object",
"required": [
"name",
"line_one",
"city",
"state",
"country",
"postal_code"
],
"properties": {
"city": {
"type": "string",
"maxLength": 60,
"minLength": 1
},
"name": {
"type": "string",
"maxLength": 255,
"minLength": 1
},
"state": {
"type": "string",
"maxLength": 60,
"minLength": 1
},
"country": {
"type": "string",
"maxLength": 2,
"minLength": 1
},
"line_one": {
"type": "string",
"maxLength": 60,
"minLength": 1
},
"line_two": {
"type": "string",
"maxLength": 60,
"minLength": 1
},
"postal_code": {
"type": "string",
"maxLength": 20,
"minLength": 1
},
"phone_number": {
"type": "string",
"maxLength": 32,
"minLength": 1
}
},
"additionalProperties": false
},
"fulfillment_options": {
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"required": [
"type",
"id",
"title",
"subtitle",
"earliest_delivery_time",
"latest_delivery_time",
"subtotal",
"tax",
"total"
],
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"tax": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
},
"type": {
"type": "string",
"const": "shipping"
},
"title": {
"type": "string",
"minLength": 1
},
"total": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
},
"carrier": {
"type": "string",
"minLength": 1
},
"subtitle": {
"type": "string",
"minLength": 1
},
"subtotal": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
},
"carrier_info": {
"type": "string",
"minLength": 1
},
"latest_delivery_time": {
"type": "string",
"minLength": 1
},
"earliest_delivery_time": {
"type": "string",
"minLength": 1
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"type",
"id",
"title",
"subtotal",
"tax",
"total"
],
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"tax": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
},
"type": {
"type": "string",
"const": "digital"
},
"title": {
"type": "string",
"minLength": 1
},
"total": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
},
"subtitle": {
"type": "string",
"minLength": 1
},
"subtotal": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"additionalProperties": false
}
]
}
},
"fulfillment_option_id": {
"type": "string",
"minLength": 1
}
},
"additionalProperties": false
},
"annotations": {
"readOnlyHint": false,
"openWorldHint": true,
"destructiveHint": false
}
}Read payment status and total, processing, stored mailing/carrier status, the latest 50 public tracking events, and electronic return receipt availability. Use payment_status_label and payment_status_description: payment_authorized means authorized awaiting capture, even when is_paid=false and paid_at=null. Do not request another payment for authorized, processing or received payments. Bulk orders also return campaign_url, recipient count and per-status counts; use the campaign dashboard for individual recipients. Missing carrier evidence is null; processing or a tracking number alone does not prove mailing or delivery. This read does not pay, mail, or acquire receipts.
| Parameter | Type | Description |
|---|---|---|
| order_id * | string | PostalForm order id. |
{
"name": "postalform.get_order_status",
"title": "Get order status",
"description": "Read payment status and total, processing, stored mailing/carrier status, the latest 50 public tracking events, and electronic return receipt availability. Use payment_status_label and payment_status_description: payment_authorized means authorized awaiting capture, even when is_paid=false and paid_at=null. Do not request another payment for authorized, processing or received payments. Bulk orders also return campaign_url, recipient count and per-status counts; use the campaign dashboard for individual recipients. Missing carrier evidence is null; processing or a tracking number alone does not prove mailing or delivery. This read does not pay, mail, or acquire receipts.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"order_id"
],
"properties": {
"order_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "PostalForm order id."
}
}
},
"outputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"view",
"found",
"order_id"
],
"properties": {
"bulk": {
"type": "object",
"required": [
"campaign_id",
"recipient_count",
"content_mode",
"status",
"status_counts"
],
"properties": {
"status": {
"type": "string"
},
"campaign_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"content_mode": {
"enum": [
"text",
"html",
"pdf"
],
"type": "string"
},
"status_counts": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"recipient_count": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
},
"additionalProperties": false
},
"view": {
"type": "string",
"const": "order_status"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"found": {
"type": "boolean"
},
"carrier": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"is_paid": {
"type": "boolean"
},
"paid_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"currency": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"order_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"price_usd": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"signed_by": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"page_count": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"status_url": {
"type": "string"
},
"next_action": {
"type": "string"
},
"campaign_url": {
"type": "string",
"format": "uri"
},
"checkout_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"current_step": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"mailing_status": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"payment_status": {
"type": "string"
},
"delivery_status": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"payment_options": {
"type": "array",
"items": {
"type": "object",
"required": [
"type"
],
"properties": {
"url": {
"type": "string",
"format": "uri"
},
"type": {
"type": "string"
}
},
"additionalProperties": false
}
},
"tracking_events": {
"type": "array",
"items": {
"type": "object",
"required": [
"status",
"statusNormalized",
"statusDetail",
"message",
"occurredAt",
"location"
],
"properties": {
"status": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"message": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"location": {
"anyOf": [
{
"type": "object",
"required": [
"postalCode",
"city",
"state",
"label"
],
"properties": {
"city": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"state": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"postalCode": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
},
"occurredAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"statusDetail": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"statusNormalized": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
}
},
"tracking_number": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"tracking_updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"payment_status_label": {
"type": "string"
},
"estimated_delivery_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"delivery_status_detail": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"electronic_return_receipt": {
"type": "object",
"required": [
"requested",
"status",
"document_available",
"emailed_at"
],
"properties": {
"status": {
"anyOf": [
{
"enum": [
"manual",
"pending",
"sent",
"failed"
],
"type": "string"
},
{
"type": "null"
}
]
},
"requested": {
"type": "boolean"
},
"emailed_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"document_available": {
"type": "boolean"
}
},
"additionalProperties": false
},
"mailing_status_normalized": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"payment_status_description": {
"type": "string"
}
},
"additionalProperties": false
},
"annotations": {
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}Use this when you want a quick health check that the PostalForm MCP server is reachable.
No parameters.
{
"name": "postalform.ping",
"title": "Ping PostalForm",
"description": "Use this when you want a quick health check that the PostalForm MCP server is reachable.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {}
},
"outputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"view",
"title",
"message"
],
"properties": {
"view": {
"type": "string",
"const": "ping"
},
"title": {
"type": "string"
},
"message": {
"type": "string"
}
},
"additionalProperties": false
},
"annotations": {
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}PostalForm prints and mails physical letters, documents, and forms via USPS. Typical flow: validate addresses, prepare a draft and review its price, then obtain buyer approval before complete_checkout with a compatible Stripe payment token, hosted checkout, or a direct MPP/x402 payment. Every unpaid machine order also returns a hosted checkout_url fallback. Without a compatible wallet, present that URL and poll status_url. For MPP, any PDF, letter, or form draft can use payment_protocol=mpp and buyer_email. Review the preview and total, then call postalform.pay_order with only the order_id and buyer-approved credential. Generated letters accept text directly; no PDF upload or browser is needed. Docs and guidance: https://postalform.com/agents (agent payment workflows), https://postalform.com/developers (API reference), https://postalform.com/openapi.json (OpenAPI spec). Developers and agents can provision PostalForm infrastructure and build on these APIs at https://projects.postalform.com (Stripe Projects CLI or regular login). Support: support@postalform.com.
Names, descriptions and schemas were written by the server and are shown as data.
Pattern matches on what the server declares. They show what it says it can do, not what it does.
None yet. Changes appear after a server's second daily check.
| buyer_email | string | Required for MPP receipt delivery. |
| sender_name * | string | Sender's name (return address). |
| double_sided | boolean | Whether to print double-sided (default: true). |
| recipient_name * | string | Recipient's name. |
| sender_company | string | Optional company, department or attention line printed under sender_name in the return address (at most 40 characters). |
| payment_protocol | string | Optional payment path. Defaults to hosted checkout. Choose mpp to return a payment challenge for this same prepared order; buyer_email is required. Draft creation never pays. |
| recipient_company | string | Optional company, department or attention line printed under recipient_name, for example "Acme Corp, ATTN: Legal" (at most 40 characters). |
| sender_address_id | string | Loqate address id for the sender (required when sender_address_type is Address). |
| sender_address_text | string | Human-readable sender address preview (required when sender_address_type is Address; optional for Manual). |
| sender_address_type * | string | Address suggestion type for the sender (from postalform.search_addresses). Use Manual to pass a structured address with countryCode when outside the US. |
| recipient_address_id | string | Loqate address id for the recipient (required when recipient_address_type is Address). |
| sender_address_manual | object | Sender manual address fields (required when sender_address_type is Manual). |
| recipient_address_text | string | Human-readable recipient address preview (required when recipient_address_type is Address; optional for Manual). |
| recipient_address_type * | string | Address suggestion type for the recipient (from postalform.search_addresses). Use Manual to pass a structured address with countryCode when outside the US. |
| certified_return_receipt | boolean | Add Electronic Return Receipt for US Certified Mail. Ignored for Canada Post Registered Mail and PinGen registered-mail destinations (default: false). |
| recipient_address_manual | object | Recipient manual address fields (required when recipient_address_type is Manual). |
{
"name": "postalform.create_order_draft",
"title": "Create a mail order draft",
"description": "Prepare an existing PDF for mailing and return the order ID, total, hosted checkout URL, and checkout session. After buyer approval, a compatible client can pass a Stripe shared payment token to complete_checkout; otherwise present the hosted checkout URL. To prepare for MPP, set payment_protocol=mpp and buyer_email; receive a PDF preview, hosted checkout_url fallback and MPP challenge, then use postalform.pay_order with the order_id after buyer approval. Draft creation never pays. For x402, use postalform.create_machine_order.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"pdf",
"sender_name",
"sender_address_type",
"recipient_name",
"recipient_address_type"
],
"properties": {
"pdf": {
"anyOf": [
{
"type": "object",
"required": [
"download_url",
"file_id"
],
"properties": {
"file_id": {
"type": "string"
},
"download_url": {
"type": "string",
"format": "uri"
}
}
},
{
"type": "object",
"required": [
"upload_token"
],
"properties": {
"upload_token": {
"type": "string",
"minLength": 1
}
}
},
{
"type": "string",
"minLength": 1
}
],
"description": "The PDF to mail. Accepts attachment objects ({ download_url, file_id }). Fallbacks: upload_token from postalform.create_pdf_upload, data:application/pdf;base64,..., or a public HTTPS download URL."
},
"color": {
"type": "boolean",
"description": "Whether to print in color (default: false)."
},
"certified": {
"type": "boolean",
"description": "Whether to add proof mail: USPS Certified Mail for US destinations, Canada Post Registered Mail through PostGrid for Canadian destinations, or PinGen registered mail for supported European destinations (default: false)."
},
"file_name": {
"type": "string",
"maxLength": 255,
"minLength": 1,
"description": "Optional display file name."
},
"buyer_name": {
"type": "string",
"maxLength": 256,
"minLength": 1,
"description": "Receipt name; defaults to sender_name for MPP."
},
"mail_class": {
"enum": [
"standard",
"priority",
"express"
],
"type": "string",
"description": "Mail service level (standard, priority, express)."
},
"request_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Optional idempotency key. Reuse the same value if retrying the call."
},
"buyer_email": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
"maxLength": 256,
"description": "Required for MPP receipt delivery."
},
"sender_name": {
"type": "string",
"maxLength": 255,
"minLength": 1,
"description": "Sender's name (return address)."
},
"double_sided": {
"type": "boolean",
"description": "Whether to print double-sided (default: true)."
},
"recipient_name": {
"type": "string",
"maxLength": 255,
"minLength": 1,
"description": "Recipient's name."
},
"sender_company": {
"type": "string",
"maxLength": 40,
"minLength": 1,
"description": "Optional company, department or attention line printed under sender_name in the return address (at most 40 characters)."
},
"payment_protocol": {
"enum": [
"hosted",
"mpp"
],
"type": "string",
"description": "Optional payment path. Defaults to hosted checkout. Choose mpp to return a payment challenge for this same prepared order; buyer_email is required. Draft creation never pays."
},
"recipient_company": {
"type": "string",
"maxLength": 40,
"minLength": 1,
"description": "Optional company, department or attention line printed under recipient_name, for example \"Acme Corp, ATTN: Legal\" (at most 40 characters)."
},
"sender_address_id": {
"type": "string",
"maxLength": 255,
"minLength": 1,
"description": "Loqate address id for the sender (required when sender_address_type is Address)."
},
"sender_address_text": {
"type": "string",
"maxLength": 2000,
"minLength": 1,
"description": "Human-readable sender address preview (required when sender_address_type is Address; optional for Manual)."
},
"sender_address_type": {
"enum": [
"Address",
"Container",
"Manual"
],
"type": "string",
"description": "Address suggestion type for the sender (from postalform.search_addresses). Use Manual to pass a structured address with countryCode when outside the US."
},
"recipient_address_id": {
"type": "string",
"maxLength": 255,
"minLength": 1,
"description": "Loqate address id for the recipient (required when recipient_address_type is Address)."
},
"sender_address_manual": {
"type": "object",
"required": [
"line1",
"city",
"zip"
],
"properties": {
"zip": {
"type": "string",
"maxLength": 20,
"minLength": 1
},
"city": {
"type": "string",
"minLength": 1
},
"line1": {
"type": "string",
"minLength": 1
},
"line2": {
"type": "string",
"minLength": 1
},
"state": {
"type": "string",
"maxLength": 60,
"minLength": 1
},
"country": {
"type": "string",
"maxLength": 2,
"minLength": 2
},
"countryCode": {
"type": "string",
"maxLength": 2,
"minLength": 2
}
},
"description": "Sender manual address fields (required when sender_address_type is Manual)."
},
"recipient_address_text": {
"type": "string",
"maxLength": 2000,
"minLength": 1,
"description": "Human-readable recipient address preview (required when recipient_address_type is Address; optional for Manual)."
},
"recipient_address_type": {
"enum": [
"Address",
"Container",
"Manual"
],
"type": "string",
"description": "Address suggestion type for the recipient (from postalform.search_addresses). Use Manual to pass a structured address with countryCode when outside the US."
},
"certified_return_receipt": {
"type": "boolean",
"description": "Add Electronic Return Receipt for US Certified Mail. Ignored for Canada Post Registered Mail and PinGen registered-mail destinations (default: false)."
},
"recipient_address_manual": {
"type": "object",
"required": [
"line1",
"city",
"zip"
],
"properties": {
"zip": {
"type": "string",
"maxLength": 20,
"minLength": 1
},
"city": {
"type": "string",
"minLength": 1
},
"line1": {
"type": "string",
"minLength": 1
},
"line2": {
"type": "string",
"minLength": 1
},
"state": {
"type": "string",
"maxLength": 60,
"minLength": 1
},
"country": {
"type": "string",
"maxLength": 2,
"minLength": 2
},
"countryCode": {
"type": "string",
"maxLength": 2,
"minLength": 2
}
},
"description": "Recipient manual address fields (required when recipient_address_type is Manual)."
}
}
},
"outputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"view",
"order_id",
"page_count",
"price_usd",
"checkout_url",
"sender_name",
"sender_address_text",
"recipient_name",
"recipient_address_text"
],
"properties": {
"view": {
"type": "string",
"const": "order_draft"
},
"is_paid": {
"type": "boolean"
},
"payment": {
"type": "object",
"required": [
"view",
"protocol",
"order_id",
"request_id",
"endpoint",
"status",
"payment_status",
"payment_status_label",
"payment_status_description",
"paid_at",
"is_paid",
"price_usd",
"currency",
"mailpiece_type",
"postcard_size",
"order_complete_url"
],
"properties": {
"bulk": {
"type": "object",
"required": [
"campaign_id",
"recipient_count",
"content_mode",
"status",
"status_counts"
],
"properties": {
"status": {
"type": "string"
},
"campaign_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"content_mode": {
"enum": [
"text",
"html",
"pdf"
],
"type": "string"
},
"status_counts": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"recipient_count": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
},
"additionalProperties": false
},
"view": {
"type": "string",
"const": "machine_order"
},
"status": {
"type": "string"
},
"is_paid": {
"type": "boolean"
},
"paid_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"payment": {},
"currency": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"endpoint": {
"type": "string",
"format": "uri"
},
"order_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"protocol": {
"enum": [
"mpp",
"x402"
],
"type": "string"
},
"next_step": {
"type": "string"
},
"price_usd": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"page_count": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"request_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"status_url": {
"type": "string",
"format": "uri"
},
"next_action": {
"type": "string"
},
"preview_url": {
"anyOf": [
{
"type": "string",
"format": "uri"
},
{
"type": "null"
}
]
},
"campaign_url": {
"type": "string",
"format": "uri"
},
"checkout_url": {
"anyOf": [
{
"type": "string",
"format": "uri"
},
{
"type": "null"
}
]
},
"postcard_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"mailpiece_type": {
"enum": [
"letter",
"postcard"
],
"type": "string"
},
"payment_status": {
"type": "string"
},
"payment_options": {
"type": "array",
"items": {
"type": "object",
"required": [
"type"
],
"properties": {
"url": {
"type": "string",
"format": "uri"
},
"type": {
"type": "string"
}
},
"additionalProperties": false
}
},
"order_complete_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"payment_status_label": {
"type": "string"
},
"payment_status_description": {
"type": "string"
}
},
"additionalProperties": false
},
"order_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"price_usd": {
"anyOf": [
{
"type": "number",
"minimum": 0
},
{
"type": "null"
}
]
},
"page_count": {
"anyOf": [
{
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
},
{
"type": "null"
}
]
},
"preview_url": {
"anyOf": [
{
"type": "string",
"format": "uri"
},
{
"type": "null"
}
]
},
"sender_name": {
"type": "string",
"maxLength": 255,
"minLength": 1
},
"checkout_url": {
"anyOf": [
{
"type": "string",
"format": "uri"
},
{
"type": "null"
}
]
},
"payment_status": {
"type": "string"
},
"recipient_name": {
"type": "string",
"maxLength": 255,
"minLength": 1
},
"sender_company": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"checkout_session": {
"type": "object",
"required": [
"id",
"payment_provider",
"status",
"currency",
"line_items",
"totals",
"links"
],
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"links": {
"type": "array",
"items": {
"type": "object",
"required": [
"type"
],
"properties": {
"url": {
"type": "string",
"format": "uri"
},
"type": {
"enum": [
"terms_of_use",
"privacy_policy",
"seller_shop_policies"
],
"type": "string"
},
"value": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
}
},
"status": {
"enum": [
"not_ready_for_payment",
"ready_for_payment",
"completed",
"canceled"
],
"type": "string"
},
"totals": {
"type": "array",
"items": {
"type": "object",
"required": [
"type",
"display_text",
"amount"
],
"properties": {
"type": {
"enum": [
"items_base_amount",
"items_discount",
"subtotal",
"discount",
"fulfillment",
"tax",
"fee",
"total"
],
"type": "string"
},
"amount": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
},
"display_text": {
"type": "string",
"minLength": 1
}
},
"additionalProperties": false
}
},
"currency": {
"type": "string",
"minLength": 1
},
"line_items": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"item",
"base_amount",
"discount",
"subtotal",
"tax",
"total"
],
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"tax": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
},
"item": {
"type": "object",
"required": [
"id",
"quantity"
],
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"quantity": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
},
"additionalProperties": false
},
"total": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
},
"discount": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
},
"subtotal": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
},
"base_amount": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"additionalProperties": false
}
},
"payment_mode": {
"enum": [
"test",
"live"
],
"type": "string"
},
"payment_provider": {
"type": "object",
"required": [
"provider",
"supported_payment_methods"
],
"properties": {
"provider": {
"enum": [
"stripe",
"adyen"
],
"type": "string"
},
"merchant_id": {
"type": "string",
"minLength": 1
},
"supported_payment_methods": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"payment_protocol": {
"enum": [
"hosted",
"mpp"
],
"type": "string"
},
"delivery_estimate": {
"anyOf": [
{
"type": "object",
"required": [
"earliest",
"latest",
"label"
],
"properties": {
"label": {
"type": "string"
},
"latest": {
"type": "string"
},
"earliest": {
"type": "string"
},
"print_by": {
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
},
"recipient_company": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"sender_address_text": {
"type": "string"
},
"recipient_address_text": {
"type": "string"
}
},
"additionalProperties": false
},
"annotations": {
"readOnlyHint": false,
"openWorldHint": true,
"destructiveHint": false
}
}| one of ["Address","Container","Manual"] |
| recipient_address_id | string |
| sender_address_manual | object |
| recipient_address_text | string |
| recipient_address_type * | string | one of ["Address","Container","Manual"] |
| certified_return_receipt | boolean |
| recipient_address_manual | object |
{
"name": "postalform.preview_letter_order_draft",
"title": "Preview a mail order draft from letter text",
"description": "Use this to prepare a non-writing preview for a mailed letter before creating checkout. It renders the letter, validates the addresses, and returns a widget with a create-draft action.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"letter",
"sender_name",
"sender_address_type",
"recipient_name",
"recipient_address_type"
],
"properties": {
"color": {
"type": "boolean"
},
"letter": {
"type": "object",
"required": [
"body"
],
"properties": {
"body": {
"type": "string",
"maxLength": 20000,
"minLength": 1
},
"title": {
"type": "string",
"maxLength": 200
},
"render": {
"type": "object",
"properties": {
"font": {
"enum": [
"times",
"helvetica"
],
"type": "string"
},
"paper": {
"type": "string",
"const": "letter"
},
"font_size": {
"type": "integer",
"maximum": 14,
"minimum": 9
},
"margin_in": {
"type": "number",
"maximum": 1.5,
"minimum": 0.5
}
}
},
"signature": {
"anyOf": [
{
"type": "string",
"maxLength": 2000
},
{
"type": "object",
"properties": {
"mode": {
"enum": [
"typed",
"drawn"
],
"type": "string"
},
"text": {
"type": "string",
"maxLength": 2000
},
"dataUrl": {
"type": "string"
},
"printDataUrl": {
"type": "string"
}
},
"additionalProperties": false
}
]
}
}
},
"certified": {
"type": "boolean"
},
"mail_class": {
"enum": [
"standard",
"priority",
"express"
],
"type": "string"
},
"request_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"sender_name": {
"type": "string",
"maxLength": 255,
"minLength": 1
},
"double_sided": {
"type": "boolean"
},
"recipient_name": {
"type": "string",
"maxLength": 255,
"minLength": 1
},
"sender_address_id": {
"type": "string",
"maxLength": 255,
"minLength": 1
},
"sender_address_text": {
"type": "string",
"maxLength": 2000,
"minLength": 1
},
"sender_address_type": {
"enum": [
"Address",
"Container",
"Manual"
],
"type": "string"
},
"recipient_address_id": {
"type": "string",
"maxLength": 255,
"minLength": 1
},
"sender_address_manual": {
"type": "object",
"required": [
"line1",
"city",
"zip"
],
"properties": {
"zip": {
"type": "string",
"maxLength": 20,
"minLength": 1
},
"city": {
"type": "string",
"minLength": 1
},
"line1": {
"type": "string",
"minLength": 1
},
"line2": {
"type": "string",
"minLength": 1
},
"state": {
"type": "string",
"maxLength": 60,
"minLength": 1
},
"country": {
"type": "string",
"maxLength": 2,
"minLength": 2
},
"countryCode": {
"type": "string",
"maxLength": 2,
"minLength": 2
}
}
},
"recipient_address_text": {
"type": "string",
"maxLength": 2000,
"minLength": 1
},
"recipient_address_type": {
"enum": [
"Address",
"Container",
"Manual"
],
"type": "string"
},
"certified_return_receipt": {
"type": "boolean"
},
"recipient_address_manual": {
"type": "object",
"required": [
"line1",
"city",
"zip"
],
"properties": {
"zip": {
"type": "string",
"maxLength": 20,
"minLength": 1
},
"city": {
"type": "string",
"minLength": 1
},
"line1": {
"type": "string",
"minLength": 1
},
"line2": {
"type": "string",
"minLength": 1
},
"state": {
"type": "string",
"maxLength": 60,
"minLength": 1
},
"country": {
"type": "string",
"maxLength": 2,
"minLength": 2
},
"countryCode": {
"type": "string",
"maxLength": 2,
"minLength": 2
}
}
}
}
},
"outputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"view",
"page_count",
"price_usd",
"sender_name",
"sender_address_text",
"recipient_name",
"recipient_address_text",
"draft_request"
],
"properties": {
"view": {
"type": "string",
"const": "letter_order_preview"
},
"price_usd": {
"type": "number",
"minimum": 0
},
"page_count": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
},
"sender_name": {
"type": "string",
"maxLength": 255,
"minLength": 1
},
"draft_request": {
"type": "object",
"required": [
"letter",
"sender_name",
"sender_address_type",
"recipient_name",
"recipient_address_type"
],
"properties": {
"color": {
"type": "boolean"
},
"letter": {
"type": "object",
"required": [
"body"
],
"properties": {
"body": {
"type": "string",
"maxLength": 20000,
"minLength": 1
},
"title": {
"type": "string",
"maxLength": 200
},
"render": {
"type": "object",
"properties": {
"font": {
"enum": [
"times",
"helvetica"
],
"type": "string"
},
"paper": {
"type": "string",
"const": "letter"
},
"font_size": {
"type": "integer",
"maximum": 14,
"minimum": 9
},
"margin_in": {
"type": "number",
"maximum": 1.5,
"minimum": 0.5
}
},
"additionalProperties": false
},
"signature": {
"anyOf": [
{
"type": "string",
"maxLength": 2000
},
{
"type": "object",
"properties": {
"mode": {
"enum": [
"typed",
"drawn"
],
"type": "string"
},
"text": {
"type": "string",
"maxLength": 2000
},
"dataUrl": {
"type": "string"
},
"printDataUrl": {
"type": "string"
}
},
"additionalProperties": false
}
]
}
},
"additionalProperties": false
},
"certified": {
"type": "boolean"
},
"mail_class": {
"enum": [
"standard",
"priority",
"express"
],
"type": "string"
},
"request_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"sender_name": {
"type": "string",
"maxLength": 255,
"minLength": 1
},
"double_sided": {
"type": "boolean"
},
"recipient_name": {
"type": "string",
"maxLength": 255,
"minLength": 1
},
"sender_address_id": {
"type": "string",
"maxLength": 255,
"minLength": 1
},
"sender_address_text": {
"type": "string",
"maxLength": 2000,
"minLength": 1
},
"sender_address_type": {
"enum": [
"Address",
"Container",
"Manual"
],
"type": "string"
},
"recipient_address_id": {
"type": "string",
"maxLength": 255,
"minLength": 1
},
"sender_address_manual": {
"type": "object",
"required": [
"line1",
"city",
"zip"
],
"properties": {
"zip": {
"type": "string",
"maxLength": 20,
"minLength": 1
},
"city": {
"type": "string",
"minLength": 1
},
"line1": {
"type": "string",
"minLength": 1
},
"line2": {
"type": "string",
"minLength": 1
},
"state": {
"type": "string",
"maxLength": 60,
"minLength": 1
},
"country": {
"type": "string",
"maxLength": 2,
"minLength": 2
},
"countryCode": {
"type": "string",
"maxLength": 2,
"minLength": 2
}
},
"additionalProperties": false
},
"recipient_address_text": {
"type": "string",
"maxLength": 2000,
"minLength": 1
},
"recipient_address_type": {
"enum": [
"Address",
"Container",
"Manual"
],
"type": "string"
},
"certified_return_receipt": {
"type": "boolean"
},
"recipient_address_manual": {
"type": "object",
"required": [
"line1",
"city",
"zip"
],
"properties": {
"zip": {
"type": "string",
"maxLength": 20,
"minLength": 1
},
"city": {
"type": "string",
"minLength": 1
},
"line1": {
"type": "string",
"minLength": 1
},
"line2": {
"type": "string",
"minLength": 1
},
"state": {
"type": "string",
"maxLength": 60,
"minLength": 1
},
"country": {
"type": "string",
"maxLength": 2,
"minLength": 2
},
"countryCode": {
"type": "string",
"maxLength": 2,
"minLength": 2
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"recipient_name": {
"type": "string",
"maxLength": 255,
"minLength": 1
},
"sender_address_text": {
"type": "string"
},
"recipient_address_text": {
"type": "string"
}
},
"additionalProperties": false
},
"annotations": {
"readOnlyHint": true,
"openWorldHint": false,
"destructiveHint": false
}
}| recipient_name * | string |
| payment_protocol | string | Optional payment path. Defaults to hosted checkout. Choose mpp to return a payment challenge for this same prepared order; buyer_email is required. Draft creation never pays. |
| sender_address_id | string |
| sender_address_text | string |
| sender_address_type * | string | one of ["Address","Container","Manual"] |
| recipient_address_id | string |
| sender_address_manual | object |
| recipient_address_text | string |
| recipient_address_type * | string | one of ["Address","Container","Manual"] |
| certified_return_receipt | boolean |
| recipient_address_manual | object |
{
"name": "postalform.create_letter_order_draft",
"title": "Create a mail order draft from letter text",
"description": "Prepare letter text for mailing and return the order ID, total, hosted checkout URL, and checkout session. Accepts text directly; no PDF upload or browser is needed. Letter drafts may include typed or drawn signatures. After buyer approval, a compatible client can use complete_checkout with a Stripe shared payment token; otherwise present the hosted checkout URL. To prepare for MPP, set payment_protocol=mpp and buyer_email; receive a PDF preview, hosted checkout_url fallback and MPP challenge, then use postalform.pay_order with the order_id after buyer approval. Draft creation never pays. For x402, use postalform.create_machine_order.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"letter",
"sender_name",
"sender_address_type",
"recipient_name",
"recipient_address_type"
],
"properties": {
"color": {
"type": "boolean"
},
"letter": {
"type": "object",
"required": [
"body"
],
"properties": {
"body": {
"type": "string",
"maxLength": 20000,
"minLength": 1
},
"title": {
"type": "string",
"maxLength": 200
},
"render": {
"type": "object",
"properties": {
"font": {
"enum": [
"times",
"helvetica"
],
"type": "string"
},
"paper": {
"type": "string",
"const": "letter"
},
"font_size": {
"type": "integer",
"maximum": 14,
"minimum": 9
},
"margin_in": {
"type": "number",
"maximum": 1.5,
"minimum": 0.5
}
}
},
"signature": {
"anyOf": [
{
"type": "string",
"maxLength": 2000
},
{
"type": "object",
"properties": {
"mode": {
"enum": [
"typed",
"drawn"
],
"type": "string"
},
"text": {
"type": "string",
"maxLength": 2000
},
"dataUrl": {
"type": "string"
},
"printDataUrl": {
"type": "string"
}
},
"additionalProperties": false
}
]
}
}
},
"certified": {
"type": "boolean"
},
"buyer_name": {
"type": "string",
"maxLength": 256,
"minLength": 1,
"description": "Receipt name; defaults to sender_name for MPP."
},
"mail_class": {
"enum": [
"standard",
"priority",
"express"
],
"type": "string"
},
"request_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"buyer_email": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
"maxLength": 256,
"description": "Required for MPP receipt delivery."
},
"sender_name": {
"type": "string",
"maxLength": 255,
"minLength": 1
},
"double_sided": {
"type": "boolean"
},
"recipient_name": {
"type": "string",
"maxLength": 255,
"minLength": 1
},
"payment_protocol": {
"enum": [
"hosted",
"mpp"
],
"type": "string",
"description": "Optional payment path. Defaults to hosted checkout. Choose mpp to return a payment challenge for this same prepared order; buyer_email is required. Draft creation never pays."
},
"sender_address_id": {
"type": "string",
"maxLength": 255,
"minLength": 1
},
"sender_address_text": {
"type": "string",
"maxLength": 2000,
"minLength": 1
},
"sender_address_type": {
"enum": [
"Address",
"Container",
"Manual"
],
"type": "string"
},
"recipient_address_id": {
"type": "string",
"maxLength": 255,
"minLength": 1
},
"sender_address_manual": {
"type": "object",
"required": [
"line1",
"city",
"zip"
],
"properties": {
"zip": {
"type": "string",
"maxLength": 20,
"minLength": 1
},
"city": {
"type": "string",
"minLength": 1
},
"line1": {
"type": "string",
"minLength": 1
},
"line2": {
"type": "string",
"minLength": 1
},
"state": {
"type": "string",
"maxLength": 60,
"minLength": 1
},
"country": {
"type": "string",
"maxLength": 2,
"minLength": 2
},
"countryCode": {
"type": "string",
"maxLength": 2,
"minLength": 2
}
}
},
"recipient_address_text": {
"type": "string",
"maxLength": 2000,
"minLength": 1
},
"recipient_address_type": {
"enum": [
"Address",
"Container",
"Manual"
],
"type": "string"
},
"certified_return_receipt": {
"type": "boolean"
},
"recipient_address_manual": {
"type": "object",
"required": [
"line1",
"city",
"zip"
],
"properties": {
"zip": {
"type": "string",
"maxLength": 20,
"minLength": 1
},
"city": {
"type": "string",
"minLength": 1
},
"line1": {
"type": "string",
"minLength": 1
},
"line2": {
"type": "string",
"minLength": 1
},
"state": {
"type": "string",
"maxLength": 60,
"minLength": 1
},
"country": {
"type": "string",
"maxLength": 2,
"minLength": 2
},
"countryCode": {
"type": "string",
"maxLength": 2,
"minLength": 2
}
}
}
}
},
"outputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"view",
"order_id",
"page_count",
"price_usd",
"checkout_url",
"sender_name",
"sender_address_text",
"recipient_name",
"recipient_address_text"
],
"properties": {
"view": {
"type": "string",
"const": "order_draft"
},
"is_paid": {
"type": "boolean"
},
"payment": {
"type": "object",
"required": [
"view",
"protocol",
"order_id",
"request_id",
"endpoint",
"status",
"payment_status",
"payment_status_label",
"payment_status_description",
"paid_at",
"is_paid",
"price_usd",
"currency",
"mailpiece_type",
"postcard_size",
"order_complete_url"
],
"properties": {
"bulk": {
"type": "object",
"required": [
"campaign_id",
"recipient_count",
"content_mode",
"status",
"status_counts"
],
"properties": {
"status": {
"type": "string"
},
"campaign_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"content_mode": {
"enum": [
"text",
"html",
"pdf"
],
"type": "string"
},
"status_counts": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"recipient_count": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
},
"additionalProperties": false
},
"view": {
"type": "string",
"const": "machine_order"
},
"status": {
"type": "string"
},
"is_paid": {
"type": "boolean"
},
"paid_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"payment": {},
"currency": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"endpoint": {
"type": "string",
"format": "uri"
},
"order_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"protocol": {
"enum": [
"mpp",
"x402"
],
"type": "string"
},
"next_step": {
"type": "string"
},
"price_usd": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"page_count": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"request_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"status_url": {
"type": "string",
"format": "uri"
},
"next_action": {
"type": "string"
},
"preview_url": {
"anyOf": [
{
"type": "string",
"format": "uri"
},
{
"type": "null"
}
]
},
"campaign_url": {
"type": "string",
"format": "uri"
},
"checkout_url": {
"anyOf": [
{
"type": "string",
"format": "uri"
},
{
"type": "null"
}
]
},
"postcard_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"mailpiece_type": {
"enum": [
"letter",
"postcard"
],
"type": "string"
},
"payment_status": {
"type": "string"
},
"payment_options": {
"type": "array",
"items": {
"type": "object",
"required": [
"type"
],
"properties": {
"url": {
"type": "string",
"format": "uri"
},
"type": {
"type": "string"
}
},
"additionalProperties": false
}
},
"order_complete_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"payment_status_label": {
"type": "string"
},
"payment_status_description": {
"type": "string"
}
},
"additionalProperties": false
},
"order_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"price_usd": {
"anyOf": [
{
"type": "number",
"minimum": 0
},
{
"type": "null"
}
]
},
"page_count": {
"anyOf": [
{
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
},
{
"type": "null"
}
]
},
"preview_url": {
"anyOf": [
{
"type": "string",
"format": "uri"
},
{
"type": "null"
}
]
},
"sender_name": {
"type": "string",
"maxLength": 255,
"minLength": 1
},
"checkout_url": {
"anyOf": [
{
"type": "string",
"format": "uri"
},
{
"type": "null"
}
]
},
"payment_status": {
"type": "string"
},
"recipient_name": {
"type": "string",
"maxLength": 255,
"minLength": 1
},
"sender_company": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"checkout_session": {
"type": "object",
"required": [
"id",
"payment_provider",
"status",
"currency",
"line_items",
"totals",
"links"
],
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"links": {
"type": "array",
"items": {
"type": "object",
"required": [
"type"
],
"properties": {
"url": {
"type": "string",
"format": "uri"
},
"type": {
"enum": [
"terms_of_use",
"privacy_policy",
"seller_shop_policies"
],
"type": "string"
},
"value": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
}
},
"status": {
"enum": [
"not_ready_for_payment",
"ready_for_payment",
"completed",
"canceled"
],
"type": "string"
},
"totals": {
"type": "array",
"items": {
"type": "object",
"required": [
"type",
"display_text",
"amount"
],
"properties": {
"type": {
"enum": [
"items_base_amount",
"items_discount",
"subtotal",
"discount",
"fulfillment",
"tax",
"fee",
"total"
],
"type": "string"
},
"amount": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
},
"display_text": {
"type": "string",
"minLength": 1
}
},
"additionalProperties": false
}
},
"currency": {
"type": "string",
"minLength": 1
},
"line_items": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"item",
"base_amount",
"discount",
"subtotal",
"tax",
"total"
],
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"tax": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
},
"item": {
"type": "object",
"required": [
"id",
"quantity"
],
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"quantity": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
},
"additionalProperties": false
},
"total": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
},
"discount": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
},
"subtotal": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
},
"base_amount": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"additionalProperties": false
}
},
"payment_mode": {
"enum": [
"test",
"live"
],
"type": "string"
},
"payment_provider": {
"type": "object",
"required": [
"provider",
"supported_payment_methods"
],
"properties": {
"provider": {
"enum": [
"stripe",
"adyen"
],
"type": "string"
},
"merchant_id": {
"type": "string",
"minLength": 1
},
"supported_payment_methods": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"payment_protocol": {
"enum": [
"hosted",
"mpp"
],
"type": "string"
},
"delivery_estimate": {
"anyOf": [
{
"type": "object",
"required": [
"earliest",
"latest",
"label"
],
"properties": {
"label": {
"type": "string"
},
"latest": {
"type": "string"
},
"earliest": {
"type": "string"
},
"print_by": {
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
},
"recipient_company": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"sender_address_text": {
"type": "string"
},
"recipient_address_text": {
"type": "string"
}
},
"additionalProperties": false
},
"annotations": {
"readOnlyHint": false,
"openWorldHint": true,
"destructiveHint": false
}
}| string |
| double_sided | boolean |
| recipient_name | string |
| payment_protocol | string | Optional payment path. Defaults to hosted checkout. Choose mpp to return a payment challenge for this same prepared order; buyer_email is required. Draft creation never pays. |
| sender_address_id | string |
| sender_address_text | string |
| sender_address_type * | string | one of ["Address","Container","Manual"] |
| recipient_address_id | string |
| sender_address_manual | object |
| recipient_address_text | string |
| recipient_address_type | string | one of ["Address","Container","Manual"] |
| use_workflow_recipient | boolean | Deprecated compatibility field. Predefined and computed workflow recipients are always enforced and cannot be overridden. |
| certified_return_receipt | boolean |
| recipient_address_manual | object |
{
"name": "postalform.create_form_order_draft",
"title": "Create a mail order draft from a workflow form submission",
"description": "Prepare a supported workflow form for mailing and return the order ID, total, hosted checkout URL, and checkout session. After buyer approval, a compatible client can use complete_checkout with a Stripe shared payment token; otherwise present the hosted checkout URL. To prepare for MPP, set payment_protocol=mpp and buyer_email; receive a PDF preview, hosted checkout_url fallback and MPP challenge, then use postalform.pay_order with the order_id after buyer approval. Draft creation never pays. For x402, use postalform.create_machine_order.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"slug",
"sender_name",
"sender_address_type"
],
"properties": {
"slug": {
"type": "string",
"minLength": 1
},
"color": {
"type": "boolean"
},
"fields": {
"type": "object",
"default": {},
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"certified": {
"type": "boolean"
},
"buyer_name": {
"type": "string",
"maxLength": 256,
"minLength": 1,
"description": "Receipt name; defaults to sender_name for MPP."
},
"mail_class": {
"enum": [
"standard",
"priority",
"express"
],
"type": "string"
},
"request_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"attachments": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"base64"
],
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"label": {
"type": "string"
},
"base64": {
"type": "string",
"minLength": 1
},
"file_name": {
"type": "string"
},
"content_type": {
"type": "string"
}
}
}
},
"buyer_email": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
"maxLength": 256,
"description": "Required for MPP receipt delivery."
},
"sender_name": {
"type": "string",
"maxLength": 255,
"minLength": 1
},
"double_sided": {
"type": "boolean"
},
"recipient_name": {
"type": "string",
"maxLength": 255,
"minLength": 1
},
"payment_protocol": {
"enum": [
"hosted",
"mpp"
],
"type": "string",
"description": "Optional payment path. Defaults to hosted checkout. Choose mpp to return a payment challenge for this same prepared order; buyer_email is required. Draft creation never pays."
},
"sender_address_id": {
"type": "string",
"maxLength": 255,
"minLength": 1
},
"sender_address_text": {
"type": "string",
"maxLength": 2000,
"minLength": 1
},
"sender_address_type": {
"enum": [
"Address",
"Container",
"Manual"
],
"type": "string"
},
"recipient_address_id": {
"type": "string",
"maxLength": 255,
"minLength": 1
},
"sender_address_manual": {
"type": "object",
"required": [
"line1",
"city",
"zip"
],
"properties": {
"zip": {
"type": "string",
"maxLength": 20,
"minLength": 1
},
"city": {
"type": "string",
"minLength": 1
},
"line1": {
"type": "string",
"minLength": 1
},
"line2": {
"type": "string",
"minLength": 1
},
"state": {
"type": "string",
"maxLength": 60,
"minLength": 1
},
"country": {
"type": "string",
"maxLength": 2,
"minLength": 2
},
"countryCode": {
"type": "string",
"maxLength": 2,
"minLength": 2
}
}
},
"recipient_address_text": {
"type": "string",
"maxLength": 2000,
"minLength": 1
},
"recipient_address_type": {
"enum": [
"Address",
"Container",
"Manual"
],
"type": "string"
},
"use_workflow_recipient": {
"type": "boolean",
"description": "Deprecated compatibility field. Predefined and computed workflow recipients are always enforced and cannot be overridden."
},
"certified_return_receipt": {
"type": "boolean"
},
"recipient_address_manual": {
"type": "object",
"required": [
"line1",
"city",
"zip"
],
"properties": {
"zip": {
"type": "string",
"maxLength": 20,
"minLength": 1
},
"city": {
"type": "string",
"minLength": 1
},
"line1": {
"type": "string",
"minLength": 1
},
"line2": {
"type": "string",
"minLength": 1
},
"state": {
"type": "string",
"maxLength": 60,
"minLength": 1
},
"country": {
"type": "string",
"maxLength": 2,
"minLength": 2
},
"countryCode": {
"type": "string",
"maxLength": 2,
"minLength": 2
}
}
}
}
},
"outputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"view",
"order_id",
"page_count",
"price_usd",
"checkout_url",
"sender_name",
"sender_address_text",
"recipient_name",
"recipient_address_text"
],
"properties": {
"view": {
"type": "string",
"const": "order_draft"
},
"is_paid": {
"type": "boolean"
},
"payment": {
"type": "object",
"required": [
"view",
"protocol",
"order_id",
"request_id",
"endpoint",
"status",
"payment_status",
"payment_status_label",
"payment_status_description",
"paid_at",
"is_paid",
"price_usd",
"currency",
"mailpiece_type",
"postcard_size",
"order_complete_url"
],
"properties": {
"bulk": {
"type": "object",
"required": [
"campaign_id",
"recipient_count",
"content_mode",
"status",
"status_counts"
],
"properties": {
"status": {
"type": "string"
},
"campaign_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"content_mode": {
"enum": [
"text",
"html",
"pdf"
],
"type": "string"
},
"status_counts": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"recipient_count": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
},
"additionalProperties": false
},
"view": {
"type": "string",
"const": "machine_order"
},
"status": {
"type": "string"
},
"is_paid": {
"type": "boolean"
},
"paid_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"payment": {},
"currency": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"endpoint": {
"type": "string",
"format": "uri"
},
"order_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"protocol": {
"enum": [
"mpp",
"x402"
],
"type": "string"
},
"next_step": {
"type": "string"
},
"price_usd": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"page_count": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"request_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"status_url": {
"type": "string",
"format": "uri"
},
"next_action": {
"type": "string"
},
"preview_url": {
"anyOf": [
{
"type": "string",
"format": "uri"
},
{
"type": "null"
}
]
},
"campaign_url": {
"type": "string",
"format": "uri"
},
"checkout_url": {
"anyOf": [
{
"type": "string",
"format": "uri"
},
{
"type": "null"
}
]
},
"postcard_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"mailpiece_type": {
"enum": [
"letter",
"postcard"
],
"type": "string"
},
"payment_status": {
"type": "string"
},
"payment_options": {
"type": "array",
"items": {
"type": "object",
"required": [
"type"
],
"properties": {
"url": {
"type": "string",
"format": "uri"
},
"type": {
"type": "string"
}
},
"additionalProperties": false
}
},
"order_complete_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"payment_status_label": {
"type": "string"
},
"payment_status_description": {
"type": "string"
}
},
"additionalProperties": false
},
"order_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"price_usd": {
"anyOf": [
{
"type": "number",
"minimum": 0
},
{
"type": "null"
}
]
},
"page_count": {
"anyOf": [
{
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
},
{
"type": "null"
}
]
},
"preview_url": {
"anyOf": [
{
"type": "string",
"format": "uri"
},
{
"type": "null"
}
]
},
"sender_name": {
"type": "string",
"maxLength": 255,
"minLength": 1
},
"checkout_url": {
"anyOf": [
{
"type": "string",
"format": "uri"
},
{
"type": "null"
}
]
},
"payment_status": {
"type": "string"
},
"recipient_name": {
"type": "string",
"maxLength": 255,
"minLength": 1
},
"sender_company": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"checkout_session": {
"type": "object",
"required": [
"id",
"payment_provider",
"status",
"currency",
"line_items",
"totals",
"links"
],
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"links": {
"type": "array",
"items": {
"type": "object",
"required": [
"type"
],
"properties": {
"url": {
"type": "string",
"format": "uri"
},
"type": {
"enum": [
"terms_of_use",
"privacy_policy",
"seller_shop_policies"
],
"type": "string"
},
"value": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
}
},
"status": {
"enum": [
"not_ready_for_payment",
"ready_for_payment",
"completed",
"canceled"
],
"type": "string"
},
"totals": {
"type": "array",
"items": {
"type": "object",
"required": [
"type",
"display_text",
"amount"
],
"properties": {
"type": {
"enum": [
"items_base_amount",
"items_discount",
"subtotal",
"discount",
"fulfillment",
"tax",
"fee",
"total"
],
"type": "string"
},
"amount": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
},
"display_text": {
"type": "string",
"minLength": 1
}
},
"additionalProperties": false
}
},
"currency": {
"type": "string",
"minLength": 1
},
"line_items": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"item",
"base_amount",
"discount",
"subtotal",
"tax",
"total"
],
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"tax": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
},
"item": {
"type": "object",
"required": [
"id",
"quantity"
],
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"quantity": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
},
"additionalProperties": false
},
"total": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
},
"discount": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
},
"subtotal": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
},
"base_amount": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"additionalProperties": false
}
},
"payment_mode": {
"enum": [
"test",
"live"
],
"type": "string"
},
"payment_provider": {
"type": "object",
"required": [
"provider",
"supported_payment_methods"
],
"properties": {
"provider": {
"enum": [
"stripe",
"adyen"
],
"type": "string"
},
"merchant_id": {
"type": "string",
"minLength": 1
},
"supported_payment_methods": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"payment_protocol": {
"enum": [
"hosted",
"mpp"
],
"type": "string"
},
"delivery_estimate": {
"anyOf": [
{
"type": "object",
"required": [
"earliest",
"latest",
"label"
],
"properties": {
"label": {
"type": "string"
},
"latest": {
"type": "string"
},
"earliest": {
"type": "string"
},
"print_by": {
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
},
"recipient_company": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"sender_address_text": {
"type": "string"
},
"recipient_address_text": {
"type": "string"
}
},
"additionalProperties": false
},
"annotations": {
"readOnlyHint": false,
"openWorldHint": true,
"destructiveHint": false
}
}| certified |
| boolean |
| file_name | string |
| buyer_name * | string | Buyer name for receipts. |
| mail_class | string | one of ["standard","priority","express"] |
| request_id | string | Idempotency key. Reuse the same value and same order fields after a payment challenge. |
| buyer_email * | string | Buyer email for receipts. |
| sender_name * | string |
| double_sided | boolean |
| postcard_size | string | one of ["4x6","6x9","11x6"] |
| mailpiece_type | string | one of ["letter","postcard"] |
| recipient_name | string | Required for a single recipient. Omit when bulk supplies the recipient list. |
| payment_protocol | string | Direct machine payment protocol. Use mpp for Link CLI/Link MCP or Stripe SPT; use x402 for x402 wallet clients. Defaults to mpp. |
| payment_signature | string | x402 retry value after paying the PAYMENT-REQUIRED challenge. |
| sender_address_id | string |
| signature_required | boolean |
| sender_address_text | string |
| sender_address_type | string | one of ["Address","Manual"] |
| recipient_address_id | string |
| payment_authorization | string | MPP retry value after paying with Link CLI/Link MCP. Pass the full Authorization header value, usually "Payment ...". |
| sender_address_manual | object |
| recipient_address_text | string |
| recipient_address_type | string | one of ["Address","Manual"] |
| certified_return_receipt | boolean |
| recipient_address_manual | object |
{
"name": "postalform.create_machine_order",
"title": "Create or pay a machine order",
"description": "Create a single PDF, letter, workflow-form order, or bulk letter campaign and pay through MPP or x402 after buyer approval. For bulk, provide exactly one of bulk.csv_content or bulk.recipients (JSON address objects with optional merge_fields), plus a shared PDF or text/HTML template. Omit top-level recipient fields and review campaign_url, recipient count and total. Bulk MPP orders can also use postalform.pay_order after fetching its challenge. The unpaid response also includes checkout_url and status_url for this same order. Without an available compatible wallet, give the buyer checkout_url and poll status_url; never recreate the order to change payment paths. Single-recipient clients with a Stripe shared payment token can instead use a draft tool followed by complete_checkout; other clients should present the hosted checkout URL.",
"inputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"buyer_name",
"buyer_email",
"sender_name"
],
"properties": {
"pdf": {
"anyOf": [
{
"type": "object",
"required": [
"download_url",
"file_id"
],
"properties": {
"file_id": {
"type": "string"
},
"download_url": {
"type": "string",
"format": "uri"
}
}
},
{
"type": "object",
"required": [
"upload_token"
],
"properties": {
"upload_token": {
"type": "string",
"minLength": 1
}
}
},
{
"type": "string",
"minLength": 1
}
],
"description": "Existing PDF to mail. For a single recipient, provide exactly one of pdf, letter, or form. For bulk.content_mode=pdf, this PDF is sent to every CSV or JSON recipient. Prefer upload_token from postalform.create_pdf_upload."
},
"bulk": {
"type": "object",
"required": [
"content_mode"
],
"properties": {
"recipients": {
"type": "array",
"items": {
"type": "object",
"required": [
"line1",
"city",
"zip"
],
"properties": {
"zip": {
"type": "string",
"minLength": 1,
"description": "ZIP/postal code as a string, preserving leading zeros."
},
"city": {
"type": "string",
"minLength": 1
},
"line1": {
"type": "string",
"minLength": 1
},
"line2": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"state": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "Required for US and Canadian recipients. Omit or send null elsewhere."
},
"country": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "Mailing country code. Defaults to US."
},
"merge_fields": {
"type": "object",
"description": "Optional template values. {{field_name}} inserts a value as plain text (HTML-escaped in html mode); in html mode, {{{field_name}}} inserts it as HTML. Address field names and full_address are reserved.",
"propertyNames": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]*$"
},
"additionalProperties": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
]
}
},
"recipient_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
"minItems": 1,
"description": "JSON recipient list, mutually exclusive with csv_content. Each address can include merge_fields for text/HTML templates."
},
"csv_content": {
"type": "string",
"minLength": 1,
"description": "Recipient CSV text, mutually exclusive with recipients. Required columns: line1, city, state, zip. Optional: recipient_name, line2, country. Other columns can be used as merge fields."
},
"content_mode": {
"enum": [
"text",
"html",
"pdf"
],
"type": "string",
"description": "pdf sends the same top-level PDF to every recipient; text/html render template_text/template_html with CSV columns or JSON merge_fields."
},
"campaign_name": {
"type": "string",
"maxLength": 255
},
"template_html": {
"type": "string",
"description": "HTML letter template. {{field}} inserts a merge value as escaped text; {{{field}}} inserts it as HTML (use this for per-recipient HTML bodies). Scripts and remote resources are not loaded; embed images as data: URLs."
},
"template_text": {
"type": "string",
"description": "Plain-text letter template. {{field}} inserts a merge value; HTML is not allowed."
}
},
"description": "Bulk letter campaign: exactly one of csv_content or recipients (JSON list), plus shared PDF or text/HTML template. Omit single-recipient fields, letter, form, and postcard options. color and double_sided apply to every mailpiece.",
"additionalProperties": false
},
"form": {
"type": "object",
"required": [
"slug"
],
"properties": {
"slug": {
"type": "string",
"minLength": 1
},
"fields": {
"type": "object",
"default": {},
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"attachments": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"base64"
],
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"label": {
"type": "string",
"minLength": 1
},
"base64": {
"type": "string",
"minLength": 1
},
"file_name": {
"type": "string",
"maxLength": 255,
"minLength": 1
},
"content_type": {
"type": "string",
"minLength": 1
}
}
}
}
},
"description": "Workflow form payload from postalform.get_form_schema. Provide exactly one of pdf, letter, or form."
},
"color": {
"type": "boolean"
},
"letter": {
"type": "object",
"required": [
"body"
],
"properties": {
"body": {
"type": "string",
"maxLength": 20000,
"minLength": 1
},
"title": {
"type": "string",
"maxLength": 200
},
"format": {
"enum": [
"text",
"html",
"markdown",
"rtf"
],
"type": "string"
},
"render": {
"type": "object",
"properties": {
"font": {
"enum": [
"times",
"helvetica"
],
"type": "string"
},
"paper": {
"type": "string",
"const": "letter"
},
"font_size": {
"type": "integer",
"maximum": 14,
"minimum": 9
},
"margin_in": {
"type": "number",
"maximum": 1.5,
"minimum": 0.5
}
}
},
"signature": {
"anyOf": [
{
"type": "string",
"maxLength": 2000
},
{
"type": "object",
"properties": {
"mode": {
"enum": [
"typed",
"drawn"
],
"type": "string"
},
"text": {
"type": "string",
"maxLength": 2000
},
"dataUrl": {
"type": "string"
},
"printDataUrl": {
"type": "string"
}
},
"additionalProperties": false
}
]
}
},
"description": "Letter text to render and mail. Provide exactly one of pdf, letter, or form. Optional format may be text, html, markdown, or rtf; default is text. Optional signature may be a typed string or drawn signature payload."
},
"certified": {
"type": "boolean"
},
"file_name": {
"type": "string",
"maxLength": 255,
"minLength": 1
},
"buyer_name": {
"type": "string",
"maxLength": 256,
"minLength": 1,
"description": "Buyer name for receipts."
},
"mail_class": {
"enum": [
"standard",
"priority",
"express"
],
"type": "string"
},
"request_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Idempotency key. Reuse the same value and same order fields after a payment challenge."
},
"buyer_email": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
"maxLength": 256,
"description": "Buyer email for receipts."
},
"sender_name": {
"type": "string",
"maxLength": 255,
"minLength": 1
},
"double_sided": {
"type": "boolean"
},
"postcard_size": {
"enum": [
"4x6",
"6x9",
"11x6"
],
"type": "string"
},
"mailpiece_type": {
"enum": [
"letter",
"postcard"
],
"type": "string"
},
"recipient_name": {
"type": "string",
"maxLength": 255,
"minLength": 1,
"description": "Required for a single recipient. Omit when bulk supplies the recipient list."
},
"payment_protocol": {
"enum": [
"mpp",
"x402"
],
"type": "string",
"description": "Direct machine payment protocol. Use mpp for Link CLI/Link MCP or Stripe SPT; use x402 for x402 wallet clients. Defaults to mpp."
},
"payment_signature": {
"type": "string",
"minLength": 1,
"description": "x402 retry value after paying the PAYMENT-REQUIRED challenge."
},
"sender_address_id": {
"type": "string",
"minLength": 1
},
"signature_required": {
"type": "boolean"
},
"sender_address_text": {
"type": "string",
"maxLength": 2000,
"minLength": 1
},
"sender_address_type": {
"enum": [
"Address",
"Manual"
],
"type": "string"
},
"recipient_address_id": {
"type": "string",
"minLength": 1
},
"payment_authorization": {
"type": "string",
"minLength": 1,
"description": "MPP retry value after paying with Link CLI/Link MCP. Pass the full Authorization header value, usually \"Payment ...\"."
},
"sender_address_manual": {
"type": "object",
"required": [
"line1",
"city",
"zip"
],
"properties": {
"zip": {
"type": "string",
"maxLength": 20,
"minLength": 1
},
"city": {
"type": "string",
"minLength": 1
},
"line1": {
"type": "string",
"minLength": 1
},
"line2": {
"type": "string",
"minLength": 1
},
"state": {
"type": "string",
"maxLength": 60,
"minLength": 1
},
"country": {
"type": "string",
"maxLength": 2,
"minLength": 2
},
"countryCode": {
"type": "string",
"maxLength": 2,
"minLength": 2
}
}
},
"recipient_address_text": {
"type": "string",
"maxLength": 2000,
"minLength": 1
},
"recipient_address_type": {
"enum": [
"Address",
"Manual"
],
"type": "string"
},
"certified_return_receipt": {
"type": "boolean"
},
"recipient_address_manual": {
"type": "object",
"required": [
"line1",
"city",
"zip"
],
"properties": {
"zip": {
"type": "string",
"maxLength": 20,
"minLength": 1
},
"city": {
"type": "string",
"minLength": 1
},
"line1": {
"type": "string",
"minLength": 1
},
"line2": {
"type": "string",
"minLength": 1
},
"state": {
"type": "string",
"maxLength": 60,
"minLength": 1
},
"country": {
"type": "string",
"maxLength": 2,
"minLength": 2
},
"countryCode": {
"type": "string",
"maxLength": 2,
"minLength": 2
}
}
}
}
},
"outputSchema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"view",
"protocol",
"order_id",
"request_id",
"endpoint",
"status",
"payment_status",
"payment_status_label",
"payment_status_description",
"paid_at",
"is_paid",
"price_usd",
"currency",
"mailpiece_type",
"postcard_size",
"order_complete_url"
],
"properties": {
"bulk": {
"type": "object",
"required": [
"campaign_id",
"recipient_count",
"content_mode",
"status",
"status_counts"
],
"properties": {
"status": {
"type": "string"
},
"campaign_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"content_mode": {
"enum": [
"text",
"html",
"pdf"
],
"type": "string"
},
"status_counts": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"recipient_count": {
"type": "integer",
"maximum": 9007199254740991,
"exclusiveMinimum": 0
}
},
"additionalProperties": false
},
"view": {
"type": "string",
"const": "machine_order"
},
"status": {
"type": "string"
},
"is_paid": {
"type": "boolean"
},
"paid_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"payment": {},
"currency": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"endpoint": {
"type": "string",
"format": "uri"
},
"order_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"protocol": {
"enum": [
"mpp",
"x402"
],
"type": "string"
},
"next_step": {
"type": "string"
},
"price_usd": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"page_count": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"request_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"status_url": {
"type": "string",
"format": "uri"
},
"next_action": {
"type": "string"
},
"preview_url": {
"anyOf": [
{
"type": "string",
"format": "uri"
},
{
"type": "null"
}
]
},
"campaign_url": {
"type": "string",
"format": "uri"
},
"checkout_url": {
"anyOf": [
{
"type": "string",
"format": "uri"
},
{
"type": "null"
}
]
},
"postcard_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"mailpiece_type": {
"enum": [
"letter",
"postcard"
],
"type": "string"
},
"payment_status": {
"type": "string"
},
"payment_options": {
"type": "array",
"items": {
"type": "object",
"required": [
"type"
],
"properties": {
"url": {
"type": "string",
"format": "uri"
},
"type": {
"type": "string"
}
},
"additionalProperties": false
}
},
"order_complete_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"payment_status_label": {
"type": "string"
},
"payment_status_description": {
"type": "string"
}
},
"additionalProperties": false
},
"annotations": {
"readOnlyHint": false,
"openWorldHint": true,
"destructiveHint": false
}
}