v51

latestOpenAPI 3.0.3raw.githubusercontent.com2026-08-01121113461.4 KB
messages

Create or update a draft message.

This endpoint allows you to:
- Create a new draft message in a new thread
- Create a draft reply to an existing message in an existing thread
- Update an existing draft message

For creating a new draft:
- Do not include messageId
- Include parentId if replying to an existing message

For updating an existing draft:
- Include messageId of the draft to update
- Only the fields that are provided will be updated

At least one of draftBody must be provided.

To add attachments, upload them first using the /api/v1.0/blob/upload/{mailbox_id}/ endpoint
and include the returned blobIds in the attachmentIds field.
post/api/v1.0/draft/

Request body

messageIdstring uuid nullable

Message ID if updating an existing draft

parentIdstring uuid nullable

Message ID if replying to an existing message

senderIdstring uuid required

Mailbox ID to use as sender

subjectstring nullable

Subject of the message (optional; empty or null allowed)

draftBodystring

Content of the draft message as arbitrary text (usually JSON)

tostring[]

List of recipient email addresses

ccstring[]

List of CC recipient email addresses

bccstring[]

List of BCC recipient email addresses

attachmentsobject[]

List of attachment objects with blobId, partId, and name

signatureIdstring uuid nullable

ID of the signature template to use

Response

idstring uuid required

primary key for the record as UUID

parent_idstring uuid nullable required
thread_idstring uuid nullable required
subjectstring nullable required
created_atstring date-time required

date and time at which a record was created

updated_atstring date-time required

date and time at which a record was last updated

draftBodystring nullable required
sent_atstring date-time nullable required
is_senderboolean required
is_draftboolean required
is_unreadboolean required
is_trashedboolean required
is_archivedboolean required
has_attachmentsboolean required
mime_idstring nullable required
stmsg_headersobject required

Return the STMSG headers of the message.