SISuperintelligenceDocs

Search docs

Search every page of the documentation.

API reference

Mail

Read, organize and send mail from the mailboxes you belong to.

These routes act only on mailboxes the signed-in person is a member of; keys get no mailboxes. See Mail.

GET /v1/orgs/:orgId/mail/mailboxes

The mailboxes the caller is a member of, with their aliases and signature. Keys get an empty list.

Auth: user access token or platform agent key · Scope: mail:read

Path parameterDescription
:orgIdOrganization id (org_…).

Response 200

{
  mailboxes: {
    mailboxId: string
    address: string
    domain: string
    displayName: string
    signature: string
    aliases: string[]
  }[]
}

PATCH /v1/orgs/:orgId/mail/mailboxes/:mailboxId/settings

Sets the mailbox's signature.

Auth: user access token or platform agent key · Scope: mail:read

Path parameterDescription
:orgIdOrganization id (org_…).
:mailboxIdMailbox id (mbx_…).

Request body

FieldTypeRequiredNotes
signaturestringNoup to 20,000 characters

Response 200

{
  mailbox: {
    mailboxId: string
    address: string
    domain: string
    displayName: string
    signature: string
    aliases: string[]
  }
}

Errors

StatusMessage
403Mailboxes are only available to members.
404Mailbox not found

GET /v1/orgs/:orgId/mail/mailboxes/:mailboxId/limits

The organization's sending limits: messages per day, message size and recipients per message.

Auth: user access token or platform agent key · Scope: mail:read

Path parameterDescription
:orgIdOrganization id (org_…).
:mailboxIdMailbox id (mbx_…).

Response 200

{
  limits: {
    sendPerDay: number
    maxMessageMb: number
    maxRecipients: number
  }
}

Errors

StatusMessage
403Mailboxes are only available to members.
404Mailbox not found

GET /v1/orgs/:orgId/mail/mailboxes/:mailboxId/threads

One page of conversations in a view (inbox, starred, sent, drafts, archive, all, spam, trash, or label with label), newest first, optionally matching q. Pass cursor to continue.

Auth: user access token or platform agent key · Scope: mail:read

Path parameterDescription
:orgIdOrganization id (org_…).
:mailboxIdMailbox id (mbx_…).
Query parameterTypeRequiredDefaultNotes
view"inbox" | "starred" | "sent" | "drafts" | "archive" | "all" | "spam" | "trash" | "label"No"inbox"
labelany JSONNo
qstringNoup to 200 characters
cursorstringNoup to 2,000 characters

Response 200

{
  threads: {
    threadId: string
    subject: string
    snippet: string
    participants: string[]
    lastAt: number
    messageCount: number
    unreadCount: number
    starred: boolean
    labels: string[]
    box: "inbox" | "archive" | "spam" | "trash"
    hasAttachments: boolean
    draftId?: string
  }[]
  cursor: null | string
}

Errors

StatusMessage
400Choose a label.
403Mailboxes are only available to members.
404Mailbox not found

POST /v1/orgs/:orgId/mail/mailboxes/:mailboxId/threads/actions

Applies one action to up to 100 conversations: archive, move to inbox, trash, spam, not spam, delete (from trash or spam only), read, unread, star, unstar, label or unlabel.

Auth: user access token or platform agent key · Scope: mail:read

Path parameterDescription
:orgIdOrganization id (org_…).
:mailboxIdMailbox id (mbx_…).

Request body

FieldTypeRequiredNotes
threadIdsany JSON[]Yes1–100 items
action"archive" | "inbox" | "trash" | "spam" | "not_spam" | "delete" | "read" | "unread" | "star" | "unstar" | "label" | "unlabel"Yes
labelIdany JSONNo

Response 200

{
  changed: number
}

Errors

StatusMessage
400Choose a label.
400Move the conversation to trash first.
403Mailboxes are only available to members.
404Mailbox not found
404Label not found

GET /v1/orgs/:orgId/mail/mailboxes/:mailboxId/threads/:threadId

