PostalForm Machine Payments API

Machine-oriented print-and-mail REST API for autonomous agents: validate and quote, then create, pay for and poll document mail orders (PDF, server-rendered letter in text/html/markdown/rtf, workflow form, or CSV bulk campaign), flower letters and MPP-only shipping labels. No API key — every paid create answers HTTP 402 with an x402 PAYMENT-REQUIRED header (USDC on Base, Coinbase CDP facilitator) or MPP WWW-Authenticate: Payment challenges (Tempo, Stripe shared payment token, card), and the retry reuses the same request_id, which the contract treats as a strict idempotency key. 17 operations across 17 paths, OpenAPI 3.1.0 with x-payment-info and x-agent-guidance extensions, served at https://postalform.com/openapi.json.

Operations 17

GET /api/machine/forms List workflow forms available to machine order flows #
GET /api/machine/forms/{slug}/schema Get a machine-usable workflow form schema #
POST /api/machine/orders/validate Validate an x402 machine order and return a quote #
POST /api/machine/orders Create or reuse an x402 machine order #
GET /api/machine/orders/{id} Get x402 machine order status #
POST /api/machine/flower-letters/validate Validate an x402 flower-letter order and return a Florist One quote #
POST /api/machine/flower-letters Create or reuse an x402 flower-letter order #
GET /api/machine/flower-letters/{id} Get x402 flower-letter order status #
POST /api/machine/mpp/orders/validate Validate an MPP machine order and return a quote #
POST /api/machine/mpp/orders Create or reuse an MPP machine order #
GET /api/machine/mpp/orders/{id} Get MPP machine order status #
POST /api/machine/mpp/flower-letters/validate Validate an MPP flower-letter order and return a Florist One quote #
POST /api/machine/mpp/flower-letters Create or reuse an MPP flower-letter order #
GET /api/machine/mpp/flower-letters/{id} Get MPP flower-letter order status #
POST /api/machine/mpp/shipping-labels/validate Validate an MPP shipping-label request and return live rates #
POST /api/machine/mpp/shipping-labels Create, pay for, and download an MPP shipping label #
GET /api/machine/mpp/shipping-labels/{id} Get MPP shipping-label payment, fulfillment, and download status #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/postalform-machine-payments-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

