SISuperintelligenceDocs

Search docs

Search every page of the documentation.

API reference

Mail administration

Mail domains, mailboxes, aliases, catch-all addresses and usage.

Every route here needs mail:admin, which owners and admins have. See Mail.

GET /v1/orgs/:orgId/mail/domains

The organization's mail domains with their status, DNS records and which records were found.

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

Path parameterDescription
:orgIdOrganization id (org_…).

Response 200

{
  domains: {
    domain: string
    status: "error" | "active" | "pending" | "verifying"
    region: string
    zone?: string
    dnsProvider?: string
    message?: string
    dkimMode: "easy" | "byo"
    records: {
      key: string
      purpose: "dkim" | "receiving" | "spf" | "dmarc" | "mailfrom" | "discovery"
      type: "CNAME" | "TXT" | "MX" | "SRV"
      name: string
      fqdn: string
      value: string
      priority?: number
      optional?: boolean
    }[]
    checks: {
      [key: string]: boolean
    }
    checkedAt?: number
    catchAllMailboxId?: string
    createdAt?: number
  }[]
}

POST /v1/orgs/:orgId/mail/domains

Adds a domain for sending and receiving mail: creates its sending identity and returns the DNS records to add. Hostnames under the platform's domain can't be added.

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

Path parameterDescription
:orgIdOrganization id (org_…).

Request body