A conversation and its messages, without bodies.

Auth: user access token or platform agent key · Scope: mail:read

Path parameterDescription
:orgIdOrganization id (org_…).
:mailboxIdMailbox id (mbx_…).
:threadIdConversation id (thr_…).

Response 200

{
  thread: {
    threadId: string
    subject: string
    snippet: string
    participants: string[]
    lastAt: number
    messageCount: number
    unreadCount: number
    starred: boolean
    labels: string[]
    box: "inbox" | "archive" | "spam" | "trash"
    hasAttachments: boolean
    draftId?: string
  }
  messages: {
    messageId: string
    threadId: string
    kind: "in" | "sent" | "draft"
    from: {
      name?: string
      address: string
    }
    to: {
      name?: string
      address: string
    }[]
    cc: {
      name?: string
      address: string
    }[]
    bcc: {
      name?: string
      address: string
    }[]
    replyTo: {
      name?: string
      address: string
    }[]
    subject: string
    snippet: string
    at: number
    unread: boolean
    size: number
    rfcMessageId: string
    attachments: {
      index: number
      filename: string
      contentType: string
      size: number
      cid?: string
      inline: boolean
    }[]
    spam: boolean
    verdicts?: {
      [key: string]: string
    }
    deliveryStatus?: "failed" | "sent" | "sending" | "delivered" | "delayed" | "bounced" | "complained" | "rejected"
    deliveryDetail?: string
  }[]
}

Errors

StatusMessage
403Mailboxes are only available to members.
404Mailbox not found
404Thread not found

GET /v1/orgs/:orgId/mail/mailboxes/:mailboxId/threads/:threadId/messages/:messageId/body

A message's text and HTML, with short-lived links for inline images. Reading a received message marks it read.

Auth: user access token or platform agent key · Scope: mail:read

Path parameterDescription
:orgIdOrganization id (org_…).
:mailboxIdMailbox id (mbx_…).
:threadIdConversation id (thr_…).
:messageIdMessage id (msg_…).

Response 200

{
  text: string
  html?: string
  inline: {
    [key: string]: string
  }
}

Errors

StatusMessage
403Mailboxes are only available to members.
404Mailbox not found
404Message not found

GET /v1/orgs/:orgId/mail/mailboxes/:mailboxId/threads/:threadId/messages/:messageId/attachments/:index

A short-lived download link for an attachment.

Auth: user access token or platform agent key · Scope: mail:read

Path parameterDescription
:orgIdOrganization id (org_…).
:mailboxIdMailbox id (mbx_…).
:threadIdConversation id (thr_…).
:messageIdMessage id (msg_…).
:indexThe attachment's position in the message, from 0.

Response 200

{
  url: string
  filename: string
}

Errors

StatusMessage
403Mailboxes are only available to members.
404Mailbox not found
404Message not found
404Attachment not found

GET /v1/orgs/:orgId/mail/mailboxes/:mailboxId/threads/:threadId/messages/:messageId/raw

A short-lived link to the original message (.eml).

Auth: user access token or platform agent key · Scope: mail:read

Path parameterDescription
:orgIdOrganization id (org_…).
:mailboxIdMailbox id (mbx_…).
:threadIdConversation id (thr_…).
:messageIdMessage id (msg_…).

Response 200

{
  url: string
}

Errors

StatusMessage
403Mailboxes are only available to members.
404Mailbox not found
404Message not found
404No original for this message

POST /v1/orgs/:orgId/mail/mailboxes/:mailboxId/uploads

Compose attachments go straight to the bucket; the link only accepts the declared size and type.

Auth: user access token or platform agent key · Scope: mail:send

Path parameterDescription
:orgIdOrganization id (org_…).
:mailboxIdMailbox id (mbx_…).

Request body

FieldTypeRequiredDefaultNotes
filenamestringYes1–255 characters; trimmed
contentTypestringNo"application/octet-stream"up to 255 characters; matches ^[\w.+-]+\/[\w.+-]+$; trimmed
sizeintegerYes≥ 0

