{"openapi":"3.1.0","info":{"title":"Mail On My Behalf — draft preparation API","version":"0.3.2","description":"Public postal letter draft tools. No authentication. The tools describe service capabilities, calculate illustrative estimates, and create private review links following informed transfer consent for this draft. A prior informed-consent user turn is required unless the same user turn explicitly acknowledges the transfer, temporary encrypted retention and private bearer-link access disclosures; a generic prepare/mail request is insufficient. Drafts are encrypted in bounded server memory for up to one hour; a restart can expire them early. Anyone holding a review link can access its draft. No customer records, payment, mailing-order creation, remote URL fetching or delivery claims. Website review and checkout are separate. Excluded inputs include card data, protected health information, government identifiers, credentials and authentication codes. Domain ownership and a private ChatGPT MCP connection have been verified. Public review/listing and full workflow checks remain pending; Claude and Gemini connections have not been verified. The platformVerified flag remains false for public platform approval."},"servers":[{"url":"https://mailonmybehalf.com"}],"security":[],"paths":{"/api/capabilities":{"get":{"operationId":"getCapabilities","summary":"Read draft-tool capabilities and limitations","description":"Describes supported US postal letter services, draft-tool limits, privacy and connection status. No customer information is needed. Customer orders and delivery proof are outside its scope.","responses":{"200":{"description":"Draft-tool services, limits, privacy and status. Payment and liveMailing flags describe these public tools, not website ordering availability.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["name","mode","protocol","authentication","liveMailing","payments","marketplaceListed","platformVerified","tools","services","limits","documentInput","privacy","pricing","nextStep"],"properties":{"name":{"type":"string"},"mode":{"const":"draft-tools"},"protocol":{"type":"string"},"authentication":{"const":"none"},"liveMailing":{"const":false},"payments":{"const":false},"marketplaceListed":{"const":false},"platformVerified":{"const":false},"tools":{"type":"array","items":{"type":"string"}},"services":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["id","name","caveat"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"caveat":{"type":"string"}}}},"limits":{"type":"object","additionalProperties":false,"required":["maxPages","maxDraftCharacters","maxRequestBytes","draftLinkExpiresInSeconds"],"properties":{"maxPages":{"type":"integer"},"maxDraftCharacters":{"type":"integer"},"maxRequestBytes":{"type":"integer"},"draftLinkExpiresInSeconds":{"type":"integer"}}},"documentInput":{"type":"string"},"privacy":{"type":"string"},"pricing":{"type":"string"},"nextStep":{"type":"string"}}}}}},"403":{"description":"Request Host or Origin is not allowed.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false}}}},"429":{"description":"Draft tool rate limit reached; retry after 60 seconds.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false}}}},"503":{"description":"The draft service is temporarily unavailable or origin configuration is invalid.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false}}}}}}},"/api/estimate":{"post":{"operationId":"estimateLetter","summary":"Calculate an illustrative USD estimate","description":"Calculates an illustrative integer-cent USD estimate from the known final PDF page count. The result is not a live supplier quote or payable amount. Tax is not calculated. Body limit: 1,024 bytes.","x-openai-isConsequential":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"serviceId":{"type":"string","enum":["first-class","certified","certified-return-receipt"],"description":"Service to estimate: first-class, certified, or certified-return-receipt."},"pages":{"type":"integer","minimum":1,"maximum":100,"description":"Known final PDF page count, 1–100. This illustrative estimate uses the final PDF count rather than a count inferred from text length."}},"required":["serviceId","pages"],"additionalProperties":false}}}},"responses":{"200":{"description":"Illustrative estimate only.","content":{"application/json":{"schema":{"type":"object","properties":{"serviceId":{"type":"string","enum":["first-class","certified","certified-return-receipt"]},"pages":{"type":"integer","minimum":1,"maximum":100},"currency":{"type":"string","const":"USD"},"baseCents":{"type":"integer","minimum":0,"maximum":9007199254740991},"additionalPagesCents":{"type":"integer","minimum":0,"maximum":9007199254740991},"totalCents":{"type":"integer","minimum":0,"maximum":9007199254740991},"illustrative":{"type":"boolean","const":true},"taxCalculated":{"type":"boolean","const":false},"payable":{"type":"boolean","const":false}},"required":["serviceId","pages","currency","baseCents","additionalPagesCents","totalCents","illustrative","taxCalculated","payable"],"additionalProperties":false}}}},"400":{"description":"Invalid input or unsupported fields.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Request Host or Origin is not allowed.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false}}}},"408":{"description":"Request body timed out.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false}}}},"413":{"description":"Request exceeds the body size limit.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false}}}},"415":{"description":"Use uncompressed application/json.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false}}}},"429":{"description":"Draft tool rate limit reached; retry after 60 seconds.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false}}}},"503":{"description":"The draft service is temporarily unavailable or origin configuration is invalid.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false}}}}}}},"/api/drafts":{"post":{"operationId":"prepareLetter","summary":"Create a private postal letter review link","description":"Creates a private draft following informed transfer consent for this draft. Mail On My Behalf receives text and optional addresses; encrypted memory retention is up to 1h, restart can expire it sooner, and anyone with the link can access it. No paid order or mailing is created.","x-openai-isConsequential":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":12000,"pattern":"^[^\\x00-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]+$","description":"Final plain text, 1–12,000 characters, covered by informed transfer consent for this draft. The transfer sends the letter and optional addresses to Mail On My Behalf; an encrypted copy remains in temporary server memory for up to one hour, restart may expire it sooner, and anyone with the private review link can access it while valid. A prior informed-consent user turn is required unless the same user turn explicitly acknowledges these disclosures for this draft; a generic prepare/mail request is insufficient. Excluded inputs include card data, protected health information, government identifiers, credentials and authentication codes."},"sender":{"description":"Optional complete US return address supplied by the user. Missing address data can be entered on the website; incomplete addresses are not included in this field.","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[^\\x00-\\x1f\\x7f]+$"},"street":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[^\\x00-\\x1f\\x7f]+$"},"unit":{"type":"string","maxLength":100,"pattern":"^[^\\x00-\\x1f\\x7f]*$"},"city":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[^\\x00-\\x1f\\x7f]+$"},"state":{"type":"string","enum":["AL","AK","AZ","AR","CA","CO","CT","DE","DC","FL","GA","HI","ID","IL","IN","IA","KS","KY","LA","ME","MD","MA","MI","MN","MS","MO","MT","NE","NV","NH","NJ","NM","NY","NC","ND","OH","OK","OR","PA","RI","SC","SD","TN","TX","UT","VT","VA","WA","WV","WI","WY"]},"zip":{"type":"string","pattern":"^(?!00000)\\d{5}(-\\d{4})?$"}},"required":["name","street","unit","city","state","zip"],"additionalProperties":false},"recipient":{"description":"Optional complete US recipient address supplied by the user. Missing address data can be entered on the website; incomplete or unknown addresses are not included in this field.","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[^\\x00-\\x1f\\x7f]+$"},"street":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[^\\x00-\\x1f\\x7f]+$"},"unit":{"type":"string","maxLength":100,"pattern":"^[^\\x00-\\x1f\\x7f]*$"},"city":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[^\\x00-\\x1f\\x7f]+$"},"state":{"type":"string","enum":["AL","AK","AZ","AR","CA","CO","CT","DE","DC","FL","GA","HI","ID","IL","IN","IA","KS","KY","LA","ME","MD","MA","MI","MN","MS","MO","MT","NE","NV","NH","NJ","NM","NY","NC","ND","OH","OK","OR","PA","RI","SC","SD","TN","TX","UT","VT","VA","WA","WV","WI","WY"]},"zip":{"type":"string","pattern":"^(?!00000)\\d{5}(-\\d{4})?$"}},"required":["name","street","unit","city","state","zip"],"additionalProperties":false},"serviceId":{"description":"Optional mailing service explicitly selected by the user for this draft. A prior comparison, estimate, recommendation or generic preference does not establish a selection for this draft. The user confirms the service on the website before payment.","type":"string","enum":["first-class","certified","certified-return-receipt"]}},"required":["text"],"additionalProperties":false}}}},"responses":{"200":{"description":"Draft-only link for human review.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"draft-only"},"reviewUrl":{"type":"string","format":"uri"},"expiresAt":{"type":"string"},"requiresHumanReview":{"type":"boolean","const":true},"charged":{"type":"boolean","const":false},"mailed":{"type":"boolean","const":false},"privacyNotice":{"type":"string"}},"required":["status","reviewUrl","expiresAt","requiresHumanReview","charged","mailed","privacyNotice"],"additionalProperties":false}}}},"400":{"description":"Invalid input or unsupported fields.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Request Host or Origin is not allowed.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false}}}},"408":{"description":"Request body timed out.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false}}}},"413":{"description":"Request exceeds the body size limit.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false}}}},"415":{"description":"Use uncompressed application/json.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false}}}},"429":{"description":"Draft tool rate limit reached; retry after 60 seconds.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false}}}},"503":{"description":"The draft service is temporarily unavailable or origin configuration is invalid.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false}}}}}}}}}