{"uid":"cap_JTdsbHwfQJMBkwp-yqW95","slug":"mermail-agent-mailbox-draft-creator-a6de4e06","name":"Mermail Agent Mailbox Draft Creator","description":"An inbox and wallet for your AI agent. Find and nurture sales leads, resolve customer support, and handle online purchases with controlled payments.","url":"https://console.mermail.app/api/agent/v1/mailboxes/%7BmailboxId%7D/drafts?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"cc":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"to":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"bcc":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"body":{"type":"string"},"subject":{"type":"string"},"draft_id":{"type":"string"},"thread_id":{"type":"string"},"attachments":{"type":"array","items":{"type":"object"}},"body_format":{"enum":["html","text"],"type":"string"},"in_reply_to":{"type":"string"}}},"responseSchema":{"type":"json","example":{"id":"draft_1","date":"2026-09-20T00:00:00.000Z","sender":"noreply@example.com","subject":"Verification code","recipient":"agent@mermail.app","scan_status":"clean"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_wrD17i2H6ZUaCpDtlxLpG","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Creates an email draft in a specified AI agent mailbox, optionally as a reply within an existing thread","exampleAgentPrompt":"Save a draft email in my Mermail mailbox mb_abc123 to leads@acme.com with the subject 'Following up on your inquiry' and a plain text body saying 'Hi there, just checking in on our earlier conversation — happy to answer any questions you have.'","exampleUseCases":[{"title":"Sales lead follow-up draft","prompt":"Create a draft in my Mermail mailbox mb_sales01 addressed to prospect@bigcorp.com with subject 'Quick follow-up on our demo' and a plain text body that says 'Hi Sarah, loved chatting last week — wanted to see if you had any questions about pricing.'"},{"title":"Customer support reply draft","prompt":"Draft a reply in my agent's Mermail mailbox mb_support99 to the thread thread_4821, addressed to customer@example.com, with subject 'Re: Your refund request' and an HTML body explaining that the refund has been processed."},{"title":"Scheduled newsletter draft with BCC","prompt":"Prepare an email draft in Mermail mailbox mb_mktg77 to subscribers@mylist.com, BCC my manager at boss@company.com, subject 'October Product Update', with an HTML-formatted body of our monthly newsletter content, so I can review and send it later."}],"resultDescription":"Returns a JSON object containing the newly created draft's unique ID, creation date, sender address, recipient address, subject line, and a scan_status field confirming the draft content has been scanned (e.g. 'clean').","failureModes":["Invalid or non-existent mailboxId returns 404 not found","Missing required fields (body or recipient) may return 400 bad request","Invalid email address format in to/cc/bcc fields causes validation error","Referencing a non-existent thread_id may return an error or orphan the draft","Payment failure via x402 protocol returns 402 Payment Required","Malformed attachment objects in the attachments array cause 400 errors","Unsupported body_format value outside 'html' or 'text' enum returns validation error"],"whenToPreferThis":"Use this endpoint when an AI agent needs to compose and save an outgoing email draft within a Mermail-managed mailbox before sending — especially useful for sales outreach, customer support workflows, or any scenario where a human or automated review step is needed before delivery. Prefer this over direct send endpoints when the agent needs to queue messages, allow for human review, or build up threaded replies incrementally.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-11T12:30:29.355Z","isFirstParty":false,"canonicalSlug":"mermail-agent-mailbox-draft-creator-a6de4e06"}