Response 201

{
  uploadId: string
  url: string
  headers: {
    "content-type": string
  }
}

Errors

StatusMessage
403Mailboxes are only available to members.
404Mailbox not found
413Attachments can be at most … MB in total.

POST /v1/orgs/:orgId/mail/mailboxes/:mailboxId/send

Sends a message from the mailbox and files it in Sent. The domain must be verified. With replyTo, it's threaded as a reply; with draftId, the draft is removed. The response lists recipients that bounced or complained before.

Auth: user access token or platform agent key · Scope: mail:send

Path parameterDescription
:orgIdOrganization id (org_…).
:mailboxIdMailbox id (mbx_…).

Request body (up to 6 MB)

FieldTypeRequiredDefaultNotes
toobject[]No[]up to 500 items
to[].namestringNoup to 200 characters; trimmed
to[].addressstringYestrimmed; lowercased
ccobject[]No[]up to 500 items
cc[].namestringNoup to 200 characters; trimmed
cc[].addressstringYestrimmed; lowercased
bccobject[]No[]up to 500 items
bcc[].namestringNoup to 200 characters; trimmed
bcc[].addressstringYestrimmed; lowercased
subjectstringNo""up to 998 characters
htmlstringNoup to 2,000,000 characters
textstringNoup to 2,000,000 characters
attachments(object | object)[]No[]up to 50 items
replyToobjectNo
replyTo.threadIdany JSONYes
replyTo.messageIdany JSONYes
draftIdany JSONNo

Response 201

{
  suppressed: {
    address: string
    reason: "bounce" | "complaint"
  }[]
  messageId: string
  threadId: string
  duplicate: boolean
}

Errors

StatusMessage
403Mailboxes are only available to members.
404Mailbox not found
409This mailbox's domain was removed.
409… isn't verified for sending yet.

POST /v1/orgs/:orgId/mail/mailboxes/:mailboxId/recipients/check

Recipients that bounced or complained before, so compose can warn.

Auth: user access token or platform agent key · Scope: mail:send

Path parameterDescription
:orgIdOrganization id (org_…).
:mailboxIdMailbox id (mbx_…).

Request body

FieldTypeRequiredNotes
addressesstring[]Yesup to 500 items; each up to 254 characters

Response 200

{
  suppressed: {
    address: string
    reason: "bounce" | "complaint"
  }[]
}

Errors

StatusMessage
403Mailboxes are only available to members.
404Mailbox not found

POST /v1/orgs/:orgId/mail/mailboxes/:mailboxId/drafts

Saves a new draft.

Auth: user access token or platform agent key · Scope: mail:send

Path parameterDescription
:orgIdOrganization id (org_…).
:mailboxIdMailbox id (mbx_…).

Request body (up to 6 MB)

FieldTypeRequiredDefaultNotes
toobject[]No[]up to 500 items
to[].namestringNoup to 200 characters; trimmed
to[].addressstringYestrimmed; lowercased
ccobject[]No[]up to 500 items
cc[].namestringNoup to 200 characters; trimmed
cc[].addressstringYestrimmed; lowercased
bccobject[]No[]up to 500 items
bcc[].namestringNoup to 200 characters; trimmed
bcc[].addressstringYestrimmed; lowercased
subjectstringNo""up to 998 characters
htmlstringNoup to 2,000,000 characters
textstringNoup to 2,000,000 characters
attachments(object | object)[]No[]up to 50 items
replyToobjectNo
replyTo.threadIdany JSONYes
replyTo.messageIdany JSONYes

Response 201

{
  draftId: string
  threadId: string
}

Errors

StatusMessage
403Mailboxes are only available to members.
404Mailbox not found

GET /v1/orgs/:orgId/mail/mailboxes/:mailboxId/drafts/:draftId

A draft, for editing.

Auth: user access token or platform agent key · Scope: mail:send

Path parameterDescription
:orgIdOrganization id (org_…).
:mailboxIdMailbox id (mbx_…).
:draftIdDraft id: the draft's message id (msg_…).

