API referenceEmail messages
POST
/email/api/v1/drafts

The same body as a send (no recipient needed), saved in the mailbox's Drafts folder.

Authorization

X-API-KEY<token>

Your API key from the console (gw_live_…).

In: header

Request Body

TypeScript Definitions

Use the request body type in TypeScript.

The send body, plus Swarmhit's body_plain, message_id and JSON attachments. In multipart, nested fields are JSON strings and attachments are file parts.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/email/api/v1/drafts" \  -H "Content-Type: application/json" \  -d '{    "account_id": "string"  }'
{  "object": "DraftCreated",  "draft_id": "string"}