Skip to main content
POST
Create draft

Authorizations

x-api-key
string
header
required

CX API key. Create one in CX under Settings → Advanced → API Keys.

Body

application/json

Draft message data (to field is required)

_id
string
attachments
object[]
bcc
string
bookmark
boolean
brief
string

Single-line summary

cc
string
checksum
string

Checksum for de-duplication

clients
string[]

Is this message to/from a client?

created_at
string
date
string
deleted_at
string
domains
string[]
draft
boolean
from
string
html
string
importance
integer
in_reply_to
string
internal
boolean

Is this message to/from only internal users?

message_folders
string[]

MessageFolders references the folders catalog rows this message belongs to (by their local ObjectID) — the per-mailbox equivalent of Tags (which is a team-wide label system). Each catalog row carries the provider's external_id; storing the local _id keeps renames free and gives referential integrity. Gmail = multi-label, Outlook = single-folder; the array models both.

outbox
boolean

Magical stuff

private
boolean

The private flag is used if the message is from/to only internal admins (regardless of how many external users) that have the memberships.email.private flag set. This prevents other users from seeing external messages that may be private.

read
string
references
string
reply
string
requires_response
boolean
responses
string[]
safe_for_everyone
boolean
schedule_id
string

ScheduleID is the Nylas message-schedule id returned by a native send_at (scheduled) send, used to reconcile the eventual Sent-folder message back onto this row (Nylas migration, Stage 4). Mirror of legacytypes.Message.

schedule_send_at
string

Schedule sending this at a specific time

secure
boolean
send_failed
boolean

SendFailed marks a message whose provider-side send failed (Nylas message.send_failed webhook — typically a scheduled send) so the UI can flag it for the user to retry. Mirror of legacytypes.Message.

send_scheduled
boolean
send_state
string

SendState records the provider-reported delivery state. Mirror of legacytypes.Message.

sentiment
integer
source
string
source_history_id
string
source_id
string
subject
string
summary
string[]
tags
string[]
tasks
string[]
team
string
text
string
thread
string
to
string
unique_key
string
user
string

Response

Draft created with message ID

_id
string