postalform-com-machine-payments-openapi.json Raw ↑
{"openapi":"3.1.0","info":{"title":"PostalForm Machine Payments API","version":"1.0.0","description":"Machine-oriented print-and-mail endpoints for x402 and MPP payment flows.\n\nUse OpenAPI as the canonical discovery source for this origin. The /.well-known/x402 manifest is a lightweight compatibility layer for crawlers and agent runtimes that do not yet ingest the full OpenAPI document.\n\nFor both machine payment families, call the validate endpoint first to verify the payload and get a quote before attempting payment.\n\nWhen retrying a create call after a 402 challenge, reuse the same request_id and the exact same JSON body. PostalForm treats request_id as the strict idempotency key and rejects payload drift for that request_id.\n\nIf you intend to send the same document to the same addresses again after a prior order is paid or settled, generate a fresh request_id. PostalForm only collapses recent unpaid duplicate drafts.\n\nFor each address party, choose exactly one strategy: Address with *_address_id and *_address_text, or Manual with *_address_manual. Do not send both strategies for the same party.\n\nAddress countries default to US when omitted. For international manual addresses, include countryCode; for Loqate addresses, the id prefix carries the country. Both modes accept exactly the same mailing countries offered by PostalForm's checkout address picker: US, CA, AT, BE, CH, DE, ES, FR, GB, IN, LU, NL.\n\nPrefer pdf as { \"upload_token\": \"...\" } when you already have a finished PDF. The create endpoint also accepts { download_url, file_id }, a data:application/pdf;base64 URL, or an allowlisted HTTPS URL.\n\nFor server-rendered letters, send a top-level letter value instead of pdf. letter may be a string or an object with body, title, signature, render options, and format. signature may be a string or { mode: \"typed\" | \"drawn\", text?, dataUrl?, printDataUrl? }. format can be text, html, markdown, or rtf; default is text.\n\nUnpaid single-recipient create responses may include preview_url, a signed short-lived URL for reviewing the generated or uploaded PDF before payment.\n\nFor supported single-mailpiece workflow forms, discover forms with GET /api/machine/forms, fetch GET /api/machine/forms/{slug}/schema, then send a top-level form object instead of pdf or letter to the same create/validate endpoints. Statutory multi-recipient workflows are intentionally excluded.\n\nFor bulk mailing campaigns, send a bulk object instead of recipient_name and recipient address fields. bulk.csv_content holds the recipient CSV, bulk.content_mode selects text, html, or pdf rendering, and validation returns bulk.recipient_count plus bulk.content_mode.\n\nBulk machine create and poll responses may include campaign_url. Use that route to inspect row-level mailed-item status, delivery events, and tracking for each CSV recipient.\n\nFor flower letters, use the dedicated /api/machine/flower-letters or /api/machine/mpp/flower-letters endpoints. They require a Florist One product code, recipient ZIP, delivery date, full delivery address, and a 200-character card note.\n\nFor MPP-only shipping labels, use /api/machine/mpp/shipping-labels. Include exact packed weight in ounces and all three parcel dimensions in inches. Validate first, then reuse the identical request_id and body after the 402 challenge. A successful immediate payment returns a signed PDF download URL; delayed settlements expose it from the status endpoint and order completion page once fulfillment finishes.\n\nFor postcards, keep using the same endpoints and payment flow. Set mailpiece_type to postcard, provide postcard_size, and supply pdf as the fully composed postcard PDF. Lob-routed international postcards require postcard_size=\"4x6\" and a U.S. sender/return address; larger international postcards or international postcards with non-U.S. return addresses route to PostGrid before provider submission. See https://postalform.com/postcard-pdf-guidelines for the required 2-page bleed templates and mailing-side layout.\n\nUse POST /api/machine/orders for x402. The server returns 402 with PAYMENT-REQUIRED and expects PAYMENT-SIGNATURE on retry.\n\nUse POST /api/machine/mpp/orders for MPP. The server returns 402 with one or more WWW-Authenticate: Payment challenges and expects Authorization: Payment on retry.\n\nPoll GET /api/machine/orders/{id} or GET /api/machine/mpp/orders/{id} until payment_status becomes paid or the order reaches its terminal status. Those status endpoints accept either the canonical order_id or any aliased request_id returned during create/validate.","license":{"name":"Proprietary","url":"https://postalform.com/terms"},"x-agent-guidance":"Use OpenAPI as the canonical discovery source for this origin. The /.well-known/x402 manifest is a lightweight compatibility layer for crawlers and agent runtimes that do not yet ingest the full OpenAPI document.\n\nFor both machine payment families, call the validate endpoint first to verify the payload and get a quote before attempting payment.\n\nWhen retrying a create call after a 402 challenge, reuse the same request_id and the exact same JSON body. PostalForm treats request_id as the strict idempotency key and rejects payload drift for that request_id.\n\nIf you intend to send the same document to the same addresses again after a prior order is paid or settled, generate a fresh request_id. PostalForm only collapses recent unpaid duplicate drafts.\n\nFor each address party, choose exactly one strategy: Address with *_address_id and *_address_text, or Manual with *_address_manual. Do not send both strategies for the same party.\n\nAddress countries default to US when omitted. For international manual addresses, include countryCode; for Loqate addresses, the id prefix carries the country. Both modes accept exactly the same mailing countries offered by PostalForm's checkout address picker: US, CA, AT, BE, CH, DE, ES, FR, GB, IN, LU, NL.\n\nPrefer pdf as { \"upload_token\": \"...\" } when you already have a finished PDF. The create endpoint also accepts { download_url, file_id }, a data:application/pdf;base64 URL, or an allowlisted HTTPS URL.\n\nFor server-rendered letters, send a top-level letter value instead of pdf. letter may be a string or an object with body, title, signature, render options, and format. signature may be a string or { mode: \"typed\" | \"drawn\", text?, dataUrl?, printDataUrl? }. format can be text, html, markdown, or rtf; default is text.\n\nUnpaid single-recipient create responses may include preview_url, a signed short-lived URL for reviewing the generated or uploaded PDF before payment.\n\nFor supported single-mailpiece workflow forms, discover forms with GET /api/machine/forms, fetch GET /api/machine/forms/{slug}/schema, then send a top-level form object instead of pdf or letter to the same create/validate endpoints. Statutory multi-recipient workflows are intentionally excluded.\n\nFor bulk mailing campaigns, send a bulk object instead of recipient_name and recipient address fields. bulk.csv_content holds the recipient CSV, bulk.content_mode selects text, html, or pdf rendering, and validation returns bulk.recipient_count plus bulk.content_mode.\n\nBulk machine create and poll responses may include campaign_url. Use that route to inspect row-level mailed-item status, delivery events, and tracking for each CSV recipient.\n\nFor flower letters, use the dedicated /api/machine/flower-letters or /api/machine/mpp/flower-letters endpoints. They require a Florist One product code, recipient ZIP, delivery date, full delivery address, and a 200-character card note.\n\nFor MPP-only shipping labels, use /api/machine/mpp/shipping-labels. Include exact packed weight in ounces and all three parcel dimensions in inches. Validate first, then reuse the identical request_id and body after the 402 challenge. A successful immediate payment returns a signed PDF download URL; delayed settlements expose it from the status endpoint and order completion page once fulfillment finishes.\n\nFor postcards, keep using the same endpoints and payment flow. Set mailpiece_type to postcard, provide postcard_size, and supply pdf as the fully composed postcard PDF. Lob-routed international postcards require postcard_size=\"4x6\" and a U.S. sender/return address; larger international postcards or international postcards with non-U.S. return addresses route to PostGrid before provider submission. See https://postalform.com/postcard-pdf-guidelines for the required 2-page bleed templates and mailing-side layout.\n\nUse POST /api/machine/orders for x402. The server returns 402 with PAYMENT-REQUIRED and expects PAYMENT-SIGNATURE on retry.\n\nUse POST /api/machine/mpp/orders for MPP. The server returns 402 with one or more WWW-Authenticate: Payment challenges and expects Authorization: Payment on retry.\n\nPoll GET /api/machine/orders/{id} or GET /api/machine/mpp/orders/{id} until payment_status becomes paid or the order reaches its terminal status. Those status endpoints accept either the canonical order_id or any aliased request_id returned during create/validate."},"security":[],"servers":[{"url":"https://postalform.com"}],"paths":{"/api/machine/forms":{"get":{"operationId":"listMachineForms","summary":"List workflow forms available to machine order flows","description":"Search published single-mailpiece PostalForm workflow forms that agents can fill and submit through the x402 or MPP machine order endpoints. Coordinated statutory multi-recipient workflows are excluded.","parameters":[{"name":"q","in":"query","required":false,"description":"Optional slug/name search string.","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Page size, 1 to 200. Defaults to 50.","schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"description":"Cursor returned by the previous list response.","schema":{"type":"string"}}],"responses":{"200":{"description":"Machine workflow form catalog","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineWorkflowFormListResponse"}}}},"400":{"description":"Invalid form catalog query","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineErrorResponse"}}}}}}},"/api/machine/forms/{slug}/schema":{"get":{"operationId":"getMachineFormSchema","summary":"Get a machine-usable workflow form schema","parameters":[{"name":"slug","in":"path","required":true,"description":"Workflow form slug from GET /api/machine/forms.","schema":{"type":"string"}}],"responses":{"200":{"description":"Machine workflow form schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineWorkflowFormSchema"}}}},"404":{"description":"Form not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineErrorResponse"}}}}}}},"/api/machine/orders/validate":{"post":{"operationId":"validateMachineOrder","summary":"Validate an x402 machine order and return a quote","requestBody":{"required":true,"description":"Quote and validate an x402 machine order without triggering payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineOrderRequest"},"examples":{"default":{"value":{"request_id":"8c1a1b58-2c8f-4f4f-9c46-2c1ac32d7a1b","buyer_name":"Agent Owner","buyer_email":"owner@example.com","pdf":{"upload_token":"pfu_123"},"file_name":"letter.pdf","sender_name":"Sender Example","sender_address_type":"Address","sender_address_id":"US|LP|Pz0_Qj4_bGJg|16074807|13_ENG","sender_address_text":"123 Sender St, Springfield, IL 62701","recipient_name":"Recipient Example","recipient_address_type":"Address","recipient_address_id":"US|LP|Pz0_Qj4_bGJg|199825276|99_ENG","recipient_address_text":"456 Recipient Ave, Springfield, IL 62701","double_sided":true,"color":false,"mail_class":"standard","certified":false,"certified_return_receipt":false,"return_receipt_format":"electronic","restricted_delivery":false,"err_delivery":"manual"}},"workflow_form":{"value":{"request_id":"8c1a1b58-2c8f-4f4f-9c46-2c1ac32d7a1b","buyer_name":"Agent Owner","buyer_email":"owner@example.com","form":{"slug":"5471","fields":{"foreign_corporation_period_begin":"01/01/2025","foreign_corporation_period_end":"12/31/2025","field_5":"Example Corporation Inc.","field_11":"123-45-6789","field_6":"123 Market St","field_8":"Wilmington","field_9":"DE","field_10":"19801"}},"file_name":"5471.pdf","sender_name":"Sender Example","sender_address_type":"Address","sender_address_id":"US|LP|Pz0_Qj4_bGJg|16074807|13_ENG","sender_address_text":"123 Sender St, Springfield, IL 62701","recipient_name":"Recipient Example","recipient_address_type":"Address","recipient_address_id":"US|LP|Pz0_Qj4_bGJg|199825276|99_ENG","recipient_address_text":"456 Recipient Ave, Springfield, IL 62701","double_sided":true,"color":false,"mail_class":"standard","certified":false,"certified_return_receipt":false}},"rendered_letter":{"value":{"request_id":"8c1a1b58-2c8f-4f4f-9c46-2c1ac32d7a1b","buyer_name":"Agent Owner","buyer_email":"owner@example.com","letter":{"title":"Account notice","format":"markdown","body":"# Account notice\n\nPlease review the enclosed account update and contact us with any questions.","signature":"Sender Example"},"file_name":"account-notice.pdf","sender_name":"Sender Example","sender_address_type":"Address","sender_address_id":"US|LP|Pz0_Qj4_bGJg|16074807|13_ENG","sender_address_text":"123 Sender St, Springfield, IL 62701","recipient_name":"Recipient Example","recipient_address_type":"Address","recipient_address_id":"US|LP|Pz0_Qj4_bGJg|199825276|99_ENG","recipient_address_text":"456 Recipient Ave, Springfield, IL 62701","double_sided":true,"color":false,"mail_class":"standard","certified":false,"certified_return_receipt":false}},"bulk_text":{"value":{"request_id":"8c1a1b58-2c8f-4f4f-9c46-2c1ac32d7a1b","buyer_name":"Agent Owner","buyer_email":"owner@example.com","sender_name":"Sender Example","sender_address_type":"Address","sender_address_id":"US|LP|Pz0_Qj4_bGJg|16074807|13_ENG","sender_address_text":"123 Sender St, Springfield, IL 62701","double_sided":true,"color":false,"mail_class":"standard","certified":false,"certified_return_receipt":false,"bulk":{"campaign_name":"April Outreach","csv_content":"recipient_name,line1,line2,city,state,zip,account_number\nJane Doe,123 Main St,,Springfield,IL,62701,ACCT-100\nJohn Smith,456 Oak Ave,Apt 2,Chicago,IL,60601,ACCT-200","content_mode":"text","template_text":"Hello {{recipient_name}}, your account reference is {{account_number}}."}}}}}}},"responses":{"200":{"description":"Validation succeeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineOrderValidationResponse"}}}},"409":{"description":"request_id already exists with a different payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineErrorResponse"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineErrorResponse"}}}}}}},"/api/machine/orders":{"post":{"operationId":"createMachineOrder","summary":"Create or reuse an x402 machine order","description":"Unauthenticated calls return 402 Payment Required when the order is ready to be paid. Retry the exact same body with PAYMENT-SIGNATURE after settlement. A 202 settled_pending_webhook response means Stripe is verifying the transaction; poll status and do not pay again.","requestBody":{"required":true,"description":"Create or reuse an x402 machine order. Reuse the same request_id and identical JSON body after a 402 response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineOrderRequest"},"examples":{"default":{"value":{"request_id":"8c1a1b58-2c8f-4f4f-9c46-2c1ac32d7a1b","buyer_name":"Agent Owner","buyer_email":"owner@example.com","pdf":{"upload_token":"pfu_123"},"file_name":"letter.pdf","sender_name":"Sender Example","sender_address_type":"Address","sender_address_id":"US|LP|Pz0_Qj4_bGJg|16074807|13_ENG","sender_address_text":"123 Sender St, Springfield, IL 62701","recipient_name":"Recipient Example","recipient_address_type":"Address","recipient_address_id":"US|LP|Pz0_Qj4_bGJg|199825276|99_ENG","recipient_address_text":"456 Recipient Ave, Springfield, IL 62701","double_sided":true,"color":false,"mail_class":"standard","certified":false,"certified_return_receipt":false,"return_receipt_format":"electronic","restricted_delivery":false,"err_delivery":"manual"}},"workflow_form":{"value":{"request_id":"8c1a1b58-2c8f-4f4f-9c46-2c1ac32d7a1b","buyer_name":"Agent Owner","buyer_email":"owner@example.com","form":{"slug":"5471","fields":{"foreign_corporation_period_begin":"01/01/2025","foreign_corporation_period_end":"12/31/2025","field_5":"Example Corporation Inc.","field_11":"123-45-6789","field_6":"123 Market St","field_8":"Wilmington","field_9":"DE","field_10":"19801"}},"file_name":"5471.pdf","sender_name":"Sender Example","sender_address_type":"Address","sender_address_id":"US|LP|Pz0_Qj4_bGJg|16074807|13_ENG","sender_address_text":"123 Sender St, Springfield, IL 62701","recipient_name":"Recipient Example","recipient_address_type":"Address","recipient_address_id":"US|LP|Pz0_Qj4_bGJg|199825276|99_ENG","recipient_address_text":"456 Recipient Ave, Springfield, IL 62701","double_sided":true,"color":false,"mail_class":"standard","certified":false,"certified_return_receipt":false}},"rendered_letter":{"value":{"request_id":"8c1a1b58-2c8f-4f4f-9c46-2c1ac32d7a1b","buyer_name":"Agent Owner","buyer_email":"owner@example.com","letter":{"title":"Account notice","format":"markdown","body":"# Account notice\n\nPlease review the enclosed account update and contact us with any questions.","signature":"Sender Example"},"file_name":"account-notice.pdf","sender_name":"Sender Example","sender_address_type":"Address","sender_address_id":"US|LP|Pz0_Qj4_bGJg|16074807|13_ENG","sender_address_text":"123 Sender St, Springfield, IL 62701","recipient_name":"Recipient Example","recipient_address_type":"Address","recipient_address_id":"US|LP|Pz0_Qj4_bGJg|199825276|99_ENG","recipient_address_text":"456 Recipient Ave, Springfield, IL 62701","double_sided":true,"color":false,"mail_class":"standard","certified":false,"certified_return_receipt":false}},"bulk_text":{"value":{"request_id":"8c1a1b58-2c8f-4f4f-9c46-2c1ac32d7a1b","buyer_name":"Agent Owner","buyer_email":"owner@example.com","sender_name":"Sender Example","sender_address_type":"Address","sender_address_id":"US|LP|Pz0_Qj4_bGJg|16074807|13_ENG","sender_address_text":"123 Sender St, Springfield, IL 62701","double_sided":true,"color":false,"mail_class":"standard","certified":false,"certified_return_receipt":false,"bulk":{"campaign_name":"April Outreach","csv_content":"recipient_name,line1,line2,city,state,zip,account_number\nJane Doe,123 Main St,,Springfield,IL,62701,ACCT-100\nJohn Smith,456 Oak Ave,Apt 2,Chicago,IL,60601,ACCT-200","content_mode":"text","template_text":"Hello {{recipient_name}}, your account reference is {{account_number}}."}}}}}}},"x-payment-info":{"protocols":["x402"],"pricingMode":"range","minPrice":"3.40","maxPrice":"200.00"},"responses":{"200":{"description":"Existing machine order is already paid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineOrder"}}}},"202":{"description":"Payment settled and order is pending finalization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineOrder"}}}},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/X402PaymentRequiredResponse"}}}},"409":{"description":"request_id already exists with a different payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineErrorResponse"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineErrorResponse"}}}}}}},"/api/machine/orders/{id}":{"get":{"operationId":"getMachineOrder","summary":"Get x402 machine order status","parameters":[{"name":"id","in":"path","required":true,"description":"Canonical order_id or any aliased request_id returned by the create or validate call.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Machine order status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineOrderStatus"}}}},"404":{"description":"Order not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineErrorResponse"}}}}}}},"/api/machine/flower-letters/validate":{"post":{"operationId":"validateMachineFlowerLetter","summary":"Validate an x402 flower-letter order and return a Florist One quote","requestBody":{"required":true,"description":"Quote and validate a dedicated flower-letter order without triggering payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineFlowerLetterRequest"},"examples":{"default":{"value":{"request_id":"8c1a1b58-2c8f-4f4f-9c46-2c1ac32d7a1b","buyer_name":"Agent Owner","buyer_email":"owner@example.com","note":"For your desk, your day, and the smile I hope this brings.","zipcode":"32503","product_code":"F1-509","delivery_date":"2026-05-08","customer":{"name":"Agent Owner","phone":"8505550100","address1":"123 Sender St","city":"Pensacola","state":"FL","zipcode":"32503","country":"US","email":"owner@example.com"},"recipient":{"name":"Recipient Example","phone":"8505550199","address1":"456 Recipient Ave","city":"Pensacola","state":"FL","zipcode":"32503","country":"US"},"allow_substitutions":true}}}}}},"responses":{"200":{"description":"Validation succeeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineFlowerLetterValidationResponse"}}}},"409":{"description":"request_id already exists with a different payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineErrorResponse"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineErrorResponse"}}}}}}},"/api/machine/flower-letters":{"post":{"operationId":"createMachineFlowerLetter","summary":"Create or reuse an x402 flower-letter order","description":"Unauthenticated calls return 402 Payment Required after PostalForm validates the Florist One product, delivery ZIP, delivery date, and final quote. A 202 settled_pending_webhook response means Stripe is verifying the transaction; poll status and do not pay again.","requestBody":{"required":true,"description":"Create or reuse a dedicated x402 flower-letter order. Reuse the same request_id and identical JSON body after a 402 response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineFlowerLetterRequest"},"examples":{"default":{"value":{"request_id":"8c1a1b58-2c8f-4f4f-9c46-2c1ac32d7a1b","buyer_name":"Agent Owner","buyer_email":"owner@example.com","note":"For your desk, your day, and the smile I hope this brings.","zipcode":"32503","product_code":"F1-509","delivery_date":"2026-05-08","customer":{"name":"Agent Owner","phone":"8505550100","address1":"123 Sender St","city":"Pensacola","state":"FL","zipcode":"32503","country":"US","email":"owner@example.com"},"recipient":{"name":"Recipient Example","phone":"8505550199","address1":"456 Recipient Ave","city":"Pensacola","state":"FL","zipcode":"32503","country":"US"},"allow_substitutions":true}}}}}},"x-payment-info":{"protocols":["x402"],"pricingMode":"dynamic","minPrice":"1.00","maxPrice":"250.00"},"responses":{"200":{"description":"Existing flower-letter order is already paid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineFlowerLetterOrder"}}}},"202":{"description":"Payment settled and provider submission is queued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineFlowerLetterOrder"}}}},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowerLetterPaymentRequiredResponse"}}}},"409":{"description":"request_id already exists with a different payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineErrorResponse"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineErrorResponse"}}}}}}},"/api/machine/flower-letters/{id}":{"get":{"operationId":"getMachineFlowerLetter","summary":"Get x402 flower-letter order status","parameters":[{"name":"id","in":"path","required":true,"description":"Canonical order_id or any aliased request_id returned by the create or validate call.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Flower-letter order status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineFlowerLetterOrder"}}}},"404":{"description":"Order not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineErrorResponse"}}}}}}},"/api/machine/mpp/orders/validate":{"post":{"operationId":"validateMppMachineOrder","summary":"Validate an MPP machine order and return a quote","requestBody":{"required":true,"description":"Quote and validate an MPP machine order without triggering payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineOrderRequest"},"examples":{"default":{"value":{"request_id":"8c1a1b58-2c8f-4f4f-9c46-2c1ac32d7a1b","buyer_name":"Agent Owner","buyer_email":"owner@example.com","pdf":{"upload_token":"pfu_123"},"file_name":"letter.pdf","sender_name":"Sender Example","sender_address_type":"Address","sender_address_id":"US|LP|Pz0_Qj4_bGJg|16074807|13_ENG","sender_address_text":"123 Sender St, Springfield, IL 62701","recipient_name":"Recipient Example","recipient_address_type":"Address","recipient_address_id":"US|LP|Pz0_Qj4_bGJg|199825276|99_ENG","recipient_address_text":"456 Recipient Ave, Springfield, IL 62701","double_sided":true,"color":false,"mail_class":"standard","certified":false,"certified_return_receipt":false,"return_receipt_format":"electronic","restricted_delivery":false,"err_delivery":"manual"}},"workflow_form":{"value":{"request_id":"8c1a1b58-2c8f-4f4f-9c46-2c1ac32d7a1b","buyer_name":"Agent Owner","buyer_email":"owner@example.com","form":{"slug":"5471","fields":{"foreign_corporation_period_begin":"01/01/2025","foreign_corporation_period_end":"12/31/2025","field_5":"Example Corporation Inc.","field_11":"123-45-6789","field_6":"123 Market St","field_8":"Wilmington","field_9":"DE","field_10":"19801"}},"file_name":"5471.pdf","sender_name":"Sender Example","sender_address_type":"Address","sender_address_id":"US|LP|Pz0_Qj4_bGJg|16074807|13_ENG","sender_address_text":"123 Sender St, Springfield, IL 62701","recipient_name":"Recipient Example","recipient_address_type":"Address","recipient_address_id":"US|LP|Pz0_Qj4_bGJg|199825276|99_ENG","recipient_address_text":"456 Recipient Ave, Springfield, IL 62701","double_sided":true,"color":false,"mail_class":"standard","certified":false,"certified_return_receipt":false}},"rendered_letter":{"value":{"request_id":"8c1a1b58-2c8f-4f4f-9c46-2c1ac32d7a1b","buyer_name":"Agent Owner","buyer_email":"owner@example.com","letter":{"title":"Account notice","format":"markdown","body":"# Account notice\n\nPlease review the enclosed account update and contact us with any questions.","signature":"Sender Example"},"file_name":"account-notice.pdf","sender_name":"Sender Example","sender_address_type":"Address","sender_address_id":"US|LP|Pz0_Qj4_bGJg|16074807|13_ENG","sender_address_text":"123 Sender St, Springfield, IL 62701","recipient_name":"Recipient Example","recipient_address_type":"Address","recipient_address_id":"US|LP|Pz0_Qj4_bGJg|199825276|99_ENG","recipient_address_text":"456 Recipient Ave, Springfield, IL 62701","double_sided":true,"color":false,"mail_class":"standard","certified":false,"certified_return_receipt":false}},"bulk_text":{"value":{"request_id":"8c1a1b58-2c8f-4f4f-9c46-2c1ac32d7a1b","buyer_name":"Agent Owner","buyer_email":"owner@example.com","sender_name":"Sender Example","sender_address_type":"Address","sender_address_id":"US|LP|Pz0_Qj4_bGJg|16074807|13_ENG","sender_address_text":"123 Sender St, Springfield, IL 62701","double_sided":true,"color":false,"mail_class":"standard","certified":false,"certified_return_receipt":false,"bulk":{"campaign_name":"April Outreach","csv_content":"recipient_name,line1,line2,city,state,zip,account_number\nJane Doe,123 Main St,,Springfield,IL,62701,ACCT-100\nJohn Smith,456 Oak Ave,Apt 2,Chicago,IL,60601,ACCT-200","content_mode":"text","template_text":"Hello {{recipient_name}}, your account reference is {{account_number}}."}}}}}}},"responses":{"200":{"description":"Validation succeeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineOrderValidationResponse"}}}},"409":{"description":"request_id already exists with a different payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineErrorResponse"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineErrorResponse"}}}}}}},"/api/machine/mpp/orders":{"post":{"operationId":"createMppMachineOrder","summary":"Create or reuse an MPP machine order","description":"Unauthenticated calls return 402 Payment Required with WWW-Authenticate: Payment challenges. Retry the exact same body with Authorization: Payment after settlement.","requestBody":{"required":true,"description":"Create or reuse an MPP machine order. Reuse the same request_id and identical JSON body after a 402 response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineOrderRequest"},"examples":{"default":{"value":{"request_id":"8c1a1b58-2c8f-4f4f-9c46-2c1ac32d7a1b","buyer_name":"Agent Owner","buyer_email":"owner@example.com","pdf":{"upload_token":"pfu_123"},"file_name":"letter.pdf","sender_name":"Sender Example","sender_address_type":"Address","sender_address_id":"US|LP|Pz0_Qj4_bGJg|16074807|13_ENG","sender_address_text":"123 Sender St, Springfield, IL 62701","recipient_name":"Recipient Example","recipient_address_type":"Address","recipient_address_id":"US|LP|Pz0_Qj4_bGJg|199825276|99_ENG","recipient_address_text":"456 Recipient Ave, Springfield, IL 62701","double_sided":true,"color":false,"mail_class":"standard","certified":false,"certified_return_receipt":false,"return_receipt_format":"electronic","restricted_delivery":false,"err_delivery":"manual"}},"workflow_form":{"value":{"request_id":"8c1a1b58-2c8f-4f4f-9c46-2c1ac32d7a1b","buyer_name":"Agent Owner","buyer_email":"owner@example.com","form":{"slug":"5471","fields":{"foreign_corporation_period_begin":"01/01/2025","foreign_corporation_period_end":"12/31/2025","field_5":"Example Corporation Inc.","field_11":"123-45-6789","field_6":"123 Market St","field_8":"Wilmington","field_9":"DE","field_10":"19801"}},"file_name":"5471.pdf","sender_name":"Sender Example","sender_address_type":"Address","sender_address_id":"US|LP|Pz0_Qj4_bGJg|16074807|13_ENG","sender_address_text":"123 Sender St, Springfield, IL 62701","recipient_name":"Recipient Example","recipient_address_type":"Address","recipient_address_id":"US|LP|Pz0_Qj4_bGJg|199825276|99_ENG","recipient_address_text":"456 Recipient Ave, Springfield, IL 62701","double_sided":true,"color":false,"mail_class":"standard","certified":false,"certified_return_receipt":false}},"rendered_letter":{"value":{"request_id":"8c1a1b58-2c8f-4f4f-9c46-2c1ac32d7a1b","buyer_name":"Agent Owner","buyer_email":"owner@example.com","letter":{"title":"Account notice","format":"markdown","body":"# Account notice\n\nPlease review the enclosed account update and contact us with any questions.","signature":"Sender Example"},"file_name":"account-notice.pdf","sender_name":"Sender Example","sender_address_type":"Address","sender_address_id":"US|LP|Pz0_Qj4_bGJg|16074807|13_ENG","sender_address_text":"123 Sender St, Springfield, IL 62701","recipient_name":"Recipient Example","recipient_address_type":"Address","recipient_address_id":"US|LP|Pz0_Qj4_bGJg|199825276|99_ENG","recipient_address_text":"456 Recipient Ave, Springfield, IL 62701","double_sided":true,"color":false,"mail_class":"standard","certified":false,"certified_return_receipt":false}},"bulk_text":{"value":{"request_id":"8c1a1b58-2c8f-4f4f-9c46-2c1ac32d7a1b","buyer_name":"Agent Owner","buyer_email":"owner@example.com","sender_name":"Sender Example","sender_address_type":"Address","sender_address_id":"US|LP|Pz0_Qj4_bGJg|16074807|13_ENG","sender_address_text":"123 Sender St, Springfield, IL 62701","double_sided":true,"color":false,"mail_class":"standard","certified":false,"certified_return_receipt":false,"bulk":{"campaign_name":"April Outreach","csv_content":"recipient_name,line1,line2,city,state,zip,account_number\nJane Doe,123 

# --- truncated at 32 KB (110 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/postalform-com/refs/heads/main/openapi/postalform-com-machine-payments-openapi.json