Mailboxes

Update a draft

Updates the fields you name and keeps the rest; `null` clears an optional field. A draft whose send waits for approval cannot change and conflicts.

PATCH
/v1/mailboxes/{id}/drafts/{draftId}

Updates the fields you name and keeps the rest; null clears an optional field. A draft whose send waits for approval cannot change and conflicts.

x-api-key<token>

In: header

Path Parameters

id*string
Match^mbx_[0-9a-hjkmnp-tv-z]{16,24}$
draftId*string
Match^mdraft_[0-9a-hjkmnp-tv-z]{16,24}$

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

to?array<string>|null
cc?array<string>|null|null
bcc?array<string>|null|null
replyTo?array<string>|null|null
subject?string|null|null
text?string|null|null
html?string|null|null
attachments?array<>|null|null

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/v1/mailboxes/string/drafts/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "string",  "threadId": "string",  "inReplyToMessageId": "string",  "state": "saved",  "to": [    "string"  ],  "subject": "string",  "createdAt": "string",  "updatedAt": "string",  "cc": [    "string"  ],  "bcc": [    "string"  ],  "replyTo": [    "string"  ],  "html": "string",  "text": "string",  "attachments": [    {      "filename": "string",      "content": "string",      "mediaId": "string",      "contentType": "string",      "size": 1    }  ]}

Related documentation