/v1/workspaces/{workspace_id}/threads/{id}/draftsAuthDraft a reply or forward
Writes a reply, reply-all or forward of a message in this conversation without sending it. Recipients and subject are computed now, as `POST /threads/{id}/reply` would (pass `to` to replace them). `submit: true` puts it straight in the approval queue (`pending_approval`, `draft.pending_approval` webhook). This is how agents answer mail: an MCP grant or an OAuth client cannot send, a person approves (`POST /drafts/{id}/approve`). One open draft per message and author. Needs `mail.draft.create` on the mailbox.
Path parameters
workspace_id*string · uuidId of the workspace.
id*string · uuidThread id.
Headers
Idempotency-KeystringOpaque client-generated string (1–256 chars, `[A-Za-z0-9._:-]`) used to deduplicate retries within a 24h window. A retry with the same key and body returns the original response with `Idempotent-Replay: true`.
Request body
htmlstringHTML body. At least one of `html` and `text` before the draft is submitted or sent. Replies quote the answered message under it when sent (`quote`).
Example: "<p>Thanks, the refund is on its way.</p>"
textstringPlain-text body. At least one of `html` and `text` before the draft is submitted or sent.
Example: "Thanks, the refund is on its way."
toobjectRecipients. Replies: replaces the computed ones (the answered message's `Reply-To`, else its sender; reply-all adds its `To` and `Cc`). Forwards and new emails: required before sending. At most 50 recipients across `to`, `cc` and `bcc`.
Example: ["success@simulator.amazonses.com"]
ccobjectCc recipients: one address or an array. Shown in the `Cc` header to every recipient.
Example: ["finance@example.com"]
bccobjectBcc recipients: one address or an array. Each gets the message; no header names them.
Example: ["audit@example.com"]
subjectstringSubject. Replies default to `Re: ` + the answered subject, forwards to `Fwd: ` + it.
Example: "Re: Refund for order 42"
quotebooleanReplies: quote the answered message under the text when sent. Default true.
attachmentsarrayFiles, as on `POST /emails` (at most 20, 10 MB in total after decoding; executable types are refused). Stored with the draft and sent with it; on an edit the list replaces the stored one.
kind*object`reply` (the sender), `reply_all` (and everyone on the answered message) or `forward` (to `to`).
Example: "reply"
message_id*string · uuidThe message answered or forwarded: a received or sent message of this thread (`GET /threads/{id}` `messages[].id`).
Example: "3f0a3c3e-6c1d-4b8e-9b7a-0d4b1c2e3f40"
submitbooleanSubmit for approval at once (`status: pending_approval`). Default false: the draft stays a `draft` until `POST /drafts/{id}/submit`.
Response · 201
id*string · uuidDraft id.
mailbox_id*string · uuidThe mailbox it is sent from.
thread_id*string · uuidThe conversation; null for a `new` email until it is sent.
reply_to_message_id*string · uuidThe message answered or forwarded; null for `new`.
kind*object`reply`, `reply_all`, `forward` (of `reply_to_message_id`) or `new` (a new email from the mailbox).
status*object`draft` → `pending_approval` (submitted) → `sent` (approved and sent) or `rejected`. `discarded` when deleted. `approved` only while the send is in flight.
to*arrayTo recipients (for replies, computed when the draft was created).
cc*arrayCc recipients.
bcc*arrayBcc recipients.
subject*stringSubject it will go out with.
text*stringPlain-text body written in the draft (the quote of the answered message is added when sent).
html*stringHTML body written in the draft.
quote*booleanReplies: the answered message is quoted under the text when sent.
attachments*arrayFiles stored with the draft.
author*objecttype*object`user`: a person signed in. `api_key`: a Platform API Key. `agent`: an MCP grant or an OAuth client acting for a person.
id*string · uuidAccount id (people, and the person an agent acted for) or API key id.
label*stringDisplay label: the OAuth client, key name or email.
is_agent*booleanWritten by an agent (MCP grant or OAuth client).
on_behalf_of_user_id*string · uuidThe person an agent acted for, or who created the API key. They cannot approve it.
client_id*stringOAuth client id of an agent.
submitted_at*string · date-timeWhen it was submitted for approval.
reviewed_by*string · uuidThe person who approved or rejected it.
reviewed_at*string · date-timeWhen it was approved or rejected.
review_note*stringThe reviewer's note.
sent_email_id*string · uuidThe email it was sent as (`GET /emails/{id}`; a message of the thread).
version*integerBumped on every change; pass it to edit, approve or send.
Example: 1
created_at*string · date-timeWhen the draft was created.
updated_at*string · date-timeWhen it last changed.
Example
Request
POST https://api.mail.productcraft.co/v1/workspaces/{workspace_id}/threads/{id}/drafts
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json
{
"html": "<p>Thanks, the refund is on its way.</p>",
"text": "Thanks, the refund is on its way.",
"to": [
"success@simulator.amazonses.com"
],
"cc": [
"finance@example.com"
],
"bcc": [
"audit@example.com"
],
"subject": "Re: Refund for order 42",
"quote": false,
"attachments": [
{
"filename": "invoice-1234.pdf",
"content": "JVBERi0xLjcKJcfsj6IKMSAwIG9iago8PC9UeXBlL0NhdGFsb2c+PgplbmRvYmoK",
"path": "https://files.acme.com/invoices/1234.pdf",
"content_type": "application/pdf",
"content_id": "logo"
}
],
"kind": "reply",
"message_id": "3f0a3c3e-6c1d-4b8e-9b7a-0d4b1c2e3f40",
"submit": false
}Response
{
"id": "00000000-0000-0000-0000-000000000000",
"mailbox_id": "00000000-0000-0000-0000-000000000000",
"thread_id": "00000000-0000-0000-0000-000000000000",
"reply_to_message_id": "00000000-0000-0000-0000-000000000000",
"kind": {},
"status": {},
"to": [
"string"
],
"cc": [
"string"
],
"bcc": [
"string"
],
"subject": "string",
"text": "string",
"html": "string",
"quote": false,
"attachments": [
{
"filename": "invoice-1234.pdf",
"content_type": "application/pdf",
"size": 18232
}
],
"author": {
"type": {},
"id": "00000000-0000-0000-0000-000000000000",
"label": "string",
"is_agent": false,
"on_behalf_of_user_id": "00000000-0000-0000-0000-000000000000",
"client_id": "string"
},
"submitted_at": "2026-01-01T00:00:00.000Z",
"reviewed_by": "00000000-0000-0000-0000-000000000000",
"reviewed_at": "2026-01-01T00:00:00.000Z",
"review_note": "string",
"sent_email_id": "00000000-0000-0000-0000-000000000000",
"version": 1,
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z"
}