Skip to content

Compose Inbox Email

POST
/inbox/emails/compose

COMPOSE AN EMAIL. WITH save_as_draft FALSE THIS REACHES A REAL PERSON.

The one call that does everything the compose window does:

  • new thread, sent now - to, from_mailbox, subject, content
  • new thread, saved as a draft - the same plus save_as_draft: true
  • reply into a thread - add reply_to_email_id
  • edit an existing draft - add draft_id
  • send a draft you saved - draft_id plus save_as_draft: false

save_as_draft DEFAULTS TO FALSE, which means SEND. That is the app’s own default and it is kept rather than made safer here, because two ends disagreeing about what an omitted field does is worse than a default you can read.

Classified external (inbox:run) because it can deliver. Sending as a mailbox the caller is not authorised for is a 403 from the sender authorisation gate, not a silent success - check first with POST /inbox/emails/validate-mailbox.

Distinct from POST /inbox/emails/{email_id}/send, which can only reply into a thread that already exists.

Authorizations

Parameters

Header Parameters

X-Target-Org-Id
Any of:
string

Request Body required

Compose an email: save it as a draft, or SEND IT TO A REAL PERSON.

save_as_draft decides which. It defaults to FALSE, which means SEND - the app’s default, kept rather than made safer here so the two ends cannot disagree about what an omitted field does.

object
assigned_users

Emails to assign the resulting thread to.

Array<string>
attachments

Already-uploaded attachment references. The server re-validates each one.

Array<object>
object
key
additional properties
any
bcc
Array<string>
cc
Array<string>
content
required

Body, HTML.

string
draft_id
Any of:
string
from_mailbox
required

The mailbox to send AS. Must already be syncing - check with POST /inbox/emails/validate-mailbox first.

string
include_signature
boolean
default: true
reply_to_email_id
Any of:
string
save_as_draft

FALSE SENDS THE MESSAGE. True stores a draft and contacts nobody.

boolean
subject
Any of:
string
tag_ids

Tags to attach to the thread.

Array<string>
to
required

Recipients. These are real addresses.

Array<string>
>= 1 items

Responses

200

Successful Response

object
data
required

An open envelope for a comment, an assignment or a workspace.

Open because a comment carries attachment refs and mention metadata that grow, and because an assignment result reports per-assignee outcomes.

object
key
additional properties
any
pagination
Any of:
object
has_next
required

Whether there are more pages

boolean
limit
required

Items per page

integer
next_cursor
Any of:
string
notes
Any of:
Array<string>
page
required

Current page number (1-indexed)

integer
total
required

Total number of items

integer
total_available
Any of:
integer
total_is_lower_bound
Any of:
boolean

422

Validation Error

object
detail
Array<object>
object
loc
required
Array
msg
required
string
type
required
string