Drafts

Create a draft

POST/drafts

Creates a draft in one of the workspace mailboxes without sending it. The draft shows up immediately in the Maylee app, where a person reviews it, edits it and sends it: this is the way to prepare an email from an integration or an agent while keeping a human in the loop.

Nothing leaves the workspace, so the write scope is enough: allowOutboundSend is not required. Attachments cannot be added through the API.

Authorization

apiKey
AuthorizationBearer <token>

Send your key as Authorization: Bearer mk_…. Session cookies are never accepted on this surface.

In: header

Header Parameters

Idempotency-Key?string

A unique value per operation, such as a UUID. Replays the stored response for 24h. Reusing a key with a different body returns 409.

Lengthlength <= 255

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/drafts" \  -H "Authorization: Bearer $MAYLEE_KEY" \  -H "Idempotency-Key: $(uuidgen)" \  -H "Content-Type: application/json" \  -d '{    "body": {      "text": "Hello Jane, here is the quote you asked for."    },    "inReplyTo": "<CAF3k9x1@mail.example.com>",    "mailboxId": "cmbx1a2b3c4d5e6f7g8h9i0j",    "references": [      "<CAF3k9x1@mail.example.com>"    ],    "subject": "Re: Quote request",    "to": [      {        "email": "client@acme.com",        "name": "Jane Client"      }    ]  }'
{  "draft": {    "attachments": [],    "bcc": [],    "cc": [],    "date": "2026-08-25T14:05:40.000Z",    "folderId": "cmfd9z8y7x6w5v4u3t2s1r0q",    "from": {      "email": "contact@your-company.com",      "name": null    },    "hasAttachments": false,    "id": "cmdr1a2b3c4d5e6f7g8h9i0j",    "inReplyTo": "<CAF3k9x1@mail.example.com>",    "isAutoForward": false,    "isAutoReply": false,    "isDraft": true,    "isRead": true,    "isStarred": false,    "labels": [      "\\Draft"    ],    "mailboxId": "cmbx1a2b3c4d5e6f7g8h9i0j",    "messageId": "draft-5f0c2b1e-8a7d-4f3e-9c61-2d4b7a9e0f13@local",    "references": [      "<CAF3k9x1@mail.example.com>"    ],    "scheduledSendAt": null,    "scheduledStatus": null,    "snippet": "Hello Jane, here is the quote you asked for.",    "subject": "Re: Quote request",    "threadId": "18c2f5a9e7b1d3c4",    "to": [      {        "email": "client@acme.com",        "name": "Jane Client"      }    ],    "waitingForReply": false  }}