create_test_outbound_mail
Create a sandbox outbound mail record without uploading a real document. The record is always test_mode=true, cost_cents=0, includes estimated_live_cost_cents and cost_breakdown, and queues a mail.submitted webhook. USPS First-Class Mail has a published $2.00 one-page baseline. Extra pages add configured printing plus any postage increase from weight. If an account's normal first-page formula is lower, cost_breakdown.first_class_baseline_adjustment_cents itemizes the difference separately from carrier postage. Color pages cost $0.70/page total by default before handling and postage: $0.40/page base B&W printing plus a $0.30/page additive color upgrade. In cost_breakdown, color_printing_per_page_cents is the total color-page printing price (70 cents by default), while color_surcharge_per_page_cents is the additive upgrade only (30 cents by default). Account-specific pricing can override these defaults; cost_breakdown is authoritative. FedEx and UPS estimates use the same configured origin and destination zone/region logic as production; FedEx Overnight adds a fixed $18.00 after the otherwise-calculated carrier baseline and reports service_adjustment_cents: 1800. Use with a sandbox key to rehearse outbound workflows before sending real physical mail.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| color | No | Color pages cost $0.70/page total by default before handling and postage: $0.40/page base B&W printing plus a $0.30/page additive color upgrade. In cost_breakdown, color_printing_per_page_cents is the total color-page printing price (70 cents by default), while color_surcharge_per_page_cents is the additive upgrade only (30 cents by default). Account-specific pricing can override these defaults; cost_breakdown is authoritative. | |
| metadata | No | Arbitrary metadata echoed in responses and webhooks. | |
| mail_class | No | Mail class to simulate. Postal or carrier service. Do not infer speed, tracking, or proof from carrier marketing names. Use first_class for ordinary lowest-cost USPS letters with no carrier tracking number by default. USPS First-Class Mail has a published $2.00 one-page baseline. Extra pages add configured printing plus any postage increase from weight. If an account's normal first-page formula is lower, cost_breakdown.first_class_baseline_adjustment_cents itemizes the difference separately from carrier postage. Use priority for faster USPS Priority Mail with USPS Tracking, but not Certified Mail proof; priority has a $15.00 published one-page floor. Use certified for USPS tracking plus proof of mailing/delivery; certified has a $20.00 published one-page floor. Use certified_return_receipt when electronic return-receipt evidence is required; certified_return_receipt has a $24.00 published one-page floor. Use fedex_ground or ups_ground for budget private-carrier tracking; fedex_express means FedEx Express Saver/third-business-day, fedex_2day and ups_2day mean second-business-day, and fedex_overnight or ups_next_day mean next-business-day. FedEx express classes use the Standard List document baseline from the configured fulfillment origin unless FedEx One Rate is explicitly configured operationally; fedex_overnight then adds a fixed $18.00 customer price adjustment (service_adjustment_cents: 1800). The same printing rates apply to every mail_class. Color pages cost $0.70/page total by default before handling and postage: $0.40/page base B&W printing plus a $0.30/page additive color upgrade. In cost_breakdown, color_printing_per_page_cents is the total color-page printing price (70 cents by default), while color_surcharge_per_page_cents is the additive upgrade only (30 cents by default). Account-specific pricing can override these defaults; cost_breakdown is authoritative. | first_class |
| page_count | No | Simulated page count used for pricing. | |
| agent_notes | No | Optional facility/operator notes for the simulated mailpiece. | |
| recipient_zip | No | Recipient ZIP code. Affects estimated live postage, private-carrier zone, and FedEx local/regional/national area. | 94105 |
| recipient_city | No | Recipient city. | San Francisco |
| recipient_name | No | Recipient name for the simulated mailpiece. Optional when recipient_company is provided. | Test Recipient |
| recipient_line1 | No | Recipient street line 1. | 123 Test Street |
| recipient_state | No | Recipient 2-letter state code. | CA |
| recipient_company | No | Company or organization line for the simulated mailpiece. Optional when recipient_name is provided. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes | Created sandbox outbound mail job and webhook status. |