MailmanAPI MCP
This MCP server enables AI agents to draft, preview, and send real US physical mail, including letters, postcards, and Certified Mail with tracking. It integrates with major AI platforms like Claude, ChatGPT, and Cursor, allowing users to approve and pay for mailings via a private link before printing and handing them to USPS.
Endpoint and access
No sign-in to connect and list tools. Individual tools may still need a vendor account, credentials, or permissions; check the documented prerequisites.
https://mailmanapi.com/mcpWhat its tools do
9 tools, grouped by the hints the server advertises. Hints are self-declared, not verified behavior.
Can change data (4)
Checks and signals
Each line is separate evidence, not a trust score.
- Passed Endpoint answered the live check ·
- Passed Official MCP Registry namespace is tied to mailmanapi.com ·
- Passed Endpoint is on the registry namespace domain ·
- Availability 1 of 1 checks passed in 30 days
What you can do with it
- Draft and send Certified Mail with tracking
- Send standard letters and postcards
- Approve and pay for mailings via private link
- Cancel mailings within 30 minutes of approval
Source and maintenance
Protocol and capabilities
- Server
- mailmanapi 0.1.0
- MCP protocol negotiated in check
- 2025-11-25
- Tools
- 9 advertised
- Resources
- Not advertised
- Resource templates
- Not advertised
- Prompts
- Not advertised
{
"tools": {
"listChanged": false
}
}Server-provided instructions
Untrusted server output shown for inspection. It is not Koskamo guidance and is excluded from knowledge search.
Tools
9 advertised
list_mail_types — List mail types
Read: What you can mail and what it starts at: letters (First-Class, Certified, Certified with return receipt) and postcards (4x6, 6x9, 6x11), with options and starting prices. Example: {}
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {},
"additionalProperties": false
}{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"products"
],
"properties": {
"products": {
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"required": [
"product",
"pages",
"options",
"services"
],
"properties": {
"pages": {
"type": "object",
"required": [
"min",
"max"
],
"properties": {
"max": {
"type": "number"
},
"min": {
"type": "number"
}
},
"additionalProperties": false
},
"options": {
"type": "object",
"required": [
"color",
"duplex"
],
"properties": {
"color": {
"type": "object",
"required": [
"type",
"default"
],
"properties": {
"type": {
"type": "string",
"const": "boolean"
},
"default": {
"type": "boolean",
"const": false
}
},
"additionalProperties": false
},
"duplex": {
"type": "object",
"required": [
"type",
"default"
],
"properties": {
"type": {
"type": "string",
"const": "boolean"
},
"default": {
"type": "boolean",
"const": false
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"product": {
"type": "string",
"const": "letter"
},
"services": {
"type": "array",
"items": {
"type": "object",
"required": [
"service",
"label",
"description",
"from_total_cents"
],
"properties": {
"label": {
"type": "string"
},
"service": {
"enum": [
"first_class",
"certified",
"certified_err"
],
"type": "string"
},
"description": {
"type": "string"
},
"from_total_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
},
"from_card_total_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"additionalProperties": false
}
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"product",
"sizes",
"services"
],
"properties": {
"sizes": {
"type": "array",
"items": {
"enum": [
"4x6",
"6x9",
"6x11"
],
"type": "string"
}
},
"product": {
"type": "string",
"const": "postcard"
},
"services": {
"type": "array",
"items": {
"type": "object",
"required": [
"service",
"label",
"description",
"from_total_cents"
],
"properties": {
"label": {
"type": "string"
},
"service": {
"enum": [
"first_class",
"certified",
"certified_err"
],
"type": "string"
},
"description": {
"type": "string"
},
"from_total_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
},
"from_card_total_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"additionalProperties": false
}
}
},
"additionalProperties": false
}
]
}
}
},
"additionalProperties": false
}{
"title": "List mail types",
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}quote_mail — Quote a mailpiece
Read: Price a piece without making a draft. Letters need pages or a base64 PDF; postcards need a size. Example: {"product":"letter","service":"certified","pages":1}
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"product",
"service"
],
"properties": {
"pages": {
"type": "number",
"description": "Number of letter pages. Test mode allows 1–12 pages. Live mode allows 1–5 for First-Class and 1–10 for Certified with or without an electronic return receipt. A letter quote requires exactly one of pages or document. Postcard quotes omit both."
},
"options": {
"type": "object",
"properties": {
"size": {
"enum": [
"4x6",
"6x9",
"6x11"
],
"type": "string",
"description": "Postcard size in inches: 4x6, 6x9 or 6x11. Required for postcards."
},
"color": {
"type": "boolean",
"description": "Print the letter in color. Defaults to false (black and white). Live color is First-Class only."
},
"duplex": {
"type": "boolean",
"description": "Print the letter on both sides. Defaults to false. Test mode only."
}
},
"description": "Letters accept color and duplex, both optional. Postcards require size as their only option.",
"additionalProperties": false
},
"product": {
"enum": [
"letter",
"postcard"
],
"type": "string",
"description": "letter or postcard."
},
"service": {
"enum": [
"first_class",
"certified",
"certified_err"
],
"type": "string",
"description": "USPS service: first_class, certified (tracked) or certified_err (tracked, with an electronic return receipt). Postcards support only first_class."
},
"document": {
"type": "object",
"required": [
"pdf_base64"
],
"properties": {
"pdf_base64": {
"type": "string",
"description": "Standard base64 for an unencrypted PDF, up to 10 MiB decoded. Each page must be portrait US Letter (8.5 × 11 inches). Test mode allows 1–12 pages. Live mode allows 1–5 for First-Class and 1–10 for Certified with or without an electronic return receipt."
}
},
"description": "Letter PDF used to calculate page count. Mutually exclusive with pages and unavailable for postcard quotes.",
"additionalProperties": false
}
},
"additionalProperties": false
}{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"product",
"service",
"options",
"pages",
"line_items",
"provider",
"provider_cost_cents",
"total_cents",
"currency"
],
"properties": {
"pages": {
"anyOf": [
{
"type": "integer",
"maximum": 9007199254740991,
"minimum": -9007199254740991
},
{
"type": "null"
}
]
},
"options": {
"anyOf": [
{
"type": "object",
"required": [
"color",
"duplex"
],
"properties": {
"color": {
"type": "boolean"
},
"duplex": {
"type": "boolean"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"size"
],
"properties": {
"size": {
"enum": [
"4x6",
"6x9",
"6x11"
],
"type": "string"
}
},
"additionalProperties": false
}
]
},
"product": {
"enum": [
"letter",
"postcard"
],
"type": "string"
},
"service": {
"enum": [
"first_class",
"certified",
"certified_err"
],
"type": "string"
},
"currency": {
"type": "string",
"const": "usd"
},
"provider": {
"enum": [
"fake",
"click2mail"
],
"type": "string"
},
"line_items": {
"type": "array",
"items": false,
"maxItems": 3,
"minItems": 3,
"prefixItems": [
{
"type": "object",
"required": [
"code",
"label",
"amount_cents"
],
"properties": {
"code": {
"type": "string",
"const": "postage"
},
"label": {
"type": "string"
},
"amount_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"code",
"label",
"amount_cents"
],
"properties": {
"code": {
"type": "string",
"const": "printing"
},
"label": {
"type": "string"
},
"amount_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"code",
"label",
"amount_cents"
],
"properties": {
"code": {
"type": "string",
"const": "fee"
},
"label": {
"type": "string"
},
"amount_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"additionalProperties": false
}
]
},
"total_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
},
"card_total_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
},
"payment_processing": {
"type": "object",
"required": [
"code",
"label",
"amount_cents"
],
"properties": {
"code": {
"type": "string",
"const": "processing"
},
"label": {
"type": "string"
},
"amount_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"additionalProperties": false
},
"provider_cost_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"additionalProperties": false
}{
"title": "Quote a mailpiece",
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}send_mail — Create a mailpiece draft
Prepare (free): Make a draft letter or postcard. You get the itemized price, page images and approval_url. By default, show the person the draft and send them to approval_url to pay. Keep the full private mail_url to check on it later. Reuse idempotency_key only to retry the same draft. Example: {"product":"letter","service":"certified_err","idempotency_key":"unique-draft-key-001","from":{"organization":"Example Sender","line1":"100 Example St","city":"Philadelphia","state":"PA","zip":"19106"},"to":{"organization":"Example Recipient","line1":"200 Example Ave","city":"Philadelphia","state":"PA","zip":"19106"},"document":{"text":"Hello, this is an example letter."}}
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"product",
"service",
"from",
"to",
"idempotency_key"
],
"properties": {
"to": {
"type": "object",
"required": [
"line1",
"city",
"state",
"zip"
],
"properties": {
"zip": {
"type": "string",
"pattern": "^\\d{5}(-\\d{4})?$",
"description": "ZIP code as a string: 5 digits or ZIP+4, such as 02108 or 02108-1234."
},
"city": {
"type": "string",
"minLength": 1,
"description": "City name."
},
"name": {
"type": "string",
"maxLength": 40,
"description": "Person's name, up to 40 characters. Required when organization is absent or blank."
},
"line1": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "Primary delivery line, such as a street address or PO Box. 1–64 characters."
},
"line2": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "Additional delivery line, such as an apartment, suite or unit. 1–64 characters when present."
},
"state": {
"type": "string",
"pattern": "^[A-Z]{2}$",
"description": "Two-letter uppercase USPS state code, such as PA."
},
"organization": {
"type": "string",
"minLength": 1,
"description": "Company or organization name. Required when name is absent or blank."
}
},
"description": "Recipient's US delivery address with a person or organization name.",
"additionalProperties": false
},
"from": {
"type": "object",
"required": [
"line1",
"city",
"state",
"zip"
],
"properties": {
"zip": {
"type": "string",
"pattern": "^\\d{5}(-\\d{4})?$",
"description": "ZIP code as a string: 5 digits or ZIP+4, such as 02108 or 02108-1234."
},
"city": {
"type": "string",
"minLength": 1,
"description": "City name."
},
"name": {
"type": "string",
"maxLength": 40,
"description": "Person's name, up to 40 characters. Required when organization is absent or blank."
},
"line1": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "Primary delivery line, such as a street address or PO Box. 1–64 characters."
},
"line2": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "Additional delivery line, such as an apartment, suite or unit. 1–64 characters when present."
},
"state": {
"type": "string",
"pattern": "^[A-Z]{2}$",
"description": "Two-letter uppercase USPS state code, such as PA."
},
"organization": {
"type": "string",
"minLength": 1,
"description": "Company or organization name. Required when name is absent or blank."
}
},
"description": "Sender's US return address with a person or organization name.",
"additionalProperties": false
},
"options": {
"type": "object",
"properties": {
"size": {
"enum": [
"4x6",
"6x9",
"6x11"
],
"type": "string",
"description": "Postcard size in inches: 4x6, 6x9 or 6x11. Required for postcards."
},
"color": {
"type": "boolean",
"description": "Print the letter in color. Defaults to false (black and white). Live color is First-Class only."
},
"duplex": {
"type": "boolean",
"description": "Print the letter on both sides. Defaults to false. Test mode only."
}
},
"description": "Letters accept color and duplex, both optional. Postcards require size as their only option.",
"additionalProperties": false
},
"product": {
"enum": [
"letter",
"postcard"
],
"type": "string",
"description": "letter or postcard. Live fulfillment supports letters only."
},
"service": {
"enum": [
"first_class",
"certified",
"certified_err"
],
"type": "string",
"description": "USPS service: first_class, certified (tracked) or certified_err (tracked, with an electronic return receipt). Postcards support only first_class."
},
"document": {
"type": "object",
"properties": {
"back": {
"type": "object",
"properties": {
"text": {
"type": "string",
"maxLength": 60000,
"description": "Postcard message that fits the chosen size. Mutually exclusive with pdf_base64."
},
"pdf_url": {
"type": "string",
"description": "Reserved for a public HTTPS PDF URL. Hosted PDF downloads are disabled."
},
"pdf_base64": {
"type": "string",
"description": "Standard base64 for an unencrypted postcard back PDF with at least one page, up to 10 MiB decoded. Mutually exclusive with text."
}
},
"description": "Required postcard back with exactly one of text or pdf_base64. Letters use the top-level document fields.",
"additionalProperties": false
},
"text": {
"type": "string",
"maxLength": 60000,
"description": "The letter body, from the greeting on, up to 60,000 characters. We add the sender, date and recipient. Test mode allows 1–12 pages. Live mode allows 1–5 for First-Class and 1–10 for Certified with or without an electronic return receipt. Mutually exclusive with pdf_base64."
},
"front": {
"type": "object",
"properties": {
"text": {
"type": "string",
"maxLength": 60000,
"description": "Unavailable for postcard fronts, which require a one-page PDF."
},
"pdf_url": {
"type": "string",
"description": "Reserved for a public HTTPS PDF URL. Hosted PDF downloads are disabled."
},
"pdf_base64": {
"type": "string",
"description": "Standard base64 for a one-page unencrypted postcard front PDF, up to 10 MiB decoded."
}
},
"description": "Required postcard front as a one-page PDF in pdf_base64. Letters use the top-level document fields.",
"additionalProperties": false
},
"pdf_url": {
"type": "string",
"description": "Reserved for a public HTTPS PDF URL. Hosted PDF downloads are disabled."
},
"pdf_base64": {
"type": "string",
"description": "Letter PDF. Standard base64 for an unencrypted PDF, up to 10 MiB decoded. Each page must be portrait US Letter (8.5 × 11 inches). Test mode allows 1–12 pages. Live mode allows 1–5 for First-Class and 1–10 for Certified with or without an electronic return receipt. Mutually exclusive with text."
}
},
"description": "Letters require exactly one of text or pdf_base64. Postcards require both front and back, each with one content source.",
"additionalProperties": false
},
"idempotency_key": {
"type": "string",
"pattern": "^[A-Za-z0-9_.:-]{16,255}$",
"description": "Unique key per draft, reused for an identical retry. 16–255 ASCII letters, digits, underscores, periods, colons or hyphens. The prefixes mailman: and sample: are reserved."
}
},
"additionalProperties": false
}{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"id",
"object",
"mode",
"state",
"product",
"service",
"options",
"pages",
"from",
"to",
"address_status",
"document_sha256",
"quote",
"total_cents",
"route",
"approval_hash",
"approval_url",
"mail_url",
"preview_url",
"receipt_url",
"tracking_number",
"payment",
"cancel_until",
"cancel_summary",
"timeline",
"status",
"cancelable",
"drafted_via",
"to_as_given",
"approval",
"proof",
"record_url",
"share_url",
"possible_duplicate",
"next_step",
"created_at",
"updated_at"
],
"properties": {
"id": {
"type": "string",
"pattern": "^mp_[a-z2-7]{20}$"
},
"to": {
"type": "object",
"required": [
"line1",
"city",
"state",
"zip"
],
"properties": {
"zip": {
"type": "string",
"pattern": "^\\d{5}(-\\d{4})?$",
"description": "ZIP code as a string: 5 digits or ZIP+4, such as 02108 or 02108-1234."
},
"city": {
"type": "string",
"minLength": 1,
"description": "City name."
},
"name": {
"type": "string",
"maxLength": 40,
"description": "Person's name, up to 40 characters. Required when organization is absent or blank."
},
"line1": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "Primary delivery line, such as a street address or PO Box. 1–64 characters."
},
"line2": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "Additional delivery line, such as an apartment, suite or unit. 1–64 characters when present."
},
"state": {
"type": "string",
"pattern": "^[A-Z]{2}$",
"description": "Two-letter uppercase USPS state code, such as PA."
},
"organization": {
"type": "string",
"minLength": 1,
"description": "Company or organization name. Required when name is absent or blank."
}
},
"additionalProperties": false
},
"from": {
"type": "object",
"required": [
"line1",
"city",
"state",
"zip"
],
"properties": {
"zip": {
"type": "string",
"pattern": "^\\d{5}(-\\d{4})?$",
"description": "ZIP code as a string: 5 digits or ZIP+4, such as 02108 or 02108-1234."
},
"city": {
"type": "string",
"minLength": 1,
"description": "City name."
},
"name": {
"type": "string",
"maxLength": 40,
"description": "Person's name, up to 40 characters. Required when organization is absent or blank."
},
"line1": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "Primary delivery line, such as a street address or PO Box. 1–64 characters."
},
"line2": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "Additional delivery line, such as an apartment, suite or unit. 1–64 characters when present."
},
"state": {
"type": "string",
"pattern": "^[A-Z]{2}$",
"description": "Two-letter uppercase USPS state code, such as PA."
},
"organization": {
"type": "string",
"minLength": 1,
"description": "Company or organization name. Required when name is absent or blank."
}
},
"additionalProperties": false
},
"mode": {
"enum": [
"test",
"live"
],
"type": "string"
},
"pages": {
"anyOf": [
{
"type": "integer",
"maximum": 9007199254740991,
"minimum": -9007199254740991
},
{
"type": "null"
}
]
},
"proof": {
"type": "object",
"required": [
"address_layout",
"pages",
"checks"
],
"properties": {
"pages": {
"type": "array",
"items": {
"type": "object",
"required": [
"n",
"label",
"image_url",
"width_pt",
"height_pt"
],
"properties": {
"n": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
},
"label": {
"type": "string"
},
"width_pt": {
"type": "number",
"exclusiveMinimum": 0
},
"height_pt": {
"type": "number",
"exclusiveMinimum": 0
},
"image_url": {
"anyOf": [
{
"type": "string",
"format": "uri"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
}
},
"checks": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"ok",
"message"
],
"properties": {
"ok": {
"type": "boolean"
},
"code": {
"enum": [
"pages",
"blank_top",
"fits_envelope"
],
"type": "string"
},
"value": {
"type": "number"
},
"message": {
"type": "string"
}
},
"additionalProperties": false
}
},
"address_layout": {
"type": "object",
"required": [
"kind",
"windows"
],
"properties": {
"kind": {
"enum": [
"separate_sheet",
"first_page"
],
"type": "string"
},
"windows": {
"type": "array",
"items": {
"type": "object",
"required": [
"x_pt",
"y_pt",
"w_pt",
"h_pt",
"page"
],
"properties": {
"h_pt": {
"type": "number"
},
"page": {
"anyOf": [
{
"type": "number",
"const": 0
},
{
"type": "number",
"const": 1
}
]
},
"w_pt": {
"type": "number"
},
"x_pt": {
"type": "number"
},
"y_pt": {
"type": "number"
}
},
"additionalProperties": false
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"quote": {
"type": "object",
"required": [
"product",
"service",
"options",
"pages",
"line_items",
"provider",
"provider_cost_cents",
"total_cents",
"currency"
],
"properties": {
"pages": {
"anyOf": [
{
"type": "integer",
"maximum": 9007199254740991,
"minimum": -9007199254740991
},
{
"type": "null"
}
]
},
"options": {
"anyOf": [
{
"type": "object",
"required": [
"color",
"duplex"
],
"properties": {
"color": {
"type": "boolean"
},
"duplex": {
"type": "boolean"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"size"
],
"properties": {
"size": {
"enum": [
"4x6",
"6x9",
"6x11"
],
"type": "string"
}
},
"additionalProperties": false
}
]
},
"product": {
"enum": [
"letter",
"postcard"
],
"type": "string"
},
"service": {
"enum": [
"first_class",
"certified",
"certified_err"
],
"type": "string"
},
"currency": {
"type": "string",
"const": "usd"
},
"provider": {
"enum": [
"fake",
"click2mail"
],
"type": "string"
},
"line_items": {
"type": "array",
"items": false,
"maxItems": 3,
"minItems": 3,
"prefixItems": [
{
"type": "object",
"required": [
"code",
"label",
"amount_cents"
],
"properties": {
"code": {
"type": "string",
"const": "postage"
},
"label": {
"type": "string"
},
"amount_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"code",
"label",
"amount_cents"
],
"properties": {
"code": {
"type": "string",
"const": "printing"
},
"label": {
"type": "string"
},
"amount_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"code",
"label",
"amount_cents"
],
"properties": {
"code": {
"type": "string",
"const": "fee"
},
"label": {
"type": "string"
},
"amount_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"additionalProperties": false
}
]
},
"total_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
},
"card_total_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
},
"payment_processing": {
"type": "object",
"required": [
"code",
"label",
"amount_cents"
],
"properties": {
"code": {
"type": "string",
"const": "processing"
},
"label": {
"type": "string"
},
"amount_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"additionalProperties": false
},
"provider_cost_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"additionalProperties": false
},
"route": {
"type": "object",
"required": [
"provider",
"provider_product"
],
"properties": {
"provider": {
"enum": [
"fake",
"click2mail"
],
"type": "string"
},
"provider_product": {
"type": "string"
}
},
"additionalProperties": false
},
"state": {
"enum": [
"draft",
"paid",
"screening",
"review",
"submitted",
"printed",
"mailed",
"in_transit",
"delivered",
"receipt_ready",
"canceled",
"failed",
"returned",
"refunded"
],
"type": "string"
},
"object": {
"type": "string",
"const": "mailpiece"
},
"status": {
"type": "object",
"required": [
"label",
"person",
"cancelable"
],
"properties": {
"label": {
"type": "string"
},
"person": {
"type": "string"
},
"cancelable": {
"type": "boolean"
}
},
"additionalProperties": false
},
"options": {
"anyOf": [
{
"type": "object",
"required": [
"color",
"duplex"
],
"properties": {
"color": {
"type": "boolean"
},
"duplex": {
"type": "boolean"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"size"
],
"properties": {
"size": {
"enum": [
"4x6",
"6x9",
"6x11"
],
"type": "string"
}
},
"additionalProperties": false
}
]
},
"payment": {
"anyOf": [
{
"anyOf": [
{
"type": "object",
"required": [
"method",
"amount_cents",
"charged",
"refund"
],
"properties": {
"method": {
"type": "string",
"const": "test_mode"
},
"refund": {
"anyOf": [
{
"type": "object",
"required": [
"state",
"amount_cents"
],
"properties": {
"state": {
"type": "string",
"const": "not_charged"
},
"amount_cents": {
"type": "number",
"const": 0
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
},
"charged": {
"type": "boolean",
"const": false
},
"amount_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"method",
"amount_cents",
"charged",
"refund"
],
"properties": {
"method": {
"enum": [
"card",
"balance"
],
"type": "string"
},
"refund": {
"anyOf": [
{
"type": "object",
"required": [
"state",
"amount_cents"
],
"properties": {
"state": {
"enum": [
"queued",
"pending",
"refunded",
"review"
],
"type": "string"
},
"amount_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
},
"charged": {
"type": "boolean"
},
"amount_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"additionalProperties": false
}
]
},
{
"type": "null"
}
]
},
"product": {
"enum": [
"letter",
"postcard"
],
"type": "string"
},
"service": {
"enum": [
"first_class",
"certified",
"certified_err"
],
"type": "string"
},
"approval": {
"anyOf": [
{
"type": "object",
"required": [
"at",
"via"
],
"properties": {
"at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
},
"via": {
"enum": [
"approval_page",
"api",
"owner_comp"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
},
"mail_url": {
"type": "string",
"format": "uri"
},
"timeline": {
"type": "array",
"items": {
"type": "object",
"required": [
"at",
"type",
"state",
"source",
"note"
],
"properties": {
"at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
},
"note": {
"type": "string"
},
"type": {
"type": "string"
},
"place": {
"type": "string"
},
"state": {
"anyOf": [
{
"enum": [
"draft",
"paid",
"screening",
"review",
"submitted",
"printed",
"mailed",
"in_transit",
"delivered",
"receipt_ready",
"canceled",
"failed",
"returned",
"refunded"
],
"type": "string"
},
{
"type": "null"
}
]
},
"source": {
"enum": [
"api",
"mcp",
"counter",
"approval",
"pipeline",
"provider",
"usps"
],
"type": "string"
},
"amount_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"additionalProperties": false
}
},
"next_step": {
"type": "string"
},
"share_url": {
"type": "string",
"format": "uri"
},
"cancelable": {
"type": "boolean"
},
"created_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
},
"record_url": {
"type": "string",
"format": "uri"
},
"reprint_of": {
"type": "string",
"pattern": "^mp_[a-z2-7]{20}$"
},
"updated_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
},
"drafted_via": {
"enum": [
"api",
"mcp",
"counter"
],
"type": "string"
},
"preview_url": {
"type": "string",
"format": "uri"
},
"receipt_url": {
"anyOf": [
{
"type": "string",
"format": "uri"
},
{
"type": "null"
}
]
},
"to_as_given": {
"anyOf": [
{
"type": "object",
"required": [
"line1",
"city",
"state",
"zip"
],
"properties": {
"zip": {
"type": "string",
"pattern": "^\\d{5}(-\\d{4})?$",
"description": "ZIP code as a string: 5 digits or ZIP+4, such as 02108 or 02108-1234."
},
"city": {
"type": "string",
"minLength": 1,
"description": "City name."
},
"name": {
"type": "string",
"maxLength": 40,
"description": "Person's name, up to 40 characters. Required when organization is absent or blank."
},
"line1": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "Primary delivery line, such as a street address or PO Box. 1–64 characters."
},
"line2": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "Additional delivery line, such as an apartment, suite or unit. 1–64 characters when present."
},
"state": {
"type": "string",
"pattern": "^[A-Z]{2}$",
"description": "Two-letter uppercase USPS state code, such as PA."
},
"organization": {
"type": "string",
"minLength": 1,
"description": "Company or organization name. Required when name is absent or blank."
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
},
"total_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
},
"approval_url": {
"anyOf": [
{
"type": "string",
"format": "uri"
},
{
"type": "null"
}
]
},
"cancel_until": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
},
{
"type": "null"
}
]
},
"approval_hash": {
"type": "string",
"pattern": "^[0-9a-f]{64}$"
},
"address_status": {
"enum": [
"deliverable",
"corrected"
],
"type": "string"
},
"cancel_summary": {
"type": [
"string",
"null"
]
},
"payment_notice": {
"type": [
"string",
"null"
]
},
"document_sha256": {
"type": "string",
"pattern": "^[0-9a-f]{64}$"
},
"payment_refused": {
"anyOf": [
{
"enum": [
"refused",
"refunded"
],
"type": "string"
},
{
"type": "null"
}
]
},
"replacement_url": {
"anyOf": [
{
"type": "string",
"format": "uri"
},
{
"type": "null"
}
]
},
"tracking_number": {
"type": [
"string",
"null"
]
},
"possible_duplicate": {
"anyOf": [
{
"type": "object",
"required": [
"id",
"approved_at"
],
"properties": {
"id": {
"type": "string",
"pattern": "^mp_[a-z2-7]{20}$"
},
"approved_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
}{
"title": "Create a mailpiece draft",
"readOnlyHint": false,
"openWorldHint": true,
"idempotentHint": false,
"destructiveHint": true
}get_mail — Read mailpiece status
Read: Where a piece is now: state, timeline, tracking number and what to tell the person next. Pass id with the creating key, or the full private mail_url. Example: {"id":"mp_abcdefghijklmnopqrst"}
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"id": {
"type": "string",
"pattern": "^mp_[a-z2-7]{20}$",
"description": "The draft's mp_ ID, with 20 lowercase letters or digits 2–7 after the prefix. Requires the creating API key and is mutually exclusive with mail_url."
},
"mail_url": {
"type": "string",
"format": "uri",
"description": "Complete private MailmanAPI mail_url for the draft, including its ?t= token. An API key is optional. Mutually exclusive with id."
}
},
"additionalProperties": false
}{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"id",
"object",
"mode",
"state",
"product",
"service",
"options",
"pages",
"from",
"to",
"address_status",
"document_sha256",
"quote",
"total_cents",
"route",
"approval_hash",
"approval_url",
"mail_url",
"preview_url",
"receipt_url",
"tracking_number",
"payment",
"cancel_until",
"cancel_summary",
"timeline",
"status",
"cancelable",
"drafted_via",
"to_as_given",
"approval",
"proof",
"record_url",
"share_url",
"possible_duplicate",
"next_step",
"created_at",
"updated_at"
],
"properties": {
"id": {
"type": "string",
"pattern": "^mp_[a-z2-7]{20}$"
},
"to": {
"type": "object",
"required": [
"line1",
"city",
"state",
"zip"
],
"properties": {
"zip": {
"type": "string",
"pattern": "^\\d{5}(-\\d{4})?$",
"description": "ZIP code as a string: 5 digits or ZIP+4, such as 02108 or 02108-1234."
},
"city": {
"type": "string",
"minLength": 1,
"description": "City name."
},
"name": {
"type": "string",
"maxLength": 40,
"description": "Person's name, up to 40 characters. Required when organization is absent or blank."
},
"line1": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "Primary delivery line, such as a street address or PO Box. 1–64 characters."
},
"line2": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "Additional delivery line, such as an apartment, suite or unit. 1–64 characters when present."
},
"state": {
"type": "string",
"pattern": "^[A-Z]{2}$",
"description": "Two-letter uppercase USPS state code, such as PA."
},
"organization": {
"type": "string",
"minLength": 1,
"description": "Company or organization name. Required when name is absent or blank."
}
},
"additionalProperties": false
},
"from": {
"type": "object",
"required": [
"line1",
"city",
"state",
"zip"
],
"properties": {
"zip": {
"type": "string",
"pattern": "^\\d{5}(-\\d{4})?$",
"description": "ZIP code as a string: 5 digits or ZIP+4, such as 02108 or 02108-1234."
},
"city": {
"type": "string",
"minLength": 1,
"description": "City name."
},
"name": {
"type": "string",
"maxLength": 40,
"description": "Person's name, up to 40 characters. Required when organization is absent or blank."
},
"line1": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "Primary delivery line, such as a street address or PO Box. 1–64 characters."
},
"line2": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "Additional delivery line, such as an apartment, suite or unit. 1–64 characters when present."
},
"state": {
"type": "string",
"pattern": "^[A-Z]{2}$",
"description": "Two-letter uppercase USPS state code, such as PA."
},
"organization": {
"type": "string",
"minLength": 1,
"description": "Company or organization name. Required when name is absent or blank."
}
},
"additionalProperties": false
},
"mode": {
"enum": [
"test",
"live"
],
"type": "string"
},
"pages": {
"anyOf": [
{
"type": "integer",
"maximum": 9007199254740991,
"minimum": -9007199254740991
},
{
"type": "null"
}
]
},
"proof": {
"type": "object",
"required": [
"address_layout",
"pages",
"checks"
],
"properties": {
"pages": {
"type": "array",
"items": {
"type": "object",
"required": [
"n",
"label",
"image_url",
"width_pt",
"height_pt"
],
"properties": {
"n": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
},
"label": {
"type": "string"
},
"width_pt": {
"type": "number",
"exclusiveMinimum": 0
},
"height_pt": {
"type": "number",
"exclusiveMinimum": 0
},
"image_url": {
"anyOf": [
{
"type": "string",
"format": "uri"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
}
},
"checks": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"ok",
"message"
],
"properties": {
"ok": {
"type": "boolean"
},
"code": {
"enum": [
"pages",
"blank_top",
"fits_envelope"
],
"type": "string"
},
"value": {
"type": "number"
},
"message": {
"type": "string"
}
},
"additionalProperties": false
}
},
"address_layout": {
"type": "object",
"required": [
"kind",
"windows"
],
"properties": {
"kind": {
"enum": [
"separate_sheet",
"first_page"
],
"type": "string"
},
"windows": {
"type": "array",
"items": {
"type": "object",
"required": [
"x_pt",
"y_pt",
"w_pt",
"h_pt",
"page"
],
"properties": {
"h_pt": {
"type": "number"
},
"page": {
"anyOf": [
{
"type": "number",
"const": 0
},
{
"type": "number",
"const": 1
}
]
},
"w_pt": {
"type": "number"
},
"x_pt": {
"type": "number"
},
"y_pt": {
"type": "number"
}
},
"additionalProperties": false
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"quote": {
"type": "object",
"required": [
"product",
"service",
"options",
"pages",
"line_items",
"provider",
"provider_cost_cents",
"total_cents",
"currency"
],
"properties": {
"pages": {
"anyOf": [
{
"type": "integer",
"maximum": 9007199254740991,
"minimum": -9007199254740991
},
{
"type": "null"
}
]
},
"options": {
"anyOf": [
{
"type": "object",
"required": [
"color",
"duplex"
],
"properties": {
"color": {
"type": "boolean"
},
"duplex": {
"type": "boolean"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"size"
],
"properties": {
"size": {
"enum": [
"4x6",
"6x9",
"6x11"
],
"type": "string"
}
},
"additionalProperties": false
}
]
},
"product": {
"enum": [
"letter",
"postcard"
],
"type": "string"
},
"service": {
"enum": [
"first_class",
"certified",
"certified_err"
],
"type": "string"
},
"currency": {
"type": "string",
"const": "usd"
},
"provider": {
"enum": [
"fake",
"click2mail"
],
"type": "string"
},
"line_items": {
"type": "array",
"items": false,
"maxItems": 3,
"minItems": 3,
"prefixItems": [
{
"type": "object",
"required": [
"code",
"label",
"amount_cents"
],
"properties": {
"code": {
"type": "string",
"const": "postage"
},
"label": {
"type": "string"
},
"amount_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"code",
"label",
"amount_cents"
],
"properties": {
"code": {
"type": "string",
"const": "printing"
},
"label": {
"type": "string"
},
"amount_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"code",
"label",
"amount_cents"
],
"properties": {
"code": {
"type": "string",
"const": "fee"
},
"label": {
"type": "string"
},
"amount_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"additionalProperties": false
}
]
},
"total_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
},
"card_total_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
},
"payment_processing": {
"type": "object",
"required": [
"code",
"label",
"amount_cents"
],
"properties": {
"code": {
"type": "string",
"const": "processing"
},
"label": {
"type": "string"
},
"amount_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"additionalProperties": false
},
"provider_cost_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"additionalProperties": false
},
"route": {
"type": "object",
"required": [
"provider",
"provider_product"
],
"properties": {
"provider": {
"enum": [
"fake",
"click2mail"
],
"type": "string"
},
"provider_product": {
"type": "string"
}
},
"additionalProperties": false
},
"state": {
"enum": [
"draft",
"paid",
"screening",
"review",
"submitted",
"printed",
"mailed",
"in_transit",
"delivered",
"receipt_ready",
"canceled",
"failed",
"returned",
"refunded"
],
"type": "string"
},
"object": {
"type": "string",
"const": "mailpiece"
},
"status": {
"type": "object",
"required": [
"label",
"person",
"cancelable"
],
"properties": {
"label": {
"type": "string"
},
"person": {
"type": "string"
},
"cancelable": {
"type": "boolean"
}
},
"additionalProperties": false
},
"options": {
"anyOf": [
{
"type": "object",
"required": [
"color",
"duplex"
],
"properties": {
"color": {
"type": "boolean"
},
"duplex": {
"type": "boolean"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"size"
],
"properties": {
"size": {
"enum": [
"4x6",
"6x9",
"6x11"
],
"type": "string"
}
},
"additionalProperties": false
}
]
},
"payment": {
"anyOf": [
{
"anyOf": [
{
"type": "object",
"required": [
"method",
"amount_cents",
"charged",
"refund"
],
"properties": {
"method": {
"type": "string",
"const": "test_mode"
},
"refund": {
"anyOf": [
{
"type": "object",
"required": [
"state",
"amount_cents"
],
"properties": {
"state": {
"type": "string",
"const": "not_charged"
},
"amount_cents": {
"type": "number",
"const": 0
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
},
"charged": {
"type": "boolean",
"const": false
},
"amount_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"method",
"amount_cents",
"charged",
"refund"
],
"properties": {
"method": {
"enum": [
"card",
"balance"
],
"type": "string"
},
"refund": {
"anyOf": [
{
"type": "object",
"required": [
"state",
"amount_cents"
],
"properties": {
"state": {
"enum": [
"queued",
"pending",
"refunded",
"review"
],
"type": "string"
},
"amount_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
},
"charged": {
"type": "boolean"
},
"amount_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"additionalProperties": false
}
]
},
{
"type": "null"
}
]
},
"product": {
"enum": [
"letter",
"postcard"
],
"type": "string"
},
"service": {
"enum": [
"first_class",
"certified",
"certified_err"
],
"type": "string"
},
"approval": {
"anyOf": [
{
"type": "object",
"required": [
"at",
"via"
],
"properties": {
"at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
},
"via": {
"enum": [
"approval_page",
"api",
"owner_comp"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
},
"mail_url": {
"type": "string",
"format": "uri"
},
"timeline": {
"type": "array",
"items": {
"type": "object",
"required": [
"at",
"type",
"state",
"source",
"note"
],
"properties": {
"at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
},
"note": {
"type": "string"
},
"type": {
"type": "string"
},
"place": {
"type": "string"
},
"state": {
"anyOf": [
{
"enum": [
"draft",
"paid",
"screening",
"review",
"submitted",
"printed",
"mailed",
"in_transit",
"delivered",
"receipt_ready",
"canceled",
"failed",
"returned",
"refunded"
],
"type": "string"
},
{
"type": "null"
}
]
},
"source": {
"enum": [
"api",
"mcp",
"counter",
"approval",
"pipeline",
"provider",
"usps"
],
"type": "string"
},
"amount_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"additionalProperties": false
}
},
"next_step": {
"type": "string"
},
"share_url": {
"type": "string",
"format": "uri"
},
"cancelable": {
"type": "boolean"
},
"created_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
},
"record_url": {
"type": "string",
"format": "uri"
},
"reprint_of": {
"type": "string",
"pattern": "^mp_[a-z2-7]{20}$"
},
"updated_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
},
"drafted_via": {
"enum": [
"api",
"mcp",
"counter"
],
"type": "string"
},
"preview_url": {
"type": "string",
"format": "uri"
},
"receipt_url": {
"anyOf": [
{
"type": "string",
"format": "uri"
},
{
"type": "null"
}
]
},
"to_as_given": {
"anyOf": [
{
"type": "object",
"required": [
"line1",
"city",
"state",
"zip"
],
"properties": {
"zip": {
"type": "string",
"pattern": "^\\d{5}(-\\d{4})?$",
"description": "ZIP code as a string: 5 digits or ZIP+4, such as 02108 or 02108-1234."
},
"city": {
"type": "string",
"minLength": 1,
"description": "City name."
},
"name": {
"type": "string",
"maxLength": 40,
"description": "Person's name, up to 40 characters. Required when organization is absent or blank."
},
"line1": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "Primary delivery line, such as a street address or PO Box. 1–64 characters."
},
"line2": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "Additional delivery line, such as an apartment, suite or unit. 1–64 characters when present."
},
"state": {
"type": "string",
"pattern": "^[A-Z]{2}$",
"description": "Two-letter uppercase USPS state code, such as PA."
},
"organization": {
"type": "string",
"minLength": 1,
"description": "Company or organization name. Required when name is absent or blank."
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
},
"total_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
},
"approval_url": {
"anyOf": [
{
"type": "string",
"format": "uri"
},
{
"type": "null"
}
]
},
"cancel_until": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
},
{
"type": "null"
}
]
},
"approval_hash": {
"type": "string",
"pattern": "^[0-9a-f]{64}$"
},
"address_status": {
"enum": [
"deliverable",
"corrected"
],
"type": "string"
},
"cancel_summary": {
"type": [
"string",
"null"
]
},
"payment_notice": {
"type": [
"string",
"null"
]
},
"document_sha256": {
"type": "string",
"pattern": "^[0-9a-f]{64}$"
},
"payment_refused": {
"anyOf": [
{
"enum": [
"refused",
"refunded"
],
"type": "string"
},
{
"type": "null"
}
]
},
"replacement_url": {
"anyOf": [
{
"type": "string",
"format": "uri"
},
{
"type": "null"
}
]
},
"tracking_number": {
"type": [
"string",
"null"
]
},
"possible_duplicate": {
"anyOf": [
{
"type": "object",
"required": [
"id",
"approved_at"
],
"properties": {
"id": {
"type": "string",
"pattern": "^mp_[a-z2-7]{20}$"
},
"approved_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
}{
"title": "Read mailpiece status",
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}list_mail — List the key's mailpieces
Read: Your API key's pieces, newest first. Pass next_cursor as cursor to see more. Example: {"limit":20}
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"limit": {
"type": "integer",
"maximum": 100,
"minimum": 1,
"description": "Mailpieces per page, 1 to 100. Defaults to 20."
},
"cursor": {
"type": "string",
"minLength": 1,
"description": "next_cursor from the previous page. Omit for the first page."
}
},
"additionalProperties": false
}{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"mail",
"next_cursor"
],
"properties": {
"mail": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"object",
"mode",
"state",
"product",
"service",
"options",
"pages",
"from",
"to",
"address_status",
"document_sha256",
"quote",
"total_cents",
"route",
"approval_hash",
"approval_url",
"mail_url",
"preview_url",
"receipt_url",
"tracking_number",
"payment",
"cancel_until",
"cancel_summary",
"timeline",
"status",
"cancelable",
"drafted_via",
"to_as_given",
"approval",
"proof",
"record_url",
"share_url",
"possible_duplicate",
"next_step",
"created_at",
"updated_at"
],
"properties": {
"id": {
"type": "string",
"pattern": "^mp_[a-z2-7]{20}$"
},
"to": {
"type": "object",
"required": [
"line1",
"city",
"state",
"zip"
],
"properties": {
"zip": {
"type": "string",
"pattern": "^\\d{5}(-\\d{4})?$",
"description": "ZIP code as a string: 5 digits or ZIP+4, such as 02108 or 02108-1234."
},
"city": {
"type": "string",
"minLength": 1,
"description": "City name."
},
"name": {
"type": "string",
"maxLength": 40,
"description": "Person's name, up to 40 characters. Required when organization is absent or blank."
},
"line1": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "Primary delivery line, such as a street address or PO Box. 1–64 characters."
},
"line2": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "Additional delivery line, such as an apartment, suite or unit. 1–64 characters when present."
},
"state": {
"type": "string",
"pattern": "^[A-Z]{2}$",
"description": "Two-letter uppercase USPS state code, such as PA."
},
"organization": {
"type": "string",
"minLength": 1,
"description": "Company or organization name. Required when name is absent or blank."
}
},
"additionalProperties": false
},
"from": {
"type": "object",
"required": [
"line1",
"city",
"state",
"zip"
],
"properties": {
"zip": {
"type": "string",
"pattern": "^\\d{5}(-\\d{4})?$",
"description": "ZIP code as a string: 5 digits or ZIP+4, such as 02108 or 02108-1234."
},
"city": {
"type": "string",
"minLength": 1,
"description": "City name."
},
"name": {
"type": "string",
"maxLength": 40,
"description": "Person's name, up to 40 characters. Required when organization is absent or blank."
},
"line1": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "Primary delivery line, such as a street address or PO Box. 1–64 characters."
},
"line2": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "Additional delivery line, such as an apartment, suite or unit. 1–64 characters when present."
},
"state": {
"type": "string",
"pattern": "^[A-Z]{2}$",
"description": "Two-letter uppercase USPS state code, such as PA."
},
"organization": {
"type": "string",
"minLength": 1,
"description": "Company or organization name. Required when name is absent or blank."
}
},
"additionalProperties": false
},
"mode": {
"enum": [
"test",
"live"
],
"type": "string"
},
"pages": {
"anyOf": [
{
"type": "integer",
"maximum": 9007199254740991,
"minimum": -9007199254740991
},
{
"type": "null"
}
]
},
"proof": {
"type": "object",
"required": [
"address_layout",
"pages",
"checks"
],
"properties": {
"pages": {
"type": "array",
"items": {
"type": "object",
"required": [
"n",
"label",
"image_url",
"width_pt",
"height_pt"
],
"properties": {
"n": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
},
"label": {
"type": "string"
},
"width_pt": {
"type": "number",
"exclusiveMinimum": 0
},
"height_pt": {
"type": "number",
"exclusiveMinimum": 0
},
"image_url": {
"anyOf": [
{
"type": "string",
"format": "uri"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
}
},
"checks": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"ok",
"message"
],
"properties": {
"ok": {
"type": "boolean"
},
"code": {
"enum": [
"pages",
"blank_top",
"fits_envelope"
],
"type": "string"
},
"value": {
"type": "number"
},
"message": {
"type": "string"
}
},
"additionalProperties": false
}
},
"address_layout": {
"type": "object",
"required": [
"kind",
"windows"
],
"properties": {
"kind": {
"enum": [
"separate_sheet",
"first_page"
],
"type": "string"
},
"windows": {
"type": "array",
"items": {
"type": "object",
"required": [
"x_pt",
"y_pt",
"w_pt",
"h_pt",
"page"
],
"properties": {
"h_pt": {
"type": "number"
},
"page": {
"anyOf": [
{
"type": "number",
"const": 0
},
{
"type": "number",
"const": 1
}
]
},
"w_pt": {
"type": "number"
},
"x_pt": {
"type": "number"
},
"y_pt": {
"type": "number"
}
},
"additionalProperties": false
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"quote": {
"type": "object",
"required": [
"product",
"service",
"options",
"pages",
"line_items",
"provider",
"provider_cost_cents",
"total_cents",
"currency"
],
"properties": {
"pages": {
"anyOf": [
{
"type": "integer",
"maximum": 9007199254740991,
"minimum": -9007199254740991
},
{
"type": "null"
}
]
},
"options": {
"anyOf": [
{
"type": "object",
"required": [
"color",
"duplex"
],
"properties": {
"color": {
"type": "boolean"
},
"duplex": {
"type": "boolean"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"size"
],
"properties": {
"size": {
"enum": [
"4x6",
"6x9",
"6x11"
],
"type": "string"
}
},
"additionalProperties": false
}
]
},
"product": {
"enum": [
"letter",
"postcard"
],
"type": "string"
},
"service": {
"enum": [
"first_class",
"certified",
"certified_err"
],
"type": "string"
},
"currency": {
"type": "string",
"const": "usd"
},
"provider": {
"enum": [
"fake",
"click2mail"
],
"type": "string"
},
"line_items": {
"type": "array",
"items": false,
"maxItems": 3,
"minItems": 3,
"prefixItems": [
{
"type": "object",
"required": [
"code",
"label",
"amount_cents"
],
"properties": {
"code": {
"type": "string",
"const": "postage"
},
"label": {
"type": "string"
},
"amount_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"code",
"label",
"amount_cents"
],
"properties": {
"code": {
"type": "string",
"const": "printing"
},
"label": {
"type": "string"
},
"amount_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"code",
"label",
"amount_cents"
],
"properties": {
"code": {
"type": "string",
"const": "fee"
},
"label": {
"type": "string"
},
"amount_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"additionalProperties": false
}
]
},
"total_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
},
"card_total_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
},
"payment_processing": {
"type": "object",
"required": [
"code",
"label",
"amount_cents"
],
"properties": {
"code": {
"type": "string",
"const": "processing"
},
"label": {
"type": "string"
},
"amount_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"additionalProperties": false
},
"provider_cost_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"additionalProperties": false
},
"route": {
"type": "object",
"required": [
"provider",
"provider_product"
],
"properties": {
"provider": {
"enum": [
"fake",
"click2mail"
],
"type": "string"
},
"provider_product": {
"type": "string"
}
},
"additionalProperties": false
},
"state": {
"enum": [
"draft",
"paid",
"screening",
"review",
"submitted",
"printed",
"mailed",
"in_transit",
"delivered",
"receipt_ready",
"canceled",
"failed",
"returned",
"refunded"
],
"type": "string"
},
"object": {
"type": "string",
"const": "mailpiece"
},
"status": {
"type": "object",
"required": [
"label",
"person",
"cancelable"
],
"properties": {
"label": {
"type": "string"
},
"person": {
"type": "string"
},
"cancelable": {
"type": "boolean"
}
},
"additionalProperties": false
},
"options": {
"anyOf": [
{
"type": "object",
"required": [
"color",
"duplex"
],
"properties": {
"color": {
"type": "boolean"
},
"duplex": {
"type": "boolean"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"size"
],
"properties": {
"size": {
"enum": [
"4x6",
"6x9",
"6x11"
],
"type": "string"
}
},
"additionalProperties": false
}
]
},
"payment": {
"anyOf": [
{
"anyOf": [
{
"type": "object",
"required": [
"method",
"amount_cents",
"charged",
"refund"
],
"properties": {
"method": {
"type": "string",
"const": "test_mode"
},
"refund": {
"anyOf": [
{
"type": "object",
"required": [
"state",
"amount_cents"
],
"properties": {
"state": {
"type": "string",
"const": "not_charged"
},
"amount_cents": {
"type": "number",
"const": 0
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
},
"charged": {
"type": "boolean",
"const": false
},
"amount_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"method",
"amount_cents",
"charged",
"refund"
],
"properties": {
"method": {
"enum": [
"card",
"balance"
],
"type": "string"
},
"refund": {
"anyOf": [
{
"type": "object",
"required": [
"state",
"amount_cents"
],
"properties": {
"state": {
"enum": [
"queued",
"pending",
"refunded",
"review"
],
"type": "string"
},
"amount_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
},
"charged": {
"type": "boolean"
},
"amount_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"additionalProperties": false
}
]
},
{
"type": "null"
}
]
},
"product": {
"enum": [
"letter",
"postcard"
],
"type": "string"
},
"service": {
"enum": [
"first_class",
"certified",
"certified_err"
],
"type": "string"
},
"approval": {
"anyOf": [
{
"type": "object",
"required": [
"at",
"via"
],
"properties": {
"at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
},
"via": {
"enum": [
"approval_page",
"api",
"owner_comp"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
},
"mail_url": {
"type": "string",
"format": "uri"
},
"timeline": {
"type": "array",
"items": {
"type": "object",
"required": [
"at",
"type",
"state",
"source",
"note"
],
"properties": {
"at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
},
"note": {
"type": "string"
},
"type": {
"type": "string"
},
"place": {
"type": "string"
},
"state": {
"anyOf": [
{
"enum": [
"draft",
"paid",
"screening",
"review",
"submitted",
"printed",
"mailed",
"in_transit",
"delivered",
"receipt_ready",
"canceled",
"failed",
"returned",
"refunded"
],
"type": "string"
},
{
"type": "null"
}
]
},
"source": {
"enum": [
"api",
"mcp",
"counter",
"approval",
"pipeline",
"provider",
"usps"
],
"type": "string"
},
"amount_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"additionalProperties": false
}
},
"next_step": {
"type": "string"
},
"share_url": {
"type": "string",
"format": "uri"
},
"cancelable": {
"type": "boolean"
},
"created_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
},
"record_url": {
"type": "string",
"format": "uri"
},
"reprint_of": {
"type": "string",
"pattern": "^mp_[a-z2-7]{20}$"
},
"updated_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
},
"drafted_via": {
"enum": [
"api",
"mcp",
"counter"
],
"type": "string"
},
"preview_url": {
"type": "string",
"format": "uri"
},
"receipt_url": {
"anyOf": [
{
"type": "string",
"format": "uri"
},
{
"type": "null"
}
]
},
"to_as_given": {
"anyOf": [
{
"type": "object",
"required": [
"line1",
"city",
"state",
"zip"
],
"properties": {
"zip": {
"type": "string",
"pattern": "^\\d{5}(-\\d{4})?$",
"description": "ZIP code as a string: 5 digits or ZIP+4, such as 02108 or 02108-1234."
},
"city": {
"type": "string",
"minLength": 1,
"description": "City name."
},
"name": {
"type": "string",
"maxLength": 40,
"description": "Person's name, up to 40 characters. Required when organization is absent or blank."
},
"line1": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "Primary delivery line, such as a street address or PO Box. 1–64 characters."
},
"line2": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "Additional delivery line, such as an apartment, suite or unit. 1–64 characters when present."
},
"state": {
"type": "string",
"pattern": "^[A-Z]{2}$",
"description": "Two-letter uppercase USPS state code, such as PA."
},
"organization": {
"type": "string",
"minLength": 1,
"description": "Company or organization name. Required when name is absent or blank."
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
},
"total_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
},
"approval_url": {
"anyOf": [
{
"type": "string",
"format": "uri"
},
{
"type": "null"
}
]
},
"cancel_until": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
},
{
"type": "null"
}
]
},
"approval_hash": {
"type": "string",
"pattern": "^[0-9a-f]{64}$"
},
"address_status": {
"enum": [
"deliverable",
"corrected"
],
"type": "string"
},
"cancel_summary": {
"type": [
"string",
"null"
]
},
"payment_notice": {
"type": [
"string",
"null"
]
},
"document_sha256": {
"type": "string",
"pattern": "^[0-9a-f]{64}$"
},
"payment_refused": {
"anyOf": [
{
"enum": [
"refused",
"refunded"
],
"type": "string"
},
{
"type": "null"
}
]
},
"replacement_url": {
"anyOf": [
{
"type": "string",
"format": "uri"
},
{
"type": "null"
}
]
},
"tracking_number": {
"type": [
"string",
"null"
]
},
"possible_duplicate": {
"anyOf": [
{
"type": "object",
"required": [
"id",
"approved_at"
],
"properties": {
"id": {
"type": "string",
"pattern": "^mp_[a-z2-7]{20}$"
},
"approved_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
}
},
"next_cursor": {
"type": [
"string",
"null"
]
}
},
"additionalProperties": false
}{
"title": "List the key's mailpieces",
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}cancel_mail — Cancel a mailpiece
Cancel: Delete a draft, or cancel an approved piece before cancel_until. Pass id with the creating key, or the full private mail_url. Example: {"id":"mp_abcdefghijklmnopqrst"}
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"id": {
"type": "string",
"pattern": "^mp_[a-z2-7]{20}$",
"description": "The draft's mp_ ID, with 20 lowercase letters or digits 2–7 after the prefix. Requires the creating API key and is mutually exclusive with mail_url."
},
"mail_url": {
"type": "string",
"format": "uri",
"description": "Complete private MailmanAPI mail_url for the draft, including its ?t= token. An API key is optional. Mutually exclusive with id."
}
},
"additionalProperties": false
}{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"id",
"object",
"mode",
"state",
"product",
"service",
"options",
"pages",
"from",
"to",
"address_status",
"document_sha256",
"quote",
"total_cents",
"route",
"approval_hash",
"approval_url",
"mail_url",
"preview_url",
"receipt_url",
"tracking_number",
"payment",
"cancel_until",
"cancel_summary",
"timeline",
"status",
"cancelable",
"drafted_via",
"to_as_given",
"approval",
"proof",
"record_url",
"share_url",
"possible_duplicate",
"next_step",
"created_at",
"updated_at"
],
"properties": {
"id": {
"type": "string",
"pattern": "^mp_[a-z2-7]{20}$"
},
"to": {
"type": "object",
"required": [
"line1",
"city",
"state",
"zip"
],
"properties": {
"zip": {
"type": "string",
"pattern": "^\\d{5}(-\\d{4})?$",
"description": "ZIP code as a string: 5 digits or ZIP+4, such as 02108 or 02108-1234."
},
"city": {
"type": "string",
"minLength": 1,
"description": "City name."
},
"name": {
"type": "string",
"maxLength": 40,
"description": "Person's name, up to 40 characters. Required when organization is absent or blank."
},
"line1": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "Primary delivery line, such as a street address or PO Box. 1–64 characters."
},
"line2": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "Additional delivery line, such as an apartment, suite or unit. 1–64 characters when present."
},
"state": {
"type": "string",
"pattern": "^[A-Z]{2}$",
"description": "Two-letter uppercase USPS state code, such as PA."
},
"organization": {
"type": "string",
"minLength": 1,
"description": "Company or organization name. Required when name is absent or blank."
}
},
"additionalProperties": false
},
"from": {
"type": "object",
"required": [
"line1",
"city",
"state",
"zip"
],
"properties": {
"zip": {
"type": "string",
"pattern": "^\\d{5}(-\\d{4})?$",
"description": "ZIP code as a string: 5 digits or ZIP+4, such as 02108 or 02108-1234."
},
"city": {
"type": "string",
"minLength": 1,
"description": "City name."
},
"name": {
"type": "string",
"maxLength": 40,
"description": "Person's name, up to 40 characters. Required when organization is absent or blank."
},
"line1": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "Primary delivery line, such as a street address or PO Box. 1–64 characters."
},
"line2": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "Additional delivery line, such as an apartment, suite or unit. 1–64 characters when present."
},
"state": {
"type": "string",
"pattern": "^[A-Z]{2}$",
"description": "Two-letter uppercase USPS state code, such as PA."
},
"organization": {
"type": "string",
"minLength": 1,
"description": "Company or organization name. Required when name is absent or blank."
}
},
"additionalProperties": false
},
"mode": {
"enum": [
"test",
"live"
],
"type": "string"
},
"pages": {
"anyOf": [
{
"type": "integer",
"maximum": 9007199254740991,
"minimum": -9007199254740991
},
{
"type": "null"
}
]
},
"proof": {
"type": "object",
"required": [
"address_layout",
"pages",
"checks"
],
"properties": {
"pages": {
"type": "array",
"items": {
"type": "object",
"required": [
"n",
"label",
"image_url",
"width_pt",
"height_pt"
],
"properties": {
"n": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
},
"label": {
"type": "string"
},
"width_pt": {
"type": "number",
"exclusiveMinimum": 0
},
"height_pt": {
"type": "number",
"exclusiveMinimum": 0
},
"image_url": {
"anyOf": [
{
"type": "string",
"format": "uri"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
}
},
"checks": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"ok",
"message"
],
"properties": {
"ok": {
"type": "boolean"
},
"code": {
"enum": [
"pages",
"blank_top",
"fits_envelope"
],
"type": "string"
},
"value": {
"type": "number"
},
"message": {
"type": "string"
}
},
"additionalProperties": false
}
},
"address_layout": {
"type": "object",
"required": [
"kind",
"windows"
],
"properties": {
"kind": {
"enum": [
"separate_sheet",
"first_page"
],
"type": "string"
},
"windows": {
"type": "array",
"items": {
"type": "object",
"required": [
"x_pt",
"y_pt",
"w_pt",
"h_pt",
"page"
],
"properties": {
"h_pt": {
"type": "number"
},
"page": {
"anyOf": [
{
"type": "number",
"const": 0
},
{
"type": "number",
"const": 1
}
]
},
"w_pt": {
"type": "number"
},
"x_pt": {
"type": "number"
},
"y_pt": {
"type": "number"
}
},
"additionalProperties": false
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"quote": {
"type": "object",
"required": [
"product",
"service",
"options",
"pages",
"line_items",
"provider",
"provider_cost_cents",
"total_cents",
"currency"
],
"properties": {
"pages": {
"anyOf": [
{
"type": "integer",
"maximum": 9007199254740991,
"minimum": -9007199254740991
},
{
"type": "null"
}
]
},
"options": {
"anyOf": [
{
"type": "object",
"required": [
"color",
"duplex"
],
"properties": {
"color": {
"type": "boolean"
},
"duplex": {
"type": "boolean"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"size"
],
"properties": {
"size": {
"enum": [
"4x6",
"6x9",
"6x11"
],
"type": "string"
}
},
"additionalProperties": false
}
]
},
"product": {
"enum": [
"letter",
"postcard"
],
"type": "string"
},
"service": {
"enum": [
"first_class",
"certified",
"certified_err"
],
"type": "string"
},
"currency": {
"type": "string",
"const": "usd"
},
"provider": {
"enum": [
"fake",
"click2mail"
],
"type": "string"
},
"line_items": {
"type": "array",
"items": false,
"maxItems": 3,
"minItems": 3,
"prefixItems": [
{
"type": "object",
"required": [
"code",
"label",
"amount_cents"
],
"properties": {
"code": {
"type": "string",
"const": "postage"
},
"label": {
"type": "string"
},
"amount_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"code",
"label",
"amount_cents"
],
"properties": {
"code": {
"type": "string",
"const": "printing"
},
"label": {
"type": "string"
},
"amount_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"code",
"label",
"amount_cents"
],
"properties": {
"code": {
"type": "string",
"const": "fee"
},
"label": {
"type": "string"
},
"amount_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"additionalProperties": false
}
]
},
"total_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
},
"card_total_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
},
"payment_processing": {
"type": "object",
"required": [
"code",
"label",
"amount_cents"
],
"properties": {
"code": {
"type": "string",
"const": "processing"
},
"label": {
"type": "string"
},
"amount_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"additionalProperties": false
},
"provider_cost_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"additionalProperties": false
},
"route": {
"type": "object",
"required": [
"provider",
"provider_product"
],
"properties": {
"provider": {
"enum": [
"fake",
"click2mail"
],
"type": "string"
},
"provider_product": {
"type": "string"
}
},
"additionalProperties": false
},
"state": {
"enum": [
"draft",
"paid",
"screening",
"review",
"submitted",
"printed",
"mailed",
"in_transit",
"delivered",
"receipt_ready",
"canceled",
"failed",
"returned",
"refunded"
],
"type": "string"
},
"object": {
"type": "string",
"const": "mailpiece"
},
"status": {
"type": "object",
"required": [
"label",
"person",
"cancelable"
],
"properties": {
"label": {
"type": "string"
},
"person": {
"type": "string"
},
"cancelable": {
"type": "boolean"
}
},
"additionalProperties": false
},
"options": {
"anyOf": [
{
"type": "object",
"required": [
"color",
"duplex"
],
"properties": {
"color": {
"type": "boolean"
},
"duplex": {
"type": "boolean"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"size"
],
"properties": {
"size": {
"enum": [
"4x6",
"6x9",
"6x11"
],
"type": "string"
}
},
"additionalProperties": false
}
]
},
"payment": {
"anyOf": [
{
"anyOf": [
{
"type": "object",
"required": [
"method",
"amount_cents",
"charged",
"refund"
],
"properties": {
"method": {
"type": "string",
"const": "test_mode"
},
"refund": {
"anyOf": [
{
"type": "object",
"required": [
"state",
"amount_cents"
],
"properties": {
"state": {
"type": "string",
"const": "not_charged"
},
"amount_cents": {
"type": "number",
"const": 0
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
},
"charged": {
"type": "boolean",
"const": false
},
"amount_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"method",
"amount_cents",
"charged",
"refund"
],
"properties": {
"method": {
"enum": [
"card",
"balance"
],
"type": "string"
},
"refund": {
"anyOf": [
{
"type": "object",
"required": [
"state",
"amount_cents"
],
"properties": {
"state": {
"enum": [
"queued",
"pending",
"refunded",
"review"
],
"type": "string"
},
"amount_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
},
"charged": {
"type": "boolean"
},
"amount_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"additionalProperties": false
}
]
},
{
"type": "null"
}
]
},
"product": {
"enum": [
"letter",
"postcard"
],
"type": "string"
},
"service": {
"enum": [
"first_class",
"certified",
"certified_err"
],
"type": "string"
},
"approval": {
"anyOf": [
{
"type": "object",
"required": [
"at",
"via"
],
"properties": {
"at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
},
"via": {
"enum": [
"approval_page",
"api",
"owner_comp"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
},
"mail_url": {
"type": "string",
"format": "uri"
},
"timeline": {
"type": "array",
"items": {
"type": "object",
"required": [
"at",
"type",
"state",
"source",
"note"
],
"properties": {
"at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
},
"note": {
"type": "string"
},
"type": {
"type": "string"
},
"place": {
"type": "string"
},
"state": {
"anyOf": [
{
"enum": [
"draft",
"paid",
"screening",
"review",
"submitted",
"printed",
"mailed",
"in_transit",
"delivered",
"receipt_ready",
"canceled",
"failed",
"returned",
"refunded"
],
"type": "string"
},
{
"type": "null"
}
]
},
"source": {
"enum": [
"api",
"mcp",
"counter",
"approval",
"pipeline",
"provider",
"usps"
],
"type": "string"
},
"amount_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"additionalProperties": false
}
},
"next_step": {
"type": "string"
},
"share_url": {
"type": "string",
"format": "uri"
},
"cancelable": {
"type": "boolean"
},
"created_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
},
"record_url": {
"type": "string",
"format": "uri"
},
"reprint_of": {
"type": "string",
"pattern": "^mp_[a-z2-7]{20}$"
},
"updated_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
},
"drafted_via": {
"enum": [
"api",
"mcp",
"counter"
],
"type": "string"
},
"preview_url": {
"type": "string",
"format": "uri"
},
"receipt_url": {
"anyOf": [
{
"type": "string",
"format": "uri"
},
{
"type": "null"
}
]
},
"to_as_given": {
"anyOf": [
{
"type": "object",
"required": [
"line1",
"city",
"state",
"zip"
],
"properties": {
"zip": {
"type": "string",
"pattern": "^\\d{5}(-\\d{4})?$",
"description": "ZIP code as a string: 5 digits or ZIP+4, such as 02108 or 02108-1234."
},
"city": {
"type": "string",
"minLength": 1,
"description": "City name."
},
"name": {
"type": "string",
"maxLength": 40,
"description": "Person's name, up to 40 characters. Required when organization is absent or blank."
},
"line1": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "Primary delivery line, such as a street address or PO Box. 1–64 characters."
},
"line2": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "Additional delivery line, such as an apartment, suite or unit. 1–64 characters when present."
},
"state": {
"type": "string",
"pattern": "^[A-Z]{2}$",
"description": "Two-letter uppercase USPS state code, such as PA."
},
"organization": {
"type": "string",
"minLength": 1,
"description": "Company or organization name. Required when name is absent or blank."
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
},
"total_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
},
"approval_url": {
"anyOf": [
{
"type": "string",
"format": "uri"
},
{
"type": "null"
}
]
},
"cancel_until": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
},
{
"type": "null"
}
]
},
"approval_hash": {
"type": "string",
"pattern": "^[0-9a-f]{64}$"
},
"address_status": {
"enum": [
"deliverable",
"corrected"
],
"type": "string"
},
"cancel_summary": {
"type": [
"string",
"null"
]
},
"payment_notice": {
"type": [
"string",
"null"
]
},
"document_sha256": {
"type": "string",
"pattern": "^[0-9a-f]{64}$"
},
"payment_refused": {
"anyOf": [
{
"enum": [
"refused",
"refunded"
],
"type": "string"
},
{
"type": "null"
}
]
},
"replacement_url": {
"anyOf": [
{
"type": "string",
"format": "uri"
},
{
"type": "null"
}
]
},
"tracking_number": {
"type": [
"string",
"null"
]
},
"possible_duplicate": {
"anyOf": [
{
"type": "object",
"required": [
"id",
"approved_at"
],
"properties": {
"id": {
"type": "string",
"pattern": "^mp_[a-z2-7]{20}$"
},
"approved_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
}{
"title": "Cancel a mailpiece",
"readOnlyHint": false,
"openWorldHint": true,
"idempotentHint": false,
"destructiveHint": true
}verify_address — Verify a US postal address
Read: Check a US address before drafting. Returns any corrections, or why it won't deliver. Example: {"address":{"organization":"Example Recipient","line1":"100 Example St","city":"Philadelphia","state":"PA","zip":"19106"}}
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"address"
],
"properties": {
"address": {
"type": "object",
"required": [
"line1",
"city",
"state",
"zip"
],
"properties": {
"zip": {
"type": "string",
"pattern": "^\\d{5}(-\\d{4})?$",
"description": "ZIP code as a string: 5 digits or ZIP+4, such as 02108 or 02108-1234."
},
"city": {
"type": "string",
"minLength": 1,
"description": "City name."
},
"name": {
"type": "string",
"maxLength": 40,
"description": "Person's name, up to 40 characters. Required when organization is absent or blank."
},
"line1": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "Primary delivery line, such as a street address or PO Box. 1–64 characters."
},
"line2": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "Additional delivery line, such as an apartment, suite or unit. 1–64 characters when present."
},
"state": {
"type": "string",
"pattern": "^[A-Z]{2}$",
"description": "Two-letter uppercase USPS state code, such as PA."
},
"organization": {
"type": "string",
"minLength": 1,
"description": "Company or organization name. Required when name is absent or blank."
}
},
"description": "US delivery address to check, with a person or organization name.",
"additionalProperties": false
}
},
"additionalProperties": false
}{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"status",
"address",
"message",
"reason"
],
"properties": {
"reason": {
"anyOf": [
{
"type": "object",
"required": [
"code",
"fields"
],
"properties": {
"code": {
"type": "string"
},
"fields": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
},
"status": {
"enum": [
"deliverable",
"corrected",
"undeliverable"
],
"type": "string"
},
"address": {
"type": "object",
"required": [
"line1",
"city",
"state",
"zip"
],
"properties": {
"zip": {
"type": "string",
"pattern": "^\\d{5}(-\\d{4})?$",
"description": "ZIP code as a string: 5 digits or ZIP+4, such as 02108 or 02108-1234."
},
"city": {
"type": "string",
"minLength": 1,
"description": "City name."
},
"name": {
"type": "string",
"maxLength": 40,
"description": "Person's name, up to 40 characters. Required when organization is absent or blank."
},
"line1": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "Primary delivery line, such as a street address or PO Box. 1–64 characters."
},
"line2": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "Additional delivery line, such as an apartment, suite or unit. 1–64 characters when present."
},
"state": {
"type": "string",
"pattern": "^[A-Z]{2}$",
"description": "Two-letter uppercase USPS state code, such as PA."
},
"organization": {
"type": "string",
"minLength": 1,
"description": "Company or organization name. Required when name is absent or blank."
}
},
"additionalProperties": false
},
"message": {
"type": "string"
}
},
"additionalProperties": false
}{
"title": "Verify a US postal address",
"readOnlyHint": false,
"openWorldHint": true,
"idempotentHint": false,
"destructiveHint": true
}get_balance — Read the API key balance
Read: Your API key's balance in US cents. Test keys show 0. Example: {}
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {},
"additionalProperties": false
}{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"mode",
"balance_cents",
"currency"
],
"properties": {
"mode": {
"enum": [
"test",
"live"
],
"type": "string"
},
"currency": {
"type": "string",
"const": "usd"
},
"balance_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"additionalProperties": false
}{
"title": "Read the API key balance",
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}approve_mail — Approve from prepaid balance
Spend prepaid funds: Spend from prepaid balance only when the creating key's owner enabled Send without human approval and set a monthly cap. Pass id and the exact approval_hash from send_mail. Otherwise share approval_url.
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"approval_hash",
"id"
],
"properties": {
"id": {
"type": "string",
"pattern": "^mp_[a-z2-7]{20}$",
"description": "The draft's mp_ ID, with 20 lowercase letters or digits 2–7 after the prefix. Requires the creating API key with auto-send enabled."
},
"approval_hash": {
"type": "string",
"pattern": "^[0-9a-f]{64}$",
"description": "The draft's exact approval_hash: 64 lowercase hex characters that cover its contents and price."
}
},
"additionalProperties": false
}{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"id",
"object",
"mode",
"state",
"product",
"service",
"options",
"pages",
"from",
"to",
"address_status",
"document_sha256",
"quote",
"total_cents",
"route",
"approval_hash",
"approval_url",
"mail_url",
"preview_url",
"receipt_url",
"tracking_number",
"payment",
"cancel_until",
"cancel_summary",
"timeline",
"status",
"cancelable",
"drafted_via",
"to_as_given",
"approval",
"proof",
"record_url",
"share_url",
"possible_duplicate",
"next_step",
"created_at",
"updated_at"
],
"properties": {
"id": {
"type": "string",
"pattern": "^mp_[a-z2-7]{20}$"
},
"to": {
"type": "object",
"required": [
"line1",
"city",
"state",
"zip"
],
"properties": {
"zip": {
"type": "string",
"pattern": "^\\d{5}(-\\d{4})?$",
"description": "ZIP code as a string: 5 digits or ZIP+4, such as 02108 or 02108-1234."
},
"city": {
"type": "string",
"minLength": 1,
"description": "City name."
},
"name": {
"type": "string",
"maxLength": 40,
"description": "Person's name, up to 40 characters. Required when organization is absent or blank."
},
"line1": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "Primary delivery line, such as a street address or PO Box. 1–64 characters."
},
"line2": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "Additional delivery line, such as an apartment, suite or unit. 1–64 characters when present."
},
"state": {
"type": "string",
"pattern": "^[A-Z]{2}$",
"description": "Two-letter uppercase USPS state code, such as PA."
},
"organization": {
"type": "string",
"minLength": 1,
"description": "Company or organization name. Required when name is absent or blank."
}
},
"additionalProperties": false
},
"from": {
"type": "object",
"required": [
"line1",
"city",
"state",
"zip"
],
"properties": {
"zip": {
"type": "string",
"pattern": "^\\d{5}(-\\d{4})?$",
"description": "ZIP code as a string: 5 digits or ZIP+4, such as 02108 or 02108-1234."
},
"city": {
"type": "string",
"minLength": 1,
"description": "City name."
},
"name": {
"type": "string",
"maxLength": 40,
"description": "Person's name, up to 40 characters. Required when organization is absent or blank."
},
"line1": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "Primary delivery line, such as a street address or PO Box. 1–64 characters."
},
"line2": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "Additional delivery line, such as an apartment, suite or unit. 1–64 characters when present."
},
"state": {
"type": "string",
"pattern": "^[A-Z]{2}$",
"description": "Two-letter uppercase USPS state code, such as PA."
},
"organization": {
"type": "string",
"minLength": 1,
"description": "Company or organization name. Required when name is absent or blank."
}
},
"additionalProperties": false
},
"mode": {
"enum": [
"test",
"live"
],
"type": "string"
},
"pages": {
"anyOf": [
{
"type": "integer",
"maximum": 9007199254740991,
"minimum": -9007199254740991
},
{
"type": "null"
}
]
},
"proof": {
"type": "object",
"required": [
"address_layout",
"pages",
"checks"
],
"properties": {
"pages": {
"type": "array",
"items": {
"type": "object",
"required": [
"n",
"label",
"image_url",
"width_pt",
"height_pt"
],
"properties": {
"n": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
},
"label": {
"type": "string"
},
"width_pt": {
"type": "number",
"exclusiveMinimum": 0
},
"height_pt": {
"type": "number",
"exclusiveMinimum": 0
},
"image_url": {
"anyOf": [
{
"type": "string",
"format": "uri"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
}
},
"checks": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"ok",
"message"
],
"properties": {
"ok": {
"type": "boolean"
},
"code": {
"enum": [
"pages",
"blank_top",
"fits_envelope"
],
"type": "string"
},
"value": {
"type": "number"
},
"message": {
"type": "string"
}
},
"additionalProperties": false
}
},
"address_layout": {
"type": "object",
"required": [
"kind",
"windows"
],
"properties": {
"kind": {
"enum": [
"separate_sheet",
"first_page"
],
"type": "string"
},
"windows": {
"type": "array",
"items": {
"type": "object",
"required": [
"x_pt",
"y_pt",
"w_pt",
"h_pt",
"page"
],
"properties": {
"h_pt": {
"type": "number"
},
"page": {
"anyOf": [
{
"type": "number",
"const": 0
},
{
"type": "number",
"const": 1
}
]
},
"w_pt": {
"type": "number"
},
"x_pt": {
"type": "number"
},
"y_pt": {
"type": "number"
}
},
"additionalProperties": false
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"quote": {
"type": "object",
"required": [
"product",
"service",
"options",
"pages",
"line_items",
"provider",
"provider_cost_cents",
"total_cents",
"currency"
],
"properties": {
"pages": {
"anyOf": [
{
"type": "integer",
"maximum": 9007199254740991,
"minimum": -9007199254740991
},
{
"type": "null"
}
]
},
"options": {
"anyOf": [
{
"type": "object",
"required": [
"color",
"duplex"
],
"properties": {
"color": {
"type": "boolean"
},
"duplex": {
"type": "boolean"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"size"
],
"properties": {
"size": {
"enum": [
"4x6",
"6x9",
"6x11"
],
"type": "string"
}
},
"additionalProperties": false
}
]
},
"product": {
"enum": [
"letter",
"postcard"
],
"type": "string"
},
"service": {
"enum": [
"first_class",
"certified",
"certified_err"
],
"type": "string"
},
"currency": {
"type": "string",
"const": "usd"
},
"provider": {
"enum": [
"fake",
"click2mail"
],
"type": "string"
},
"line_items": {
"type": "array",
"items": false,
"maxItems": 3,
"minItems": 3,
"prefixItems": [
{
"type": "object",
"required": [
"code",
"label",
"amount_cents"
],
"properties": {
"code": {
"type": "string",
"const": "postage"
},
"label": {
"type": "string"
},
"amount_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"code",
"label",
"amount_cents"
],
"properties": {
"code": {
"type": "string",
"const": "printing"
},
"label": {
"type": "string"
},
"amount_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"code",
"label",
"amount_cents"
],
"properties": {
"code": {
"type": "string",
"const": "fee"
},
"label": {
"type": "string"
},
"amount_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"additionalProperties": false
}
]
},
"total_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
},
"card_total_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
},
"payment_processing": {
"type": "object",
"required": [
"code",
"label",
"amount_cents"
],
"properties": {
"code": {
"type": "string",
"const": "processing"
},
"label": {
"type": "string"
},
"amount_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"additionalProperties": false
},
"provider_cost_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"additionalProperties": false
},
"route": {
"type": "object",
"required": [
"provider",
"provider_product"
],
"properties": {
"provider": {
"enum": [
"fake",
"click2mail"
],
"type": "string"
},
"provider_product": {
"type": "string"
}
},
"additionalProperties": false
},
"state": {
"enum": [
"draft",
"paid",
"screening",
"review",
"submitted",
"printed",
"mailed",
"in_transit",
"delivered",
"receipt_ready",
"canceled",
"failed",
"returned",
"refunded"
],
"type": "string"
},
"object": {
"type": "string",
"const": "mailpiece"
},
"status": {
"type": "object",
"required": [
"label",
"person",
"cancelable"
],
"properties": {
"label": {
"type": "string"
},
"person": {
"type": "string"
},
"cancelable": {
"type": "boolean"
}
},
"additionalProperties": false
},
"options": {
"anyOf": [
{
"type": "object",
"required": [
"color",
"duplex"
],
"properties": {
"color": {
"type": "boolean"
},
"duplex": {
"type": "boolean"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"size"
],
"properties": {
"size": {
"enum": [
"4x6",
"6x9",
"6x11"
],
"type": "string"
}
},
"additionalProperties": false
}
]
},
"payment": {
"anyOf": [
{
"anyOf": [
{
"type": "object",
"required": [
"method",
"amount_cents",
"charged",
"refund"
],
"properties": {
"method": {
"type": "string",
"const": "test_mode"
},
"refund": {
"anyOf": [
{
"type": "object",
"required": [
"state",
"amount_cents"
],
"properties": {
"state": {
"type": "string",
"const": "not_charged"
},
"amount_cents": {
"type": "number",
"const": 0
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
},
"charged": {
"type": "boolean",
"const": false
},
"amount_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"method",
"amount_cents",
"charged",
"refund"
],
"properties": {
"method": {
"enum": [
"card",
"balance"
],
"type": "string"
},
"refund": {
"anyOf": [
{
"type": "object",
"required": [
"state",
"amount_cents"
],
"properties": {
"state": {
"enum": [
"queued",
"pending",
"refunded",
"review"
],
"type": "string"
},
"amount_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
},
"charged": {
"type": "boolean"
},
"amount_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"additionalProperties": false
}
]
},
{
"type": "null"
}
]
},
"product": {
"enum": [
"letter",
"postcard"
],
"type": "string"
},
"service": {
"enum": [
"first_class",
"certified",
"certified_err"
],
"type": "string"
},
"approval": {
"anyOf": [
{
"type": "object",
"required": [
"at",
"via"
],
"properties": {
"at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
},
"via": {
"enum": [
"approval_page",
"api",
"owner_comp"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
},
"mail_url": {
"type": "string",
"format": "uri"
},
"timeline": {
"type": "array",
"items": {
"type": "object",
"required": [
"at",
"type",
"state",
"source",
"note"
],
"properties": {
"at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
},
"note": {
"type": "string"
},
"type": {
"type": "string"
},
"place": {
"type": "string"
},
"state": {
"anyOf": [
{
"enum": [
"draft",
"paid",
"screening",
"review",
"submitted",
"printed",
"mailed",
"in_transit",
"delivered",
"receipt_ready",
"canceled",
"failed",
"returned",
"refunded"
],
"type": "string"
},
{
"type": "null"
}
]
},
"source": {
"enum": [
"api",
"mcp",
"counter",
"approval",
"pipeline",
"provider",
"usps"
],
"type": "string"
},
"amount_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
}
},
"additionalProperties": false
}
},
"next_step": {
"type": "string"
},
"share_url": {
"type": "string",
"format": "uri"
},
"cancelable": {
"type": "boolean"
},
"created_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
},
"record_url": {
"type": "string",
"format": "uri"
},
"reprint_of": {
"type": "string",
"pattern": "^mp_[a-z2-7]{20}$"
},
"updated_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
},
"drafted_via": {
"enum": [
"api",
"mcp",
"counter"
],
"type": "string"
},
"preview_url": {
"type": "string",
"format": "uri"
},
"receipt_url": {
"anyOf": [
{
"type": "string",
"format": "uri"
},
{
"type": "null"
}
]
},
"to_as_given": {
"anyOf": [
{
"type": "object",
"required": [
"line1",
"city",
"state",
"zip"
],
"properties": {
"zip": {
"type": "string",
"pattern": "^\\d{5}(-\\d{4})?$",
"description": "ZIP code as a string: 5 digits or ZIP+4, such as 02108 or 02108-1234."
},
"city": {
"type": "string",
"minLength": 1,
"description": "City name."
},
"name": {
"type": "string",
"maxLength": 40,
"description": "Person's name, up to 40 characters. Required when organization is absent or blank."
},
"line1": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "Primary delivery line, such as a street address or PO Box. 1–64 characters."
},
"line2": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "Additional delivery line, such as an apartment, suite or unit. 1–64 characters when present."
},
"state": {
"type": "string",
"pattern": "^[A-Z]{2}$",
"description": "Two-letter uppercase USPS state code, such as PA."
},
"organization": {
"type": "string",
"minLength": 1,
"description": "Company or organization name. Required when name is absent or blank."
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
},
"total_cents": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0
},
"approval_url": {
"anyOf": [
{
"type": "string",
"format": "uri"
},
{
"type": "null"
}
]
},
"cancel_until": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
},
{
"type": "null"
}
]
},
"approval_hash": {
"type": "string",
"pattern": "^[0-9a-f]{64}$"
},
"address_status": {
"enum": [
"deliverable",
"corrected"
],
"type": "string"
},
"cancel_summary": {
"type": [
"string",
"null"
]
},
"payment_notice": {
"type": [
"string",
"null"
]
},
"document_sha256": {
"type": "string",
"pattern": "^[0-9a-f]{64}$"
},
"payment_refused": {
"anyOf": [
{
"enum": [
"refused",
"refunded"
],
"type": "string"
},
{
"type": "null"
}
]
},
"replacement_url": {
"anyOf": [
{
"type": "string",
"format": "uri"
},
{
"type": "null"
}
]
},
"tracking_number": {
"type": [
"string",
"null"
]
},
"possible_duplicate": {
"anyOf": [
{
"type": "object",
"required": [
"id",
"approved_at"
],
"properties": {
"id": {
"type": "string",
"pattern": "^mp_[a-z2-7]{20}$"
},
"approved_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
}{
"title": "Approve from prepaid balance",
"readOnlyHint": false,
"openWorldHint": true,
"idempotentHint": true,
"destructiveHint": true
}Prompts
Not advertised
Resources
Not advertised
90-day uptime
A lightweight connection check about every six hours, sampled on hosts with many listings. It shows the server answered, not that its tools work.
- 2026-12-02: 1 of 1 checks answered
30-day availability
Aggregated from read-only remote checks; this is not a tool-execution or security guarantee.
- Successful checks
- 1 of 1 (100%)
- Average latency
- 445 ms
- 95th percentile latency
- 445 ms
Maintenance history
Public check and source-refresh events. Editorial and ownership records remain private.
- · probe · passed · 445 ms · metadata changed · 9 tool(s)
Connect from your client
Each snippet registers the same endpoint; pick the client you use.
Claude Code
claude mcp add --transport http mailmanapi-mcp https://mailmanapi.com/mcpCodex
codex mcp add mailmanapi-mcp --url https://mailmanapi.com/mcpCursor
{
"mcpServers": {
"mailmanapi-mcp": {
"url": "https://mailmanapi.com/mcp"
}
}
}Cline
{
"mcpServers": {
"mailmanapi-mcp": {
"type": "streamableHttp",
"url": "https://mailmanapi.com/mcp",
"disabled": false
}
}
}VS Code
{
"servers": {
"mailmanapi-mcp": {
"type": "http",
"url": "https://mailmanapi.com/mcp"
}
}
}Gemini CLI
gemini mcp add --transport http mailmanapi-mcp https://mailmanapi.com/mcpClaude Desktop
https://mailmanapi.com/mcpWindsurf
{
"mcpServers": {
"mailmanapi-mcp": {
"serverUrl": "https://mailmanapi.com/mcp"
}
}
}Let your agent find its tools
Find servers like MailmanAPI MCP from your agent. Add Koskamo once to search the index for endpoints, access requirements, and client setup. Public discovery needs no key.
Other productivity and knowledge servers
Do you run MailmanAPI MCP?
Prove ownership with a DNS record, a well-known file, or your Official MCP Registry entry, and your edits publish immediately. Proofs are re-checked weekly; admins can still hide or remove a listing.