Response 200

{
  draft: {
    draftId: string
    threadId: string
    replyTo?: {
      threadId: string
      messageId: string
    }
    to: {
      name?: string
      address: string
    }[]
    cc: {
      name?: string
      address: string
    }[]
    bcc: {
      name?: string
      address: string
    }[]
    subject?: string
    html?: string
    text: string
    attachments: {
      uploadId: string
      filename: string
      contentType: string
      size: number
    } | {
      threadId: string
      messageId: string
      index: number
      filename: string
      contentType: string
      size: number
    }[]
  }
}

Errors

StatusMessage
403Mailboxes are only available to members.
404Mailbox not found

PUT /v1/orgs/:orgId/mail/mailboxes/:mailboxId/drafts/:draftId

Replaces a draft.

Auth: user access token or platform agent key · Scope: mail:send

Path parameterDescription
:orgIdOrganization id (org_…).
:mailboxIdMailbox id (mbx_…).
:draftIdDraft id: the draft's message id (msg_…).

Request body (up to 6 MB)

FieldTypeRequiredDefaultNotes
toobject[]No[]up to 500 items
to[].namestringNoup to 200 characters; trimmed
to[].addressstringYestrimmed; lowercased
ccobject[]No[]up to 500 items
cc[].namestringNoup to 200 characters; trimmed
cc[].addressstringYestrimmed; lowercased
bccobject[]No[]up to 500 items
bcc[].namestringNoup to 200 characters; trimmed
bcc[].addressstringYestrimmed; lowercased
subjectstringNo""up to 998 characters
htmlstringNoup to 2,000,000 characters
textstringNoup to 2,000,000 characters
attachments(object | object)[]No[]up to 50 items
replyToobjectNo
replyTo.threadIdany JSONYes
replyTo.messageIdany JSONYes

Response 200

{
  draftId: string
  threadId: string
}

Errors

StatusMessage
403Mailboxes are only available to members.
404Mailbox not found

DELETE /v1/orgs/:orgId/mail/mailboxes/:mailboxId/drafts/:draftId

Discards a draft.

Auth: user access token or platform agent key · Scope: mail:send

Path parameterDescription
:orgIdOrganization id (org_…).
:mailboxIdMailbox id (mbx_…).
:draftIdDraft id: the draft's message id (msg_…).

Response 204 with no body.

Errors

StatusMessage
403Mailboxes are only available to members.
404Mailbox not found

GET /v1/orgs/:orgId/mail/mailboxes/:mailboxId/labels

The mailbox's labels, by name.

Auth: user access token or platform agent key · Scope: mail:read

Path parameterDescription
:orgIdOrganization id (org_…).
:mailboxIdMailbox id (mbx_…).

Response 200

{
  labels: {
    labelId: string
    name: string
  }[]
}

Errors

StatusMessage
403Mailboxes are only available to members.
404Mailbox not found

POST /v1/orgs/:orgId/mail/mailboxes/:mailboxId/labels

Creates a label. Names are unique in the mailbox, ignoring case.

Auth: user access token or platform agent key · Scope: mail:read

Path parameterDescription
:orgIdOrganization id (org_…).
:mailboxIdMailbox id (mbx_…).

Request body

FieldTypeRequiredNotes
namestringYes1–60 characters; trimmed

Response 201

{
  label: {
    labelId: string
    name: string
  }
}

Errors

StatusMessage
400A mailbox can have at most 200 labels.
403Mailboxes are only available to members.
404Mailbox not found
409A label with this name exists.

DELETE /v1/orgs/:orgId/mail/mailboxes/:mailboxId/labels/:labelId

Deletes a label. Conversations stop showing it.

Auth: user access token or platform agent key · Scope: mail:read

Path parameterDescription
:orgIdOrganization id (org_…).
:mailboxIdMailbox id (mbx_…).
:labelIdLabel id (lbl_…).

Response 204 with no body.

Errors

StatusMessage
403Mailboxes are only available to members.
404Mailbox not found