Drafts

Send an email

POST/drafts/send

The only irreversible action in this API: it leaves the system and reaches a third party.

Requires the write scope AND allowOutboundSend enabled on the key: the scope alone is deliberately not enough. Always send an Idempotency-Key: a retry after a network timeout would otherwise deliver the message twice.

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/send" \  -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"      }    ]  }'
{  "messageId": "<20260825140233.1a2b3c@your-company.com>",  "threadId": "18c2f5a9e7b1d3c4"}