Create a draft
cooper_create_draftUse this when you want to prepare a message without sending it yet. Requires auth and message_send or draft_write. draft_write does not send mail. Inputs: inbox_id (required; inbox id, username, or email), to, cc, bcc, reply_to, subject, text, html, attachments, labels, headers, in_reply_to or forward_of (one source message; not both), reply_all (only with in_reply_to), include_attachments (forward only; default true), send_at (optional ISO-8601 timestamp; sets the scheduled label and send_status scheduled), client_id (optional). Reply recipients and Re: come from the source message, so omit to on a reply. A forward keeps your text and merges the original body and attachments when it sends. A held source message returns HTTP 409 message_held. Returns the draft. The same client_id returns the original draft and does not create another. send_at on an inbox whose send_mode is approval emails verified owners. No verified owner returns HTTP 409 owner_required and stores nothing.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cc | No | Cc addresses. On a reply these are merged with the derived recipients. | |
| to | No | Recipient addresses. Omit on a reply. An empty list clears them on update. | |
| bcc | No | Bcc addresses. | |
| html | No | HTML body. | |
| text | No | Plain-text body. | |
| labels | No | Labels to set. The scheduled label is reserved. | |
| send_at | No | ISO-8601 time to send. Null is ignored on create. Must be within 366 days. | |
| subject | No | Subject. A reply or forward fills this from the source message when omitted. | |
| inbox_id | Yes | Inbox id (inb_…), username, or full email address | |
| reply_to | No | Reply-To address, or a comma-separated list. | |
| client_id | No | Idempotency key. The same value returns the original draft. | |
| reply_all | No | When true with in_reply_to, address the whole thread. Requires in_reply_to. | |
| forward_of | No | Message id to forward. Mutually exclusive with in_reply_to. | |
| attachments | No | Files to store on the draft. Each item is {filename, content_base64, content_type?, content_id?}. | |
| in_reply_to | No | Message id to reply to. Mutually exclusive with forward_of. | |
| include_attachments | No | On a forward, copy the original attachments when the draft sends. Default true. |