FieldTypeRequiredNotes
domainstringYesmatches ^(?=.{4,253}$)([a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,63}$; trimmed; lowercased

Response 201

{
  domain: {
    domain: string
    status: "error" | "active" | "pending" | "verifying"
    region: string
    zone?: string
    dnsProvider?: string
    message?: string
    dkimMode: "easy" | "byo"
    records: {
      key: string
      purpose: "dkim" | "receiving" | "spf" | "dmarc" | "mailfrom" | "discovery"
      type: "CNAME" | "TXT" | "MX" | "SRV"
      name: string
      fqdn: string
      value: string
      priority?: number
      optional?: boolean
    }[]
    checks: {
      [key: string]: boolean
    }
    checkedAt?: number
    catchAllMailboxId?: string
    createdAt?: number
  }
}

Errors

StatusMessage
400Platform domains can't be added.
409Mail is not available in … yet.
409This domain is already in use.
502Couldn't set up this domain. Try again.

POST /v1/orgs/:orgId/mail/domains/:domain/verify

Checks the domain's DNS records and verification now.

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

Path parameterDescription
:orgIdOrganization id (org_…).
:domainThe mail domain, e.g. example.com.

Response 200

{
  domain: {
    domain: string
    status: "error" | "active" | "pending" | "verifying"
    region: string
    zone?: string
    dnsProvider?: string
    message?: string
    dkimMode: "easy" | "byo"
    records: {
      key: string
      purpose: "dkim" | "receiving" | "spf" | "dmarc" | "mailfrom" | "discovery"
      type: "CNAME" | "TXT" | "MX" | "SRV"
      name: string
      fqdn: string
      value: string
      priority?: number
      optional?: boolean
    }[]
    checks: {
      [key: string]: boolean
    }
    checkedAt?: number
    catchAllMailboxId?: string
    createdAt?: number
  }
}

Errors

StatusMessage
404Domain not found

PATCH /v1/orgs/:orgId/mail/domains/:domain

Sets or clears the domain's catch-all mailbox, which receives mail to unknown addresses.

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

Path parameterDescription
:orgIdOrganization id (org_…).
:domainThe mail domain, e.g. example.com.

Request body

FieldTypeRequiredNotes
catchAllMailboxIdstringYesup to 40 characters; can be null

Response 200

{
  domain: {
    domain: string
    status: "error" | "active" | "pending" | "verifying"
    region: string
    zone?: string
    dnsProvider?: string
    message?: string
    dkimMode: "easy" | "byo"
    records: {
      key: string
      purpose: "dkim" | "receiving" | "spf" | "dmarc" | "mailfrom" | "discovery"
      type: "CNAME" | "TXT" | "MX" | "SRV"
      name: string
      fqdn: string
      value: string
      priority?: number
      optional?: boolean
    }[]
    checks: {
      [key: string]: boolean
    }
    checkedAt?: number
    catchAllMailboxId?: string
    createdAt?: number
  }
}

Errors

StatusMessage
404Domain not found
404Mailbox not found

DELETE /v1/orgs/:orgId/mail/domains/:domain

Removes a domain and its aliases. Its mailboxes must be deleted first.

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

Path parameterDescription
:orgIdOrganization id (org_…).
:domainThe mail domain, e.g. example.com.

Response 204 with no body.

Errors

StatusMessage
404Domain not found
409Delete this domain's mailboxes first.

GET /v1/orgs/:orgId/mail/members

Members of the organization, to choose mailbox members from.

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

Path parameterDescription
:orgIdOrganization id (org_…).

Response 200

{
  members: {
    userId: string
    email: string
    name?: string
  }[]
}

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

Every mailbox of the organization with its members and aliases.

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

Path parameterDescription
:orgIdOrganization id (org_…).

Response 200

{
  mailboxes: {
    mailboxId: string
    address: string
    domain: string
    displayName: string
    members: string[]
    aliases: string[]
    createdAt?: number
  }[]
}

POST /v1/orgs/:orgId/mail/admin/mailboxes

Creates a mailbox at one of the organization's domains, with a sender name and members.

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

Path parameterDescription
:orgIdOrganization id (org_…).

Request body

FieldTypeRequiredDefaultNotes
localPartstringYesmatches ^[a-z0-9](?:[a-z0-9._-]{0,62}[a-z0-9])?$; trimmed; lowercased
domainstringYestrimmed; lowercased
displayNamestringNo""up to 200 characters; trimmed
membersstring[]No[]up to 100 items; each up to 64 characters

Response 201

{
  mailbox: {
    mailboxId: string
    address: string
    domain: string
    displayName: string
    members: string[]
    aliases: string[]
    createdAt?: number
  }
}

Errors

StatusMessage
400Mailbox members must belong to the organization.
400Enter a valid address.
404Domain not found
409… is already in use.

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

Changes a mailbox's sender name or members.

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

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

Request body

FieldTypeRequiredNotes
displayNamestringNoup to 200 characters; trimmed
membersstring[]Noup to 100 items; each up to 64 characters

Response 200

{
  mailbox: {
    mailboxId: string
    address: string
    domain: string
    displayName: string
    members: string[]
    aliases: string[]
    createdAt?: number
  }
}

Errors

StatusMessage
400Mailbox members must belong to the organization.
404Mailbox not found

DELETE /v1/orgs/:orgId/mail/admin/mailboxes/:mailboxId

Deletes a mailbox with all of its mail, drafts, labels and aliases.

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

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

Response 204 with no body.

Errors

StatusMessage
404Mailbox not found

POST /v1/orgs/:orgId/mail/admin/mailboxes/:mailboxId/aliases

Adds another address, at one of the organization's domains, that delivers to the mailbox.

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

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

Request body

FieldTypeRequiredNotes
addressstringYestrimmed; lowercased

Response 201

{
  mailbox: {
    mailboxId: string
    address: string
    domain: string
    displayName: string
    members: string[]
    aliases: string[]
    createdAt?: number
  }
}

Errors

StatusMessage
400Enter a valid address.
404Mailbox not found
404Domain not found
409… is already in use.

DELETE /v1/orgs/:orgId/mail/admin/aliases/:address

Removes an alias.

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

Path parameterDescription
:orgIdOrganization id (org_…).
:addressThe alias address, e.g. sales@example.com.

Response 204 with no body.

Errors

StatusMessage
404Alias not found

GET /v1/orgs/:orgId/mail/usage

Messages sent, received, bounced and complained about per day, and the organization's sending limits.

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

Path parameterDescription
:orgIdOrganization id (org_…).
Query parameterTypeRequiredDefaultNotes
daysintegerNo301–90; coerced from a string

Response 200

{
  days: {
    day: string
    sent: number
    received: number
    bounced: number
    complained: number
  }[]
  limits: {
    sendPerDay: number
    maxMessageMb: number
    maxRecipients: number
  }
}