Update a draft
cooper_update_draftUse this when a draft should change before it sends. Requires auth and message_send or draft_write. This call does not send the draft. Inputs: inbox_id (required), draft_id (required), and any of to, cc, bcc, reply_to, subject, text, html, add_attachments, remove_attachments, add_labels, remove_labels, send_at. Omit a field to leave it unchanged. Null, or an empty list for recipients, clears that field. send_at null removes the schedule and the scheduled label. Reply and forward cannot be changed. The scheduled label cannot be set by hand. A draft with send_status sending returns HTTP 409 draft_sending. Returns the updated draft.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cc | No | Replacement Cc list. An empty list clears Cc. | |
| to | No | Replacement To list. An empty list clears recipients. Omit to leave them unchanged. | |
| bcc | No | Replacement Bcc list. An empty list clears Bcc. | |
| html | No | Replacement HTML body. Null clears it. | |
| text | No | Replacement plain-text body. Null clears it. | |
| send_at | No | ISO-8601 time to send, or null to unschedule. | |
| subject | No | Replacement subject. Null clears it. | |
| draft_id | Yes | Draft id (dft_…) | |
| inbox_id | Yes | Inbox id (inb_…), username, or full email address | |
| reply_to | No | Replacement Reply-To. Null clears it. | |
| add_labels | No | Labels to add. scheduled is reserved. | |
| remove_labels | No | Labels to remove. scheduled is reserved. | |
| add_attachments | No | Attachments to add. Each item is {filename, content_base64, content_type?, content_id?}. | |
| remove_attachments | No | Attachment ids to remove from the draft. |