AI Inbox

Compose Inbox Email

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.

post/inbox/emails/compose

Request

  • Base URL: https://be.graph8.com/api/v1
  • URL: https://be.graph8.com/api/v1/inbox/emails/compose
  • Auth: HTTP bearer

Headers

Authorizationstring nullable
X-Target-Org-Idstring nullable

Request body

tostring[] required

Recipients. These are real addresses.

from_mailboxstring required

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

contentstring required

Body, HTML.

subjectstring nullable

Auto-filled as Re: {original} on a reply if omitted.

ccstring[]
bccstring[]
attachmentsobject[]

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

save_as_draftboolean

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

reply_to_email_idstring nullable

Thread to reply into. Omit to start a new conversation.

draft_idstring nullable

Edit or send an existing draft.

include_signatureboolean
assigned_usersstring[]

Emails to assign the resulting thread to.

tag_idsstring[]

Tags to attach to the thread.

Response

Successful Response

dataInboxPayload 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.

Changes

No recorded changes to this operation across all 2 revisions of this API.