Skip to content
English

Save draft

PUT/v1/mailboxes/{mailbox_id}/drafts/{draft_id}

Creates or updates a draft with the given draft_id. Generate a UUID for a new draft and reuse it for subsequent saves. You can continue the draft on another device by signing into the same mailbox.

Authentication and access · Errors and retries

Request

Terminal window
curl -X PUT 'https://adapt-mail.com/v1/mailboxes/<mailbox_id>/drafts/<draft_id>' \
-H 'Authorization: Bearer <access_token>' \
-H 'Content-Type: application/json' \
--data '{"to":["[email protected]"],"subject":"Hello","text":"A message from Adapt Mail"}'

Parameters

mailbox_idpathNecessarily

integer

draft_idpathNecessarily

string · uuid

X-Customer-IDheader
Option 1

string

Option 2

null

Request body · application/json

object

to

array

Addresses of the main recipients.

maxItems: 50

Array elements

string

cc

array

Copy recipient addresses that are visible to other participants.

maxItems: 50

Array elements

string

bcc

array

Bcc recipient addresses.

maxItems: 50

Array elements

string

subject

string

Subject of the message.

Default: ""

maxLength: 998

text

string

The text of the message without formatting.

Default: ""

maxLength: 200000

html

HTML-formatted version of the message.

Option 1

string

maxLength: 300000

Option 2

null

file_ids

array

ID previously downloaded files in this mailbox. Get them when downloading or from the list of files.

maxItems: 20

Array elements

string · uuid

forward_message

The original email whose attachments need to be forwarded.

Option 1

object

folderNecessarily

string

Folder name from the folder list, for example INBOX.

minLength: 1

maxLength: 255

uidvalidityNecessarily

integer

The value is uidvalidity from the response API for this folder.

exclusiveMinimum: 0

uidNecessarily

integer

exclusiveMinimum: 0

Unknown fields are not accepted.

Option 2

null

reply_to_message_id

The message_id value of the email you are replying to.

Option 1

string

maxLength: 998

Option 2

null

references

The value references of the original message to save the reply chain.

Option 1

string

maxLength: 4000

Option 2

null

send_at

Delayed dispatch time with time zone, for example 2026-11-01T12:00:00Z. Without a value, dispatch begins as the queue is processed.

Option 1

string · date-time

Option 2

null

Unknown fields are not accepted.

Responses

200 Successful response

application/json

object

id

string · uuid

401 Login required

application/json

object

detail
Option 1

string

Option 2

object

code

string

message

string

Option 3

array

Array elements

object

403 No access

application/json

object

detail
Option 1

string

Option 2

object

code

string

message

string

Option 3

array

Array elements

object

404 Resource not found

application/json

object

detail
Option 1

string

Option 2

object

code

string

message

string

Option 3

array

Array elements

object

409 State conflict

application/json

object

detail
Option 1

string

Option 2

object

code

string

message

string

Option 3

array

Array elements

object

422 Validation error

application/json

object

detail

array

Array elements

object

locNecessarily

array

Array elements
Option 1

string

Option 2

integer

msgNecessarily

string

typeNecessarily

string

503 Temporarily unavailable

application/json

object

detail
Option 1

string

Option 2

object

code

string

message

string

Option 3

array

Array elements

object