Generated from the API's OpenAPI document by npm run docs:api. The document itself is at https://api.mailcraft.ntconnect.com/openapi.json.

API reference

The REST API lives at https://api.mailcraft.ntconnect.com, also reachable as https://api.mailcraft.cc. Request and response bodies are JSON with camelCase field names; errors are application/problem+json with a title, a status and usually a detail.

Most operations take an API key: Authorization: Bearer mc_live_…, created on the console's API keys page. Each one that the console also uses has an organization-scoped twin under /v0/orgs/{orgId}/…, named beside it, which takes a console sign-in token instead. Operations that exist only for the console (members, invitations, API keys, webhook endpoints, billing) are listed under their group, marked as taking a console sign-in token.

For an agent, the same API as the API Brief: brief.txt is every operation on one line, each ending in a ref, and /docs/api/brief/<ref>.txt is one operation in full, with an example request. The API serves the same text at GET /v0/brief and GET /v0/brief/{ref}, and the MCP server as the resources mailcraft://brief and mailcraft://brief/{ref}.

Ids

Every id the API returns starts with a prefix that names its kind: ibx_ an inbox, thr_ a thread, msg_ a message, att_ an attachment, evt_ an event, drf_ a draft, dat_ a draft's attachment, key_ an API key, whk_ a webhook endpoint, dlv_ a webhook delivery, usr_ a user (a member, an author or a reviewer), inv_ an invitation. Organization ids are UUIDs. An id of the wrong kind is answered as an unknown one.

API changes, 2026-12-01

  • New mail domains: new inboxes get addresses on agents.mxcraft.cc (NT Connect's own organizations: agents.mxcraft.ntconnect.com). Every existing inbox on agents.mailcraft.cc or agents.mailcraft.ntconnect.com also receives at the same name on the new domain, in the same inbox; the old address keeps working with no end date.
  • Inbox answers carry aliases, the inbox's other addresses. When the switch is made (announced on the status page), an existing inbox's address becomes its new-domain address and the old one moves to aliases; both keep receiving and sending.
  • Messages carry deliveredTo: the inbox address a received message was delivered to (null for sent mail and for mail received before this change). A reply goes from the address the original was delivered to or sent from; a new message or a forward goes from address. Drafts carry fromAddress, the address a send of the draft goes from.
  • A thread's message summaries carry deliveredTo too.

API changes, 2026-11-28

  • Forward: POST /v0/messages/{messageId}/forward (and its sign-in twin) sends a message on from its inbox to new recipients with an optional note, the original's attachments included unless includeAttachments is false. MCP gains the forward tool.

API changes, 2026-11-27

  • Unread markers for people: with a sign-in token, thread lists, search results and a thread carry unread, inbox answers carry unreadCount, and POST /v0/orgs/{orgId}/threads/{threadId}/read and …/unread mark a thread for the signed-in person. API-key answers are unchanged.

API changes, 2026-11-25

  • A message with nothing in it is refused: text and html missing, empty or only whitespace, with no attachment, now answers 422 on send, reply, draft send and submitting a draft for approval. A draft can still be saved blank.
  • JSON bodies are no longer type-coerced: a number, boolean or null where a string is expected, "3" for an integer, "true" or 1 for a boolean, and a bare string where an array is expected are now 422. Query strings are unchanged (?limit=10 still reads as 10).
  • Drafts refuse a malformed to, cc or bcc address at create and update (422), as a send does.
  • A field that fails its pattern is named in plain English (such as "subject can't contain line breaks.") rather than with the pattern itself.
  • Every 400 for a bad cursor has a detail: "This cursor isn't valid for this list. Read again without it."
  • An API key's 401 carries WWW-Authenticate: Bearer, as a sign-in token's already did.
  • Webhook deliveries carry User-Agent, Mailcraft-Event-Id, Mailcraft-Delivery-Id and Mailcraft-Delivery-Attempt headers.
  • This document lists every status each operation can answer, with Retry-After and the X-RateLimit-* headers on each 429.
  • A list cursor works only on the list that returned it: another list (another inbox's threads, say) answers 400 "Invalid cursor". Cursors returned before this change answer the same 400; read again without one.
  • A path the API does not serve on this host (such as /) answers a problem+json 404, as an unknown /v0 path does.
  • A reply takes replyAll: true to also copy the original's other To and Cc (minus the inbox and anyone already in to), as MCP reply_all does.
  • Thread search: an inbox's thread list takes q, from, subject, after, before and hasAttachments, and the new GET /v0/threads (and /v0/orgs/{orgId}/threads) searches every inbox, or the one inbox names, with at least one of them. A search that runs too long answers 503.

API changes, 2026-11-23

  • The draft.submitted, draft.sent and draft.rejected events also carry author_name, approved_by_name and rejected_by_name: an API key's name, or a person's name or, without one, their email, as it was when the event fired. An API key cannot read the members or API-keys lists, so these say who the ids are.

API changes, 2026-11-20

  • API key, webhook endpoint, delivery, member (user) and invitation ids, and a draft's authorApiKeyId, authorUserId and reviewedBy, are now prefixed like every other id. Paths and bodies still accept the raw UUIDs they used to carry.
  • The draft.submitted, draft.sent and draft.rejected events carry prefixed author_key_id, author_user_id, approved_by and rejected_by from now on; events created before keep the raw UUIDs they were made with.
  • Events, in the feed and in webhook bodies, carry createdAt. created_at has the same value and is deprecated; it will be removed on or after 2026-12-21. Read createdAt.
  • Creating an inbox answers heldCount (0), as reading one does.

Limits and the status each answers

The API applies no general request rate limit: the only 429 it answers is a sending limit, and only that 429 carries rate-limit headers (a successful response has none). Each refusal below is an application/problem+json body.

  • Inboxes: a plan allows a fixed number of active inboxes (Free: 3). Creating one past it answers 403 "Inbox limit reached"; an organization with no active plan also gets 403.
  • Recipients: at most 50 in to, cc and bcc together, each once. More, or none, answers 422.
  • Message size: the organization's limit (Free: 10 MiB), never more than 40 MB. A larger send answers 413.
  • Sending rate: messages, not recipients, per minute, hour and day (Free: 10, 50, 100; Pro and Scale are higher). A new organization is held to 50 a day at first. Over a limit answers 429 with a Retry-After header (seconds) and X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset headers.
  • Messages used up: when the organization has used its messages, sending answers 402 until a top-up or the monthly refill.
  • Paused, suspended or closed: sending paused for the organization, a suspended organization, or a closed one answers 403.

Inboxes

GET GET /v0/inboxes

List inboxes

Pages through the organization's inboxes. Pass the nextCursor of a page as cursor to read the next.

Auth: API key: Authorization: Bearer mc_live_…

From the console: GET /v0/orgs/{orgId}/inboxes, with a console sign-in token.

Parameters

NameTypeRequiredNotes
limit (query)integerno1 to 100; default 25
cursor (query)stringno

Responses

  • 200 — A page of inboxes. — application/json
    Response fields
    FieldTypeRequiredNotes
    data{id, address, aliases, displayName, createdAt, heldCount, requireApproval, roleAddress, unreadCount?}[]yes
    data[].idstringyes
    data[].addressstringyes
    data[].aliasesstring[]yesThe inbox's other addresses. Mail to any of them lands in this inbox, and a reply goes from the one the original used. Empty for most inboxes
    data[].displayNamestring | nullyes
    data[].createdAtstring (date-time)yes
    data[].heldCountintegeryesHeld, not yet expired messages: a count, no content
    data[].requireApprovalbooleanyesSends from this inbox by API keys and members wait for an owner's or admin's approval
    data[].roleAddressbooleanyesOne of NT Connect's role addresses on the shared domains (such as postmaster@); it cannot be deleted
    data[].unreadCountintegernoPresent only with a sign-in token: threads in this inbox with mail this person hasn't opened
    nextCursorstring | nullyesThe next page's cursor; null on the last page
  • 400 — InvalidCursor — Invalid cursor. This cursor isn't valid for this list. Read again without it. — application/problem+json: ProblemDetails
  • 401 — Unauthorized — The Authorization header is missing, or its API key or sign-in token is not valid. — application/problem+json: ProblemDetails
  • 403 — Forbidden — The credential is valid but may not do this: its organization is suspended, or (a sign-in token) the member's role in the organization is too low for the operation. — application/problem+json: ProblemDetails
  • 422 — The query string failed schema validation. — application/problem+json: ProblemDetails

POST POST /v0/inboxes

Create inbox

Creates an inbox. For a customer organization its address is <username>.<organization handle>@agents.mxcraft.cc (the username is assigned when omitted). Usernames and display names may not use an NT Connect name.

Auth: API key: Authorization: Bearer mc_live_…

From the console: POST /v0/orgs/{orgId}/inboxes, with a console sign-in token.

Request body application/json

FieldTypeRequiredNotes
usernamestringno1 to 64 characters; matches ^[a-zA-Z0-9._-]+$
displayNamestringnoat most 200 characters

Responses

  • 201 — The new inbox. — application/json
    Response fields
    FieldTypeRequiredNotes
    idstringyes
    addressstringyes
    aliasesstring[]yesThe inbox's other addresses. Mail to any of them lands in this inbox, and a reply goes from the one the original used. Empty for most inboxes
    displayNamestring | nullyes
    createdAtstring (date-time)yes
    heldCountintegeryesHeld, not yet expired messages: a count, no content
    requireApprovalbooleanyesSends from this inbox by API keys and members wait for an owner's or admin's approval
    roleAddressbooleanyesOne of NT Connect's role addresses on the shared domains (such as postmaster@); it cannot be deleted
    unreadCountintegernoPresent only with a sign-in token: threads in this inbox with mail this person hasn't opened
  • 400 — BadRequest — Malformed request. The body is not valid JSON, or is empty while its Content-Type says JSON. — application/problem+json: ProblemDetails
  • 401 — Unauthorized — The Authorization header is missing, or its API key or sign-in token is not valid. — application/problem+json: ProblemDetails
  • 403 — The organization already has as many active inboxes as its plan allows, or (while Prism enforcement is on) has no active plan. — application/problem+json: ProblemDetails
  • 409 — The requested username is already in use, or is reserved (a role name such as postmaster, or an NT Connect name). These are reported identically so this endpoint cannot be used to enumerate existing inboxes. — application/problem+json: ProblemDetails
  • 413 — PayloadTooLarge — Body too large. The request body is over the operation's limit (for a send, the organization's message size limit). — application/problem+json: ProblemDetails
  • 415 — UnsupportedMediaType — Not JSON. The body's Content-Type is not one the operation reads: send application/json. — application/problem+json: ProblemDetails
  • 422 — The request body failed schema validation; the display name uses an NT Connect name; or the username with the organization's handle would pass 64 characters. — application/problem+json: ProblemDetails

GET GET /v0/inboxes/{inboxId}

Get inbox

Returns one inbox of the organization: its address, display name, approval setting and count of held messages.

Auth: API key: Authorization: Bearer mc_live_…

From the console: GET /v0/orgs/{orgId}/inboxes/{inboxId}, with a console sign-in token.

Parameters

NameTypeRequiredNotes
inboxId (path)stringyes

Responses

  • 200 — The inbox. — application/json
    Response fields
    FieldTypeRequiredNotes
    idstringyes
    addressstringyes
    aliasesstring[]yesThe inbox's other addresses. Mail to any of them lands in this inbox, and a reply goes from the one the original used. Empty for most inboxes
    displayNamestring | nullyes
    createdAtstring (date-time)yes
    heldCountintegeryesHeld, not yet expired messages: a count, no content
    requireApprovalbooleanyesSends from this inbox by API keys and members wait for an owner's or admin's approval
    roleAddressbooleanyesOne of NT Connect's role addresses on the shared domains (such as postmaster@); it cannot be deleted
    unreadCountintegernoPresent only with a sign-in token: threads in this inbox with mail this person hasn't opened
  • 401 — Unauthorized — The Authorization header is missing, or its API key or sign-in token is not valid. — application/problem+json: ProblemDetails
  • 403 — Forbidden — The credential is valid but may not do this: its organization is suspended, or (a sign-in token) the member's role in the organization is too low for the operation. — application/problem+json: ProblemDetails
  • 404 — NotFound — Not found. An id in the path is unknown, of the wrong kind, in another organization or deleted; on a /v0/orgs/{orgId}/… path, also an organization the caller is not a member of. — application/problem+json: ProblemDetails

DELETE DELETE /v0/inboxes/{inboxId}

Delete inbox

Deletes the inbox for good. Its address is retired and never issued again, and mail sent to it is refused at RCPT TO. All of its mail and drafts are deleted. An inbox.deleted event is sent. Answers 204; 404 when the inbox is not in this organization or is already deleted. NT Connect's role addresses on the shared domains (such as postmaster@) cannot be deleted: 403. Needs an API key that an owner or admin has allowed to delete inboxes; any other key gets 403. The permission is checked before the inbox is looked up, so such a key gets 403 for any id, even one that does not exist.

Auth: API key: Authorization: Bearer mc_live_…

From the console: DELETE /v0/orgs/{orgId}/inboxes/{inboxId}, with a console sign-in token.

Parameters

NameTypeRequiredNotes
inboxId (path)stringyes

Responses

  • 204 — The inbox was deleted.
  • 400 — BadRequest — Malformed request. The body is not valid JSON, or is empty while its Content-Type says JSON. — application/problem+json: ProblemDetails
  • 401 — Unauthorized — The Authorization header is missing, or its API key or sign-in token is not valid. — application/problem+json: ProblemDetails
  • 403 — This API key is not allowed to delete inboxes (an owner or admin can allow it on the API keys page); the inbox is one of NT Connect's role addresses (such as postmaster@ or abuse@), which cannot be deleted; or the organization is suspended. — application/problem+json: ProblemDetails
  • 404 — No such inbox in this organization: the id is unknown, belongs to another organization, or the inbox is already deleted. — application/problem+json: ProblemDetails

PATCH PATCH /v0/orgs/{orgId}/inboxes/{inboxId}

Set inbox approval

Switch whether sends from this inbox by API keys and members wait for an owner's or admin's approval. Admin and owner only; not available to API keys.

Auth: Console sign-in token (the console uses this; API keys are not accepted)

Parameters

NameTypeRequiredNotes
orgId (path)stringyes
inboxId (path)stringyes

Request body application/json

FieldTypeRequiredNotes
requireApprovalbooleanyes

Responses

  • 200 — The inbox. — application/json
    Response fields
    FieldTypeRequiredNotes
    idstringyes
    addressstringyes
    aliasesstring[]yesThe inbox's other addresses. Mail to any of them lands in this inbox, and a reply goes from the one the original used. Empty for most inboxes
    displayNamestring | nullyes
    createdAtstring (date-time)yes
    heldCountintegeryesHeld, not yet expired messages: a count, no content
    requireApprovalbooleanyesSends from this inbox by API keys and members wait for an owner's or admin's approval
    roleAddressbooleanyesOne of NT Connect's role addresses on the shared domains (such as postmaster@); it cannot be deleted
    unreadCountintegernoPresent only with a sign-in token: threads in this inbox with mail this person hasn't opened
  • 400 — BadRequest — Malformed request. The body is not valid JSON, or is empty while its Content-Type says JSON. — application/problem+json: ProblemDetails
  • 401 — Unauthorized — The Authorization header is missing, or its API key or sign-in token is not valid. — application/problem+json: ProblemDetails
  • 403 — Forbidden — The credential is valid but may not do this: its organization is suspended, or (a sign-in token) the member's role in the organization is too low for the operation. — application/problem+json: ProblemDetails
  • 404 — NotFound — Not found. An id in the path is unknown, of the wrong kind, in another organization or deleted; on a /v0/orgs/{orgId}/… path, also an organization the caller is not a member of. — application/problem+json: ProblemDetails
  • 413 — PayloadTooLarge — Body too large. The request body is over the operation's limit (for a send, the organization's message size limit). — application/problem+json: ProblemDetails
  • 415 — UnsupportedMediaType — Not JSON. The body's Content-Type is not one the operation reads: send application/json. — application/problem+json: ProblemDetails
  • 422 — ValidationFailed — Invalid request. A field is missing, unknown, of the wrong type or out of range, or the request breaks one of the operation's rules; the detail says which. — application/problem+json: ProblemDetails
  • 503 — ServiceUnavailable — Unavailable just now. Sign-in could not be checked or is not configured, or a service the operation needs is not available; try again shortly. — application/problem+json: ProblemDetails

Threads and messages

GET GET /v0/attachments/{attachmentId}

Attachment

Streams one message attachment with its stored content type and file name.

Auth: API key: Authorization: Bearer mc_live_…

From the console: GET /v0/orgs/{orgId}/attachments/{attachmentId}, with a console sign-in token.

Parameters

NameTypeRequiredNotes
attachmentId (path)stringyes

Responses

  • 200 — The attachment, with its stored content type. — */*: string (binary)
  • 401 — Unauthorized — The Authorization header is missing, or its API key or sign-in token is not valid. — application/problem+json: ProblemDetails
  • 403 — Forbidden — The credential is valid but may not do this: its organization is suspended, or (a sign-in token) the member's role in the organization is too low for the operation. — application/problem+json: ProblemDetails
  • 404 — NotFound — Not found. An id in the path is unknown, of the wrong kind, in another organization or deleted; on a /v0/orgs/{orgId}/… path, also an organization the caller is not a member of. — application/problem+json: ProblemDetails

GET GET /v0/inboxes/{inboxId}/threads

List threads

Pages through the threads in one inbox, newest activity first. Pass the nextCursor of a page as cursor to read the next. The optional filters list only threads with a message matching all of them; a cursor works only with the filters it was returned for.

Auth: API key: Authorization: Bearer mc_live_…

From the console: GET /v0/orgs/{orgId}/inboxes/{inboxId}/threads, with a console sign-in token.

Parameters

NameTypeRequiredNotes
limit (query)integerno1 to 100; default 25
cursor (query)stringno
q (query)stringnoFull-text search of subject, From, To, Cc and text: words are ANDed; "a phrase", or and -word work; 1 to 200 characters
from (query)stringnoOnly messages whose From address contains this, ignoring case; 1 to 200 characters
subject (query)stringnoOnly messages whose subject contains this, ignoring case; 1 to 200 characters
after (query)string (date-time)noOnly messages created at or after this ISO 8601 time with its zone (Z or +02:00)
before (query)string (date-time)noOnly messages created before this ISO 8601 time with its zone (Z or +02:00)
hasAttachments (query)booleannotrue: only messages with an attachment; false: without
inboxId (path)stringyes

Responses

  • 200 — A page of threads. — application/json
    Response fields
    FieldTypeRequiredNotes
    data{id, inboxId, subject, participants, messageCount, lastMessageAt, unread?}[]yes
    data[].idstringyes
    data[].inboxIdstringyes
    data[].subjectstring | nullyes
    data[].participantsstring[]yes
    data[].messageCountintegeryes
    data[].lastMessageAtstring (date-time)yes
    data[].unreadbooleannoPresent only with a sign-in token: the thread has received mail this person hasn't opened
    nextCursorstring | nullyesThe next page's cursor; null on the last page
  • 400 — InvalidCursor — Invalid cursor. This cursor isn't valid for this list. Read again without it. — application/problem+json: ProblemDetails
  • 401 — Unauthorized — The Authorization header is missing, or its API key or sign-in token is not valid. — application/problem+json: ProblemDetails
  • 403 — Forbidden — The credential is valid but may not do this: its organization is suspended, or (a sign-in token) the member's role in the organization is too low for the operation. — application/problem+json: ProblemDetails
  • 404 — NotFound — Not found. An id in the path is unknown, of the wrong kind, in another organization or deleted; on a /v0/orgs/{orgId}/… path, also an organization the caller is not a member of. — application/problem+json: ProblemDetails
  • 422 — Invalid query. A parameter is malformed or out of range, q has no words, or after is later than before; the detail says which. — application/problem+json: ProblemDetails
  • 503 — Search took too long; narrow it. On a sign-in token, also: sign-in could not be checked or is not configured. — application/problem+json: ProblemDetails

GET GET /v0/messages/{messageId}

Get message

Returns one message with its text body, attachments, sender authentication results (SPF, DKIM, DMARC) and, for a sent message, its recipients.

Auth: API key: Authorization: Bearer mc_live_…

From the console: GET /v0/orgs/{orgId}/messages/{messageId}, with a console sign-in token.

Parameters

NameTypeRequiredNotes
messageId (path)stringyes

Responses

  • 200 — The message. Email fields are null for other channels. — application/json
    Response fields
    FieldTypeRequiredNotes
    idstringyes
    threadIdstringyes
    inboxIdstringyes
    channelstringyes
    directionstringyesinbound or outbound
    statusstringyes
    fromstring | nullyes
    tostring[] | nullyes
    ccstring[] | nullyes
    deliveredTostring | nullyesThe inbox address a received message was delivered to; null for a sent message and for mail received before 2026-12-01
    subjectstring | nullyes
    messageIdHeaderstring | nullyes
    inReplyTostring | nullyes
    referencesstring[] | nullyes
    receivedAtstring (date-time)yes
    authentication{spf, dkim, dmarc}yes
    authentication.spfstring | nullyes
    authentication.dkimstring | nullyes
    authentication.dmarcstring | nullyes
    textstring | nullyesnull only when the message has no text
    hasHtmlbooleanyestrue when the message has an HTML version. This JSON never carries the HTML: read it through a short-lived link from POST .../messages/{messageId}/view, or in the raw MIME from GET .../messages/{messageId}/raw
    attachments{id, filename, contentType, size, contentId}[]yes
    attachments[].idstringyes
    attachments[].filenamestring | nullyes
    attachments[].contentTypestring | nullyes
    attachments[].sizeintegeryesBytes
    attachments[].contentIdstring | nullyes
    recipients{address, kind, status, bounceType, detail}[] | nullyesA sent message's recipients; null for a received one
    recipients[].addressstringyes
    recipients[].kind"to" | "cc" | "bcc"yes
    recipients[].status"queued" | "sent" | "delivered" | "bounced" | "complained" | "failed"yes
    recipients[].bounceTypestring | nullyes
    recipients[].detailstring | nullyes
    errorstring | nullyesWhy a failed sent message failed; null otherwise
    costCreditedbooleanyestrue when the provider rejected a sent message after accepting it and its cost was credited back
  • 401 — Unauthorized — The Authorization header is missing, or its API key or sign-in token is not valid. — application/problem+json: ProblemDetails
  • 403 — Forbidden — The credential is valid but may not do this: its organization is suspended, or (a sign-in token) the member's role in the organization is too low for the operation. — application/problem+json: ProblemDetails
  • 404 — NotFound — Not found. An id in the path is unknown, of the wrong kind, in another organization or deleted; on a /v0/orgs/{orgId}/… path, also an organization the caller is not a member of. — application/problem+json: ProblemDetails

GET GET /v0/messages/{messageId}/raw

Raw MIME

Streams the message exactly as it was received or sent, as message/rfc822.

Auth: API key: Authorization: Bearer mc_live_…

From the console: GET /v0/orgs/{orgId}/messages/{messageId}/raw, with a console sign-in token.

Parameters

NameTypeRequiredNotes
messageId (path)stringyes

Responses

  • 200 — The raw message. — message/rfc822: string (binary)
  • 401 — Unauthorized — The Authorization header is missing, or its API key or sign-in token is not valid. — application/problem+json: ProblemDetails
  • 403 — Forbidden — The credential is valid but may not do this: its organization is suspended, or (a sign-in token) the member's role in the organization is too low for the operation. — application/problem+json: ProblemDetails
  • 404 — NotFound — Not found. An id in the path is unknown, of the wrong kind, in another organization or deleted; on a /v0/orgs/{orgId}/… path, also an organization the caller is not a member of. — application/problem+json: ProblemDetails

POST POST /v0/messages/{messageId}/view

Message view link

Returns a short-lived link (it expires in 300 seconds) to the message's HTML, served with remote images blocked unless remoteImages is true. Answers 409 when the message has no HTML version.

Auth: API key: Authorization: Bearer mc_live_…

From the console: POST /v0/orgs/{orgId}/messages/{messageId}/view, with a console sign-in token.

Parameters

NameTypeRequiredNotes
messageId (path)stringyes

Request body application/json

FieldTypeRequiredNotes
remoteImagesbooleanyes

Responses

  • 200 — A signed link to the formatted view, valid for 300 seconds. — application/json
    Response fields
    FieldTypeRequiredNotes
    urlstringyes
    expiresAtstring (date-time)yes
    blockedRedirectstring | nullyesThe redirect the served copy blocked (a meta refresh's URL), or null
  • 400 — BadRequest — Malformed request. The body is not valid JSON, or is empty while its Content-Type says JSON. — application/problem+json: ProblemDetails
  • 401 — Unauthorized — The Authorization header is missing, or its API key or sign-in token is not valid. — application/problem+json: ProblemDetails
  • 403 — Forbidden — The credential is valid but may not do this: its organization is suspended, or (a sign-in token) the member's role in the organization is too low for the operation. — application/problem+json: ProblemDetails
  • 404 — NotFound — Not found. An id in the path is unknown, of the wrong kind, in another organization or deleted; on a /v0/orgs/{orgId}/… path, also an organization the caller is not a member of. — application/problem+json: ProblemDetails
  • 409 — Conflict — Conflict. The request clashes with the current state of what it names; the detail says how. — application/problem+json: ProblemDetails
  • 413 — PayloadTooLarge — Body too large. The request body is over the operation's limit (for a send, the organization's message size limit). — application/problem+json: ProblemDetails
  • 415 — UnsupportedMediaType — Not JSON. The body's Content-Type is not one the operation reads: send application/json. — application/problem+json: ProblemDetails
  • 422 — ValidationFailed — Invalid request. A field is missing, unknown, of the wrong type or out of range, or the request breaks one of the operation's rules; the detail says which. — application/problem+json: ProblemDetails
  • 503 — ServiceUnavailable — Unavailable just now. Sign-in could not be checked or is not configured, or a service the operation needs is not available; try again shortly. — application/problem+json: ProblemDetails

GET GET /v0/threads

Search threads

Pages through the threads of every inbox in the organization, or of the one inbox names, that have a message matching all the filters given; at least one filter is required. Each thread carries its inboxId. Pass the nextCursor of a page as cursor, with the same filters, to read the next.

Auth: API key: Authorization: Bearer mc_live_…

From the console: GET /v0/orgs/{orgId}/threads, with a console sign-in token.

Parameters

NameTypeRequiredNotes
limit (query)integerno1 to 100; default 25
cursor (query)stringno
q (query)stringnoFull-text search of subject, From, To, Cc and text: words are ANDed; "a phrase", or and -word work; 1 to 200 characters
from (query)stringnoOnly messages whose From address contains this, ignoring case; 1 to 200 characters
subject (query)stringnoOnly messages whose subject contains this, ignoring case; 1 to 200 characters
after (query)string (date-time)noOnly messages created at or after this ISO 8601 time with its zone (Z or +02:00)
before (query)string (date-time)noOnly messages created before this ISO 8601 time with its zone (Z or +02:00)
hasAttachments (query)booleannotrue: only messages with an attachment; false: without
inbox (query)stringnoOnly this inbox's threads (an ibx_ id)

Responses

  • 200 — A page of threads. — application/json
    Response fields
    FieldTypeRequiredNotes
    data{id, inboxId, subject, participants, messageCount, lastMessageAt, unread?}[]yes
    data[].idstringyes
    data[].inboxIdstringyes
    data[].subjectstring | nullyes
    data[].participantsstring[]yes
    data[].messageCountintegeryes
    data[].lastMessageAtstring (date-time)yes
    data[].unreadbooleannoPresent only with a sign-in token: the thread has received mail this person hasn't opened
    nextCursorstring | nullyesThe next page's cursor; null on the last page
  • 400 — InvalidCursor — Invalid cursor. This cursor isn't valid for this list. Read again without it. — application/problem+json: ProblemDetails
  • 401 — Unauthorized — The Authorization header is missing, or its API key or sign-in token is not valid. — application/problem+json: ProblemDetails
  • 403 — Forbidden — The credential is valid but may not do this: its organization is suspended, or (a sign-in token) the member's role in the organization is too low for the operation. — application/problem+json: ProblemDetails
  • 404 — Not found. inbox is unknown, of the wrong kind, in another organization or deleted; on /v0/orgs/{orgId}/threads, also an organization the caller is not a member of. — application/problem+json: ProblemDetails
  • 422 — Invalid query. A parameter is malformed or out of range, q has no words, or after is later than before; the detail says which. Or no filter was given (inbox alone is none). — application/problem+json: ProblemDetails
  • 503 — Search took too long; narrow it. On a sign-in token, also: sign-in could not be checked or is not configured. — application/problem+json: ProblemDetails

GET GET /v0/threads/{threadId}

Get thread

Returns one thread with a summary of each of its messages and its count of held messages. Read a message by its id for the full text.

Auth: API key: Authorization: Bearer mc_live_…

From the console: GET /v0/orgs/{orgId}/threads/{threadId}, with a console sign-in token.

Parameters

NameTypeRequiredNotes
threadId (path)stringyes

Responses

  • 200 — The thread and a summary of each visible message. — application/json
    Response fields
    FieldTypeRequiredNotes
    idstringyes
    inboxIdstringyes
    subjectstring | nullyes
    participantsstring[]yes
    messageCountintegeryes
    lastMessageAtstring (date-time)yes
    unreadbooleannoPresent only with a sign-in token: the thread has received mail this person hasn't opened
    heldCountintegeryes
    messages{id, channel, from, to, deliveredTo, subject, receivedAt, snippet, hasHtml, attachmentCount}[]yesVisible messages, oldest first
    messages[].idstringyes
    messages[].channelstringyes
    messages[].fromstring | nullyes
    messages[].tostring[] | nullyes
    messages[].deliveredTostring | nullyesThe inbox address a received message was delivered to; null for a sent message and for mail received before 2026-12-01
    messages[].subjectstring | nullyes
    messages[].receivedAtstring (date-time)yes
    messages[].snippetstring | nullyesThe first 200 characters of the text; null when there is none
    messages[].hasHtmlbooleanyes
    messages[].attachmentCountintegeryes
  • 401 — Unauthorized — The Authorization header is missing, or its API key or sign-in token is not valid. — application/problem+json: ProblemDetails
  • 403 — Forbidden — The credential is valid but may not do this: its organization is suspended, or (a sign-in token) the member's role in the organization is too low for the operation. — application/problem+json: ProblemDetails
  • 404 — NotFound — Not found. An id in the path is unknown, of the wrong kind, in another organization or deleted; on a /v0/orgs/{orgId}/… path, also an organization the caller is not a member of. — application/problem+json: ProblemDetails

GET GET /v0/view/{token}

Message as HTML

Serves the message's HTML, formatted for reading. No API key needed: the signed token in the path, from the message's view link, is the credential.

Auth: None

Parameters

NameTypeRequiredNotes
token (path)stringyes

Responses

  • 200 — The message's HTML. — text/html: string
  • 404 — NotFound — Not found. An id in the path is unknown, of the wrong kind, in another organization or deleted; on a /v0/orgs/{orgId}/… path, also an organization the caller is not a member of. — application/problem+json: ProblemDetails
  • 503 — ServiceUnavailable — Unavailable just now. Sign-in could not be checked or is not configured, or a service the operation needs is not available; try again shortly. — application/problem+json: ProblemDetails

GET GET /v0/view/{token}/att/{attachmentId}

Viewed attachment

Serves one attachment of the message a view link names. The signed token is the credential and reaches only that message's attachments. Raster images are shown inline; anything else downloads.

Auth: None

Parameters

NameTypeRequiredNotes
token (path)stringyes
attachmentId (path)stringyes

Responses

  • 200 — The attachment, with its stored content type. — */*: string (binary)
  • 404 — NotFound — Not found. An id in the path is unknown, of the wrong kind, in another organization or deleted; on a /v0/orgs/{orgId}/… path, also an organization the caller is not a member of. — application/problem+json: ProblemDetails
  • 503 — ServiceUnavailable — Unavailable just now. Sign-in could not be checked or is not configured, or a service the operation needs is not available; try again shortly. — application/problem+json: ProblemDetails

POST POST /v0/orgs/{orgId}/threads/{threadId}/read

Mark thread read

Marks the thread read for the signed-in person, as of now. Sign-in token only; other members' unread state is unchanged.

Auth: Console sign-in token (the console uses this; API keys are not accepted)

Parameters

NameTypeRequiredNotes
orgId (path)stringyes
threadId (path)stringyes

Responses

  • 204 — The thread was marked.
  • 400 — BadRequest — Malformed request. The body is not valid JSON, or is empty while its Content-Type says JSON. — application/problem+json: ProblemDetails
  • 401 — Unauthorized — The Authorization header is missing, or its API key or sign-in token is not valid. — application/problem+json: ProblemDetails
  • 404 — Not found. The thread is unknown, of the wrong kind, in another organization or has no visible message; or an organization the caller is not a member of. — application/problem+json: ProblemDetails
  • 503 — ServiceUnavailable — Unavailable just now. Sign-in could not be checked or is not configured, or a service the operation needs is not available; try again shortly. — application/problem+json: ProblemDetails

POST POST /v0/orgs/{orgId}/threads/{threadId}/unread

Mark thread unread

Marks the thread unread for the signed-in person: every message in it counts as unread again. Sign-in token only; other members' unread state is unchanged.

Auth: Console sign-in token (the console uses this; API keys are not accepted)

Parameters

NameTypeRequiredNotes
orgId (path)stringyes
threadId (path)stringyes

Responses

  • 204 — The thread was marked.
  • 400 — BadRequest — Malformed request. The body is not valid JSON, or is empty while its Content-Type says JSON. — application/problem+json: ProblemDetails
  • 401 — Unauthorized — The Authorization header is missing, or its API key or sign-in token is not valid. — application/problem+json: ProblemDetails
  • 404 — Not found. The thread is unknown, of the wrong kind, in another organization or has no visible message; or an organization the caller is not a member of. — application/problem+json: ProblemDetails
  • 503 — ServiceUnavailable — Unavailable just now. Sign-in could not be checked or is not configured, or a service the operation needs is not available; try again shortly. — application/problem+json: ProblemDetails

Sending

POST POST /v0/inboxes/{inboxId}/messages

Send message

Send a new message from this inbox; it starts a new thread. Optional replyTo (addresses) and headers (custom X- headers) go into the message. Needs an Idempotency-Key header. Answers 202 once the message is queued. On an inbox that requires approval, an API key's or a member's request is held as a draft for an owner or admin instead: 202 {status: "pending_approval", draftId}.

Auth: API key: Authorization: Bearer mc_live_…

From the console: POST /v0/orgs/{orgId}/inboxes/{inboxId}/messages, with a console sign-in token.

Parameters

NameTypeRequiredNotes
inboxId (path)stringyes
Idempotency-Key (header)stringyesYour key for this send. Reuse it when you retry and the same request gets the same answer; the same key with a different request is a 422. Values starting with "draft:" are reserved; 1 to 255 characters

Request body application/json

FieldTypeRequiredNotes
tostring[]noat most 50 items
ccstring[]noat most 50 items
bccstring[]noat most 50 items
subjectstringnoat most 998 characters; matches ^[^\r\n]*$
textstringno
htmlstringno
attachments{filename, contentType, contentBase64}[]noat most 100 items
attachments[].filenamestringyes1 to 255 characters; matches ^[^\r\n]*$
attachments[].contentTypestringyesat most 255 characters; matches ^[A-Za-z0-9!#$&^_.+-]+/[A-Za-z0-9!#$&^_.+-]+$
attachments[].contentBase64stringyes
replyTostring[]no1 to 5 addresses that replies should go to. They are not recipients
headersobjectnoUp to 20 custom headers; each name starts with X-. X-SES-*, X-MailCraft-* and X-Mailer are refused. Each value is 1 to 997 printable ASCII characters with at least one non-space; names and values total at most 8 KiB

Requires at least one of: to, cc, bcc (non-empty).

Requires at least one of: text, html.

Responses

  • 202 — Accepted. The message is queued: {id, threadId, status: "queued", recipients}. Or, for an API key or a member on an inbox that requires approval, it is held as a draft for an owner or admin: {status: "pending_approval", draftId}. A retry with the same Idempotency-Key and the same request gets the same answer. — application/json: {id, threadId, status, recipients} | {status, draftId}
  • 400 — IdempotencyKeyMissing — Idempotency-Key missing. The Idempotency-Key header is missing, empty or over 255 characters, or (a send or a reply) starts with the reserved "draft:"; or the body is not valid JSON. — application/problem+json: ProblemDetails
  • 401 — Unauthorized — The Authorization header is missing, or its API key or sign-in token is not valid. — application/problem+json: ProblemDetails
  • 402 — PaymentRequired — Out of messages. The organization has used its messages; sending resumes after a top-up or the monthly refill. — application/problem+json: ProblemDetails
  • 403 — Forbidden — The credential is valid but may not do this: its organization is suspended, or (a sign-in token) the member's role in the organization is too low for the operation. — application/problem+json: ProblemDetails
  • 404 — NotFound — Not found. An id in the path is unknown, of the wrong kind, in another organization or deleted; on a /v0/orgs/{orgId}/… path, also an organization the caller is not a member of. — application/problem+json: ProblemDetails
  • 413 — PayloadTooLarge — Body too large. The request body is over the operation's limit (for a send, the organization's message size limit). — application/problem+json: ProblemDetails
  • 415 — UnsupportedMediaType — Not JSON. The body's Content-Type is not one the operation reads: send application/json. — application/problem+json: ProblemDetails
  • 422 — ValidationFailed — Invalid request. A field is missing, unknown, of the wrong type or out of range, or the request breaks one of the operation's rules; the detail says which. — application/problem+json: ProblemDetails
  • 429 — TooManyRequests — The organization's sending limit was reached. Wait the number of seconds in the Retry-After header before sending again. — application/problem+json: ProblemDetails — Headers: Retry-After (integer): Seconds to wait before sending again. X-RateLimit-Limit (integer): The limit of the window that was reached, in messages. X-RateLimit-Remaining (integer): Messages left in that window: 0. X-RateLimit-Reset (integer): Seconds until that window has room again; the same as Retry-After.
  • 503 — ServiceUnavailable — Unavailable just now. Sign-in could not be checked or is not configured, or a service the operation needs is not available; try again shortly. — application/problem+json: ProblemDetails

POST POST /v0/messages/{messageId}/forward

Forward

Forward a message in one of your inboxes, from that inbox, to new recipients, with an optional note (text or html) above the original. The recipient gets a new conversation; here it starts a new thread. The original's attachments go with it unless includeAttachments is false (a message you sent carries its text but not its attachments). Optional replyTo and headers as on send. Needs an Idempotency-Key header. On an inbox that requires approval, an API key's or a member's request is held as a draft for an owner or admin instead: 202 {status: "pending_approval", draftId}; the draft holds the whole composed message, so each body part must fit a draft's 1 MiB.

Auth: API key: Authorization: Bearer mc_live_…

From the console: POST /v0/orgs/{orgId}/messages/{messageId}/forward, with a console sign-in token.

Parameters

NameTypeRequiredNotes
messageId (path)stringyes
Idempotency-Key (header)stringyesYour key for this send. Reuse it when you retry and the same request gets the same answer; the same key with a different request is a 422. Values starting with "draft:" are reserved; 1 to 255 characters

Request body application/json

FieldTypeRequiredNotes
tostring[]noat most 50 items
ccstring[]noat most 50 items
bccstring[]noat most 50 items
subjectstringnoat most 998 characters; matches ^[^\r\n]*$
textstringno
htmlstringno
attachments{filename, contentType, contentBase64}[]noat most 100 items
attachments[].filenamestringyes1 to 255 characters; matches ^[^\r\n]*$
attachments[].contentTypestringyesat most 255 characters; matches ^[A-Za-z0-9!#$&^_.+-]+/[A-Za-z0-9!#$&^_.+-]+$
attachments[].contentBase64stringyes
replyTostring[]no1 to 5 addresses that replies should go to. They are not recipients
headersobjectnoUp to 20 custom headers; each name starts with X-. X-SES-*, X-MailCraft-* and X-Mailer are refused. Each value is 1 to 997 printable ASCII characters with at least one non-space; names and values total at most 8 KiB
includeAttachmentsbooleannoRe-attach the original's attachments (received mail only). Default true

Requires at least one of: to, cc, bcc (non-empty).

Responses

  • 202 — Accepted. The message is queued: {id, threadId, status: "queued", recipients}. Or, for an API key or a member on an inbox that requires approval, it is held as a draft for an owner or admin: {status: "pending_approval", draftId}. A retry with the same Idempotency-Key and the same request gets the same answer. — application/json: {id, threadId, status, recipients} | {status, draftId}
  • 400 — IdempotencyKeyMissing — Idempotency-Key missing. The Idempotency-Key header is missing, empty or over 255 characters, or (a send or a reply) starts with the reserved "draft:"; or the body is not valid JSON. — application/problem+json: ProblemDetails
  • 401 — Unauthorized — The Authorization header is missing, or its API key or sign-in token is not valid. — application/problem+json: ProblemDetails
  • 402 — PaymentRequired — Out of messages. The organization has used its messages; sending resumes after a top-up or the monthly refill. — application/problem+json: ProblemDetails
  • 403 — Forbidden — The credential is valid but may not do this: its organization is suspended, or (a sign-in token) the member's role in the organization is too low for the operation. — application/problem+json: ProblemDetails
  • 404 — NotFound — Not found. An id in the path is unknown, of the wrong kind, in another organization or deleted; on a /v0/orgs/{orgId}/… path, also an organization the caller is not a member of. — application/problem+json: ProblemDetails
  • 413 — PayloadTooLarge — Body too large. The request body is over the operation's limit (for a send, the organization's message size limit). — application/problem+json: ProblemDetails
  • 415 — UnsupportedMediaType — Not JSON. The body's Content-Type is not one the operation reads: send application/json. — application/problem+json: ProblemDetails
  • 422 — ValidationFailed — Invalid request. A field is missing, unknown, of the wrong type or out of range, or the request breaks one of the operation's rules; the detail says which. — application/problem+json: ProblemDetails
  • 429 — TooManyRequests — The organization's sending limit was reached. Wait the number of seconds in the Retry-After header before sending again. — application/problem+json: ProblemDetails — Headers: Retry-After (integer): Seconds to wait before sending again. X-RateLimit-Limit (integer): The limit of the window that was reached, in messages. X-RateLimit-Remaining (integer): Messages left in that window: 0. X-RateLimit-Reset (integer): Seconds until that window has room again; the same as Retry-After.
  • 503 — ServiceUnavailable — Unavailable just now. Sign-in could not be checked or is not configured, or a service the operation needs is not available; try again shortly. — application/problem+json: ProblemDetails

POST POST /v0/messages/{messageId}/reply

Reply

Reply to a message in one of your inboxes, from that inbox; it joins the message's thread. Optional replyTo (addresses) and headers (custom X- headers) go into the message. Needs an Idempotency-Key header. On an inbox that requires approval, an API key's or a member's request is held as a draft for an owner or admin instead: 202 {status: "pending_approval", draftId}.

Auth: API key: Authorization: Bearer mc_live_…

From the console: POST /v0/orgs/{orgId}/messages/{messageId}/reply, with a console sign-in token.

Parameters

NameTypeRequiredNotes
messageId (path)stringyes
Idempotency-Key (header)stringyesYour key for this send. Reuse it when you retry and the same request gets the same answer; the same key with a different request is a 422. Values starting with "draft:" are reserved; 1 to 255 characters

Request body application/json

FieldTypeRequiredNotes
tostring[]noat most 50 items
ccstring[]noat most 50 items
bccstring[]noat most 50 items
subjectstringnoat most 998 characters; matches ^[^\r\n]*$
textstringno
htmlstringno
attachments{filename, contentType, contentBase64}[]noat most 100 items
attachments[].filenamestringyes1 to 255 characters; matches ^[^\r\n]*$
attachments[].contentTypestringyesat most 255 characters; matches ^[A-Za-z0-9!#$&^_.+-]+/[A-Za-z0-9!#$&^_.+-]+$
attachments[].contentBase64stringyes
replyTostring[]no1 to 5 addresses that replies should go to. They are not recipients
headersobjectnoUp to 20 custom headers; each name starts with X-. X-SES-*, X-MailCraft-* and X-Mailer are refused. Each value is 1 to 997 printable ASCII characters with at least one non-space; names and values total at most 8 KiB
replyAllbooleannoAlso copy the original's other To and Cc, minus this inbox and anyone already in to, then your cc, each once

Requires at least one of: text, html.

Responses

  • 202 — Accepted. The message is queued: {id, threadId, status: "queued", recipients}. Or, for an API key or a member on an inbox that requires approval, it is held as a draft for an owner or admin: {status: "pending_approval", draftId}. A retry with the same Idempotency-Key and the same request gets the same answer. — application/json: {id, threadId, status, recipients} | {status, draftId}
  • 400 — IdempotencyKeyMissing — Idempotency-Key missing. The Idempotency-Key header is missing, empty or over 255 characters, or (a send or a reply) starts with the reserved "draft:"; or the body is not valid JSON. — application/problem+json: ProblemDetails
  • 401 — Unauthorized — The Authorization header is missing, or its API key or sign-in token is not valid. — application/problem+json: ProblemDetails
  • 402 — PaymentRequired — Out of messages. The organization has used its messages; sending resumes after a top-up or the monthly refill. — application/problem+json: ProblemDetails
  • 403 — Forbidden — The credential is valid but may not do this: its organization is suspended, or (a sign-in token) the member's role in the organization is too low for the operation. — application/problem+json: ProblemDetails
  • 404 — NotFound — Not found. An id in the path is unknown, of the wrong kind, in another organization or deleted; on a /v0/orgs/{orgId}/… path, also an organization the caller is not a member of. — application/problem+json: ProblemDetails
  • 413 — PayloadTooLarge — Body too large. The request body is over the operation's limit (for a send, the organization's message size limit). — application/problem+json: ProblemDetails
  • 415 — UnsupportedMediaType — Not JSON. The body's Content-Type is not one the operation reads: send application/json. — application/problem+json: ProblemDetails
  • 422 — ValidationFailed — Invalid request. A field is missing, unknown, of the wrong type or out of range, or the request breaks one of the operation's rules; the detail says which. — application/problem+json: ProblemDetails
  • 429 — TooManyRequests — The organization's sending limit was reached. Wait the number of seconds in the Retry-After header before sending again. — application/problem+json: ProblemDetails — Headers: Retry-After (integer): Seconds to wait before sending again. X-RateLimit-Limit (integer): The limit of the window that was reached, in messages. X-RateLimit-Remaining (integer): Messages left in that window: 0. X-RateLimit-Reset (integer): Seconds until that window has room again; the same as Retry-After.
  • 503 — ServiceUnavailable — Unavailable just now. Sign-in could not be checked or is not configured, or a service the operation needs is not available; try again shortly. — application/problem+json: ProblemDetails

Drafts

GET GET /v0/draft-view/{token}

Draft as HTML

Serves the draft's HTML, formatted for reading. No API key needed: the signed token in the path, from the draft's view link, is the credential.

Auth: None

Parameters

NameTypeRequiredNotes
token (path)stringyes

Responses

  • 200 — The draft's HTML. — text/html: string
  • 404 — NotFound — Not found. An id in the path is unknown, of the wrong kind, in another organization or deleted; on a /v0/orgs/{orgId}/… path, also an organization the caller is not a member of. — application/problem+json: ProblemDetails
  • 503 — ServiceUnavailable — Unavailable just now. Sign-in could not be checked or is not configured, or a service the operation needs is not available; try again shortly. — application/problem+json: ProblemDetails

GET GET /v0/drafts

List drafts

Drafts you can see, newest first: an API key sees agents' drafts; a person sees those and their own; an owner or admin also sees members' submitted drafts. awaiting=true lists drafts waiting for approval, oldest first.

Auth: API key: Authorization: Bearer mc_live_…

From the console: GET /v0/orgs/{orgId}/drafts, with a console sign-in token.

Parameters

NameTypeRequiredNotes
inbox (query)stringno
status (query)"open" | "sent" | "rejected"no
awaiting (query)booleanno
mine (query)booleanno
limit (query)integerno1 to 100; default 25
cursor (query)stringno

Responses

  • 200 — A page of drafts. — application/json
    Response fields
    FieldTypeRequiredNotes
    data{id, inboxId, inboxAddress, fromAddress, channel, status, authorKind, authorName, to, cc, bcc, subject, replyTo, headers, submittedAt, version, createdAt, updatedAt}[]yes
    data[].idstringyes
    data[].inboxIdstringyes
    data[].inboxAddressstringyes
    data[].fromAddressstringyesThe address a send of this draft goes from: for a reply, the inbox address the original used; otherwise the inbox's address
    data[].channelstringyes
    data[].status"open" | "sent" | "rejected"yes
    data[].authorKind"agent" | "person"yes
    data[].authorNamestring | nullyes
    data[].tostring[]yes
    data[].ccstring[]yes
    data[].bccstring[]yes
    data[].subjectstring | nullyes
    data[].replyTostring[] | nullyes
    data[].headersobject | nullyes
    data[].submittedAtstring (date-time) | nullyesWhen it was submitted for approval; null while it is not
    data[].versionintegeryesGive it back to update, send or reject the draft
    data[].createdAtstring (date-time)yes
    data[].updatedAtstring (date-time)yes
    nextCursorstring | nullyesThe next page's cursor; null on the last page
  • 400 — Invalid cursor or mine. This cursor isn't valid for this list (read again without it), or mine=true came with an API key. — application/problem+json: ProblemDetails
  • 401 — Unauthorized — The Authorization header is missing, or its API key or sign-in token is not valid. — application/problem+json: ProblemDetails
  • 403 — Forbidden — The credential is valid but may not do this: its organization is suspended, or (a sign-in token) the member's role in the organization is too low for the operation. — application/problem+json: ProblemDetails
  • 404 — No such inbox: inbox names one that is unknown or not in this organization (or, at /v0/orgs/{orgId}/…, no such organization). — application/problem+json: ProblemDetails
  • 422 — The query string failed schema validation. — application/problem+json: ProblemDetails

GET GET /v0/drafts/{draftId}

Get draft

One draft: its fields, attachments (metadata), author, status, review and, once sent, its message id.

Auth: API key: Authorization: Bearer mc_live_…

From the console: GET /v0/orgs/{orgId}/drafts/{draftId}, with a console sign-in token.

Parameters

NameTypeRequiredNotes
draftId (path)stringyes

Responses

  • 200 — The draft. — application/json
    Response fields
    FieldTypeRequiredNotes
    idstringyes
    inboxIdstringyes
    inboxAddressstringyes
    fromAddressstringyesThe address a send of this draft goes from: for a reply, the inbox address the original used; otherwise the inbox's address
    channelstringyes
    status"open" | "sent" | "rejected"yes
    authorKind"agent" | "person"yes
    authorNamestring | nullyes
    tostring[]yes
    ccstring[]yes
    bccstring[]yes
    subjectstring | nullyes
    replyTostring[] | nullyes
    headersobject | nullyes
    submittedAtstring (date-time) | nullyesWhen it was submitted for approval; null while it is not
    versionintegeryesGive it back to update, send or reject the draft
    createdAtstring (date-time)yes
    updatedAtstring (date-time)yes
    replyToMessageIdstring | nullyes
    createdAsReplybooleanyes
    textstring | nullyes
    htmlstring | nullyes
    attachments{id, filename, contentType, size}[]yes
    attachments[].idstringyes
    attachments[].filenamestringyes
    attachments[].contentTypestringyes
    attachments[].sizeintegeryesBytes
    authorApiKeyIdstring | nullyesThe API key that wrote it (key_…)
    authorUserIdstring | nullyesThe member who wrote it (usr_…)
    editedByReviewerbooleanyes
    reviewNotestring | nullyes
    reviewedBystring | nullyesThe member who approved or rejected it (usr_…)
    reviewedAtstring (date-time) | nullyes
    messageIdstring | nullyesThe sent message's id, once sent
    closedAtstring (date-time) | nullyes
  • 401 — Unauthorized — The Authorization header is missing, or its API key or sign-in token is not valid. — application/problem+json: ProblemDetails
  • 403 — Forbidden — The credential is valid but may not do this: its organization is suspended, or (a sign-in token) the member's role in the organization is too low for the operation. — application/problem+json: ProblemDetails
  • 404 — NotFound — Not found. An id in the path is unknown, of the wrong kind, in another organization or deleted; on a /v0/orgs/{orgId}/… path, also an organization the caller is not a member of. — application/problem+json: ProblemDetails

PATCH PATCH /v0/drafts/{draftId}

Update a draft

Update a draft. Give the version you read; a stale one is 409. Only its author edits an open draft; once it waits for approval only an owner or admin can, which marks it edited. attachments replaces the list: pass {id} to keep one. replyTo and headers replace the stored value; null clears.

Auth: API key: Authorization: Bearer mc_live_…

From the console: PATCH /v0/orgs/{orgId}/drafts/{draftId}, with a console sign-in token.

Parameters

NameTypeRequiredNotes
draftId (path)stringyes

Request body application/json

FieldTypeRequiredNotes
versionintegeryesat least 1
tostring[]noat most 50 items
ccstring[]noat most 50 items
bccstring[]noat most 50 items
subjectstring | nullnoat most 998 characters; matches ^[^\r\n]*$
textstring | nullno
htmlstring | nullno
attachments({id} | {filename, contentType, contentBase64})[]noat most 100 items
attachments[{id}].idstringyes
attachments[{filename, contentType, contentBase64}].filenamestringyes1 to 255 characters; matches ^[^\r\n]*$
attachments[{filename, contentType, contentBase64}].contentTypestringyesat most 255 characters; matches ^[A-Za-z0-9!#$&^_.+-]+/[A-Za-z0-9!#$&^_.+-]+$
attachments[{filename, contentType, contentBase64}].contentBase64stringyes
replyTostring[] | nullno1 to 5 addresses that replies should go to. They are not recipients. null or [] clears
headersobject | nullnoUp to 20 custom headers; each name starts with X-. X-SES-*, X-MailCraft-* and X-Mailer are refused. Each value is 1 to 997 printable ASCII characters with at least one non-space; names and values total at most 8 KiB. null or {} clears

Responses

  • 200 — The updated draft. — application/json
    Response fields
    FieldTypeRequiredNotes
    idstringyes
    inboxIdstringyes
    inboxAddressstringyes
    fromAddressstringyesThe address a send of this draft goes from: for a reply, the inbox address the original used; otherwise the inbox's address
    channelstringyes
    status"open" | "sent" | "rejected"yes
    authorKind"agent" | "person"yes
    authorNamestring | nullyes
    tostring[]yes
    ccstring[]yes
    bccstring[]yes
    subjectstring | nullyes
    replyTostring[] | nullyes
    headersobject | nullyes
    submittedAtstring (date-time) | nullyesWhen it was submitted for approval; null while it is not
    versionintegeryesGive it back to update, send or reject the draft
    createdAtstring (date-time)yes
    updatedAtstring (date-time)yes
    replyToMessageIdstring | nullyes
    createdAsReplybooleanyes
    textstring | nullyes
    htmlstring | nullyes
    attachments{id, filename, contentType, size}[]yes
    attachments[].idstringyes
    attachments[].filenamestringyes
    attachments[].contentTypestringyes
    attachments[].sizeintegeryesBytes
    authorApiKeyIdstring | nullyesThe API key that wrote it (key_…)
    authorUserIdstring | nullyesThe member who wrote it (usr_…)
    editedByReviewerbooleanyes
    reviewNotestring | nullyes
    reviewedBystring | nullyesThe member who approved or rejected it (usr_…)
    reviewedAtstring (date-time) | nullyes
    messageIdstring | nullyesThe sent message's id, once sent
    closedAtstring (date-time) | nullyes
  • 400 — BadRequest — Malformed request. The body is not valid JSON, or is empty while its Content-Type says JSON. — application/problem+json: ProblemDetails
  • 401 — Unauthorized — The Authorization header is missing, or its API key or sign-in token is not valid. — application/problem+json: ProblemDetails
  • 403 — Not allowed. Only a draft's author edits or deletes it while it is open; only an owner or admin approves, edits or rejects one waiting for approval; or the member's role is too low, or the organization is suspended. — application/problem+json: ProblemDetails
  • 404 — NotFound — Not found. An id in the path is unknown, of the wrong kind, in another organization or deleted; on a /v0/orgs/{orgId}/… path, also an organization the caller is not a member of. — application/problem+json: ProblemDetails
  • 409 — The draft changed. The version given is not its current one, or it is no longer open to this (already sent, rejected or waiting for a person); read it again. — application/problem+json: ProblemDetails
  • 413 — PayloadTooLarge — Body too large. The request body is over the operation's limit (for a send, the organization's message size limit). — application/problem+json: ProblemDetails
  • 415 — UnsupportedMediaType — Not JSON. The body's Content-Type is not one the operation reads: send application/json. — application/problem+json: ProblemDetails
  • 422 — ValidationFailed — Invalid request. A field is missing, unknown, of the wrong type or out of range, or the request breaks one of the operation's rules; the detail says which. — application/problem+json: ProblemDetails

DELETE DELETE /v0/drafts/{draftId}

Delete a draft

Delete a draft. Its author may; a draft waiting for approval may also be deleted by an owner or admin, a member may delete an agent's draft that is not yet submitted, and any org key may delete an agent's draft. Its attachments are deleted too. Answers 204.

Auth: API key: Authorization: Bearer mc_live_…

From the console: DELETE /v0/orgs/{orgId}/drafts/{draftId}, with a console sign-in token.

Parameters

NameTypeRequiredNotes
draftId (path)stringyes

Responses

  • 204 — The draft was deleted.
  • 400 — BadRequest — Malformed request. The body is not valid JSON, or is empty while its Content-Type says JSON. — application/problem+json: ProblemDetails
  • 401 — Unauthorized — The Authorization header is missing, or its API key or sign-in token is not valid. — application/problem+json: ProblemDetails
  • 403 — Not allowed. Only a draft's author edits or deletes it while it is open; only an owner or admin approves, edits or rejects one waiting for approval; or the member's role is too low, or the organization is suspended. — application/problem+json: ProblemDetails
  • 404 — NotFound — Not found. An id in the path is unknown, of the wrong kind, in another organization or deleted; on a /v0/orgs/{orgId}/… path, also an organization the caller is not a member of. — application/problem+json: ProblemDetails
  • 409 — The draft changed. The version given is not its current one, or it is no longer open to this (already sent, rejected or waiting for a person); read it again. — application/problem+json: ProblemDetails

POST POST /v0/drafts/{draftId}/send

Send draft

Send a draft through the same path as a direct send, once: give the version you read and an Idempotency-Key. An owner's or admin's send approves a waiting draft. An API key or a member on an inbox that requires approval submits it instead (202 pending_approval); a member sending someone else's waiting draft gets 403. Sending answers 503 while sending is not yet available. A draft sends once whatever the Idempotency-Key: the same caller sending an already-sent draft again at the same version, even with a new key, gets 202 with the original message and no second mail; anyone else gets 409.

Auth: API key: Authorization: Bearer mc_live_…

From the console: POST /v0/orgs/{orgId}/drafts/{draftId}/send, with a console sign-in token.

Parameters

NameTypeRequiredNotes
draftId (path)stringyes
Idempotency-Key (header)stringyesRequired, but a draft sends once whatever its value: the draft itself makes the send idempotent; 1 to 255 characters

Request body application/json

FieldTypeRequiredNotes
versionintegeryesat least 1

Responses

  • 202 — Accepted. The draft's message is queued: {id, threadId, status: "queued", recipients}. Or, for an API key or a member on an inbox that requires approval, the draft is submitted for an owner or admin: {status: "pending_approval", draftId}. A draft sends once: the same caller repeating the send at the same version gets the same answer. — application/json: {id, threadId, status, recipients} | {status, draftId}
  • 400 — IdempotencyKeyMissing — Idempotency-Key missing. The Idempotency-Key header is missing, empty or over 255 characters, or (a send or a reply) starts with the reserved "draft:"; or the body is not valid JSON. — application/problem+json: ProblemDetails
  • 401 — Unauthorized — The Authorization header is missing, or its API key or sign-in token is not valid. — application/problem+json: ProblemDetails
  • 402 — PaymentRequired — Out of messages. The organization has used its messages; sending resumes after a top-up or the monthly refill. — application/problem+json: ProblemDetails
  • 403 — Not allowed. Only a draft's author edits or deletes it while it is open; only an owner or admin approves, edits or rejects one waiting for approval; or the member's role is too low, or the organization is suspended. — application/problem+json: ProblemDetails
  • 404 — NotFound — Not found. An id in the path is unknown, of the wrong kind, in another organization or deleted; on a /v0/orgs/{orgId}/… path, also an organization the caller is not a member of. — application/problem+json: ProblemDetails
  • 409 — The draft changed or was sent. The version given is not its current one, it was already sent by another caller or rejected, or the message it replies to is gone. — application/problem+json: ProblemDetails
  • 413 — PayloadTooLarge — Body too large. The request body is over the operation's limit (for a send, the organization's message size limit). — application/problem+json: ProblemDetails
  • 415 — UnsupportedMediaType — Not JSON. The body's Content-Type is not one the operation reads: send application/json. — application/problem+json: ProblemDetails
  • 422 — ValidationFailed — Invalid request. A field is missing, unknown, of the wrong type or out of range, or the request breaks one of the operation's rules; the detail says which. — application/problem+json: ProblemDetails
  • 429 — TooManyRequests — The organization's sending limit was reached. Wait the number of seconds in the Retry-After header before sending again. — application/problem+json: ProblemDetails — Headers: Retry-After (integer): Seconds to wait before sending again. X-RateLimit-Limit (integer): The limit of the window that was reached, in messages. X-RateLimit-Remaining (integer): Messages left in that window: 0. X-RateLimit-Reset (integer): Seconds until that window has room again; the same as Retry-After.
  • 503 — ServiceUnavailable — Unavailable just now. Sign-in could not be checked or is not configured, or a service the operation needs is not available; try again shortly. — application/problem+json: ProblemDetails

POST POST /v0/inboxes/{inboxId}/drafts

Create draft

Save a draft in this inbox. Its body takes the send body's fields, all optional, replyTo and headers, plus replyToMessageId for a reply. An API key's draft is visible to the whole organization; a person's only to them while it is open (owners and admins also see it once submitted). Answers 201 with the draft.

Auth: API key: Authorization: Bearer mc_live_…

From the console: POST /v0/orgs/{orgId}/inboxes/{inboxId}/drafts, with a console sign-in token.

Parameters

NameTypeRequiredNotes
inboxId (path)stringyes

Request body application/json

FieldTypeRequiredNotes
tostring[]noat most 50 items
ccstring[]noat most 50 items
bccstring[]noat most 50 items
subjectstringnoat most 998 characters; matches ^[^\r\n]*$
textstringno
htmlstringno
attachments{filename, contentType, contentBase64}[]noat most 100 items
attachments[].filenamestringyes1 to 255 characters; matches ^[^\r\n]*$
attachments[].contentTypestringyesat most 255 characters; matches ^[A-Za-z0-9!#$&^_.+-]+/[A-Za-z0-9!#$&^_.+-]+$
attachments[].contentBase64stringyes
replyTostring[]no1 to 5 addresses that replies should go to. They are not recipients
headersobjectnoUp to 20 custom headers; each name starts with X-. X-SES-*, X-MailCraft-* and X-Mailer are refused. Each value is 1 to 997 printable ASCII characters with at least one non-space; names and values total at most 8 KiB
replyToMessageIdstringno

Responses

  • 201 — The draft. — application/json
    Response fields
    FieldTypeRequiredNotes
    idstringyes
    inboxIdstringyes
    inboxAddressstringyes
    fromAddressstringyesThe address a send of this draft goes from: for a reply, the inbox address the original used; otherwise the inbox's address
    channelstringyes
    status"open" | "sent" | "rejected"yes
    authorKind"agent" | "person"yes
    authorNamestring | nullyes
    tostring[]yes
    ccstring[]yes
    bccstring[]yes
    subjectstring | nullyes
    replyTostring[] | nullyes
    headersobject | nullyes
    submittedAtstring (date-time) | nullyesWhen it was submitted for approval; null while it is not
    versionintegeryesGive it back to update, send or reject the draft
    createdAtstring (date-time)yes
    updatedAtstring (date-time)yes
    replyToMessageIdstring | nullyes
    createdAsReplybooleanyes
    textstring | nullyes
    htmlstring | nullyes
    attachments{id, filename, contentType, size}[]yes
    attachments[].idstringyes
    attachments[].filenamestringyes
    attachments[].contentTypestringyes
    attachments[].sizeintegeryesBytes
    authorApiKeyIdstring | nullyesThe API key that wrote it (key_…)
    authorUserIdstring | nullyesThe member who wrote it (usr_…)
    editedByReviewerbooleanyes
    reviewNotestring | nullyes
    reviewedBystring | nullyesThe member who approved or rejected it (usr_…)
    reviewedAtstring (date-time) | nullyes
    messageIdstring | nullyesThe sent message's id, once sent
    closedAtstring (date-time) | nullyes
  • 400 — BadRequest — Malformed request. The body is not valid JSON, or is empty while its Content-Type says JSON. — application/problem+json: ProblemDetails
  • 401 — Unauthorized — The Authorization header is missing, or its API key or sign-in token is not valid. — application/problem+json: ProblemDetails
  • 403 — Forbidden — The credential is valid but may not do this: its organization is suspended, or (a sign-in token) the member's role in the organization is too low for the operation. — application/problem+json: ProblemDetails
  • 404 — NotFound — Not found. An id in the path is unknown, of the wrong kind, in another organization or deleted; on a /v0/orgs/{orgId}/… path, also an organization the caller is not a member of. — application/problem+json: ProblemDetails
  • 413 — PayloadTooLarge — Body too large. The request body is over the operation's limit (for a send, the organization's message size limit). — application/problem+json: ProblemDetails
  • 415 — UnsupportedMediaType — Not JSON. The body's Content-Type is not one the operation reads: send application/json. — application/problem+json: ProblemDetails
  • 422 — ValidationFailed — Invalid request. A field is missing, unknown, of the wrong type or out of range, or the request breaks one of the operation's rules; the detail says which. — application/problem+json: ProblemDetails
  • 503 — ServiceUnavailable — Unavailable just now. Sign-in could not be checked or is not configured, or a service the operation needs is not available; try again shortly. — application/problem+json: ProblemDetails

GET GET /v0/orgs/{orgId}/drafts/{draftId}/attachments/{attachmentId}

Draft attachment

Download one of a draft's attachments. Sign-in token only: the API-key family has no route for this.

Auth: Console sign-in token (the console uses this; API keys are not accepted)

Parameters

NameTypeRequiredNotes
orgId (path)stringyes
draftId (path)stringyes
attachmentId (path)stringyes

Responses

  • 200 — The attachment, with its stored content type. — */*: string (binary)
  • 401 — Unauthorized — The Authorization header is missing, or its API key or sign-in token is not valid. — application/problem+json: ProblemDetails
  • 404 — NotFound — Not found. An id in the path is unknown, of the wrong kind, in another organization or deleted; on a /v0/orgs/{orgId}/… path, also an organization the caller is not a member of. — application/problem+json: ProblemDetails
  • 503 — ServiceUnavailable — Unavailable just now. Sign-in could not be checked or is not configured, or a service the operation needs is not available; try again shortly. — application/problem+json: ProblemDetails

POST POST /v0/orgs/{orgId}/drafts/{draftId}/reject

Reject draft

Reject a draft that waits for approval, with an optional note the author reads. Only an owner or admin can. Final: the author writes a new draft.

Auth: Console sign-in token (the console uses this; API keys are not accepted)

Parameters

NameTypeRequiredNotes
orgId (path)stringyes
draftId (path)stringyes

Request body application/json

FieldTypeRequiredNotes
versionintegeryesat least 1
notestringnoat most 2000 characters

Responses

  • 200 — The rejected draft. — application/json
    Response fields
    FieldTypeRequiredNotes
    idstringyes
    inboxIdstringyes
    inboxAddressstringyes
    fromAddressstringyesThe address a send of this draft goes from: for a reply, the inbox address the original used; otherwise the inbox's address
    channelstringyes
    status"open" | "sent" | "rejected"yes
    authorKind"agent" | "person"yes
    authorNamestring | nullyes
    tostring[]yes
    ccstring[]yes
    bccstring[]yes
    subjectstring | nullyes
    replyTostring[] | nullyes
    headersobject | nullyes
    submittedAtstring (date-time) | nullyesWhen it was submitted for approval; null while it is not
    versionintegeryesGive it back to update, send or reject the draft
    createdAtstring (date-time)yes
    updatedAtstring (date-time)yes
    replyToMessageIdstring | nullyes
    createdAsReplybooleanyes
    textstring | nullyes
    htmlstring | nullyes
    attachments{id, filename, contentType, size}[]yes
    attachments[].idstringyes
    attachments[].filenamestringyes
    attachments[].contentTypestringyes
    attachments[].sizeintegeryesBytes
    authorApiKeyIdstring | nullyesThe API key that wrote it (key_…)
    authorUserIdstring | nullyesThe member who wrote it (usr_…)
    editedByReviewerbooleanyes
    reviewNotestring | nullyes
    reviewedBystring | nullyesThe member who approved or rejected it (usr_…)
    reviewedAtstring (date-time) | nullyes
    messageIdstring | nullyesThe sent message's id, once sent
    closedAtstring (date-time) | nullyes
  • 400 — BadRequest — Malformed request. The body is not valid JSON, or is empty while its Content-Type says JSON. — application/problem+json: ProblemDetails
  • 401 — Unauthorized — The Authorization header is missing, or its API key or sign-in token is not valid. — application/problem+json: ProblemDetails
  • 403 — Not allowed. Only a draft's author edits or deletes it while it is open; only an owner or admin approves, edits or rejects one waiting for approval; or the member's role is too low, or the organization is suspended. — application/problem+json: ProblemDetails
  • 404 — NotFound — Not found. An id in the path is unknown, of the wrong kind, in another organization or deleted; on a /v0/orgs/{orgId}/… path, also an organization the caller is not a member of. — application/problem+json: ProblemDetails
  • 409 — The draft changed. The version given is not its current one, or it is no longer open to this (already sent, rejected or waiting for a person); read it again. — application/problem+json: ProblemDetails
  • 413 — PayloadTooLarge — Body too large. The request body is over the operation's limit (for a send, the organization's message size limit). — application/problem+json: ProblemDetails
  • 415 — UnsupportedMediaType — Not JSON. The body's Content-Type is not one the operation reads: send application/json. — application/problem+json: ProblemDetails
  • 422 — ValidationFailed — Invalid request. A field is missing, unknown, of the wrong type or out of range, or the request breaks one of the operation's rules; the detail says which. — application/problem+json: ProblemDetails
  • 503 — ServiceUnavailable — Unavailable just now. Sign-in could not be checked or is not configured, or a service the operation needs is not available; try again shortly. — application/problem+json: ProblemDetails

POST POST /v0/orgs/{orgId}/drafts/{draftId}/view

Draft view link

A short-lived link to a draft's HTML, served like a message's formatted view. Answers 409 when the draft has no HTML version. Sign-in token only.

Auth: Console sign-in token (the console uses this; API keys are not accepted)

Parameters

NameTypeRequiredNotes
orgId (path)stringyes
draftId (path)stringyes

Request body application/json

FieldTypeRequiredNotes
remoteImagesbooleanyes

Responses

  • 200 — A signed link to the formatted view, valid for 300 seconds. — application/json
    Response fields
    FieldTypeRequiredNotes
    urlstringyes
    expiresAtstring (date-time)yes
    blockedRedirectstring | nullyesThe redirect the served copy blocked (a meta refresh's URL), or null
  • 400 — BadRequest — Malformed request. The body is not valid JSON, or is empty while its Content-Type says JSON. — application/problem+json: ProblemDetails
  • 401 — Unauthorized — The Authorization header is missing, or its API key or sign-in token is not valid. — application/problem+json: ProblemDetails
  • 404 — NotFound — Not found. An id in the path is unknown, of the wrong kind, in another organization or deleted; on a /v0/orgs/{orgId}/… path, also an organization the caller is not a member of. — application/problem+json: ProblemDetails
  • 409 — Conflict — Conflict. The request clashes with the current state of what it names; the detail says how. — application/problem+json: ProblemDetails
  • 413 — PayloadTooLarge — Body too large. The request body is over the operation's limit (for a send, the organization's message size limit). — application/problem+json: ProblemDetails
  • 415 — UnsupportedMediaType — Not JSON. The body's Content-Type is not one the operation reads: send application/json. — application/problem+json: ProblemDetails
  • 422 — ValidationFailed — Invalid request. A field is missing, unknown, of the wrong type or out of range, or the request breaks one of the operation's rules; the detail says which. — application/problem+json: ProblemDetails
  • 503 — ServiceUnavailable — Unavailable just now. Sign-in could not be checked or is not configured, or a service the operation needs is not available; try again shortly. — application/problem+json: ProblemDetails

Events

GET GET /v0/events

Read events

The org's event feed, in feed order. since should be a nextCursor from this feed, or an event id read from this feed; a webhook's evt_ id is not covered by the settling delay and may skip a late-committing event. Ignore event types you don't recognise: new ones (most recently draft.submitted, draft.sent and draft.rejected) are added without a version change.

Auth: API key: Authorization: Bearer mc_live_…

From the console: GET /v0/orgs/{orgId}/events, with a console sign-in token.

Parameters

NameTypeRequiredNotes
limit (query)integerno1 to 100; default 25
order (query)"asc" | "desc"no
since (query)stringno
before (query)stringno

Responses

  • 200 — A page of events. — application/json
    Response fields
    FieldTypeRequiredNotes
    data{id, type, created_at, createdAt, data}[]yes
    data[].idstringyesevt_…
    data[].typestringyes
    data[].created_atstring (date-time)yesDeprecated; removed on or after 2026-12-21; use createdAt (the same value)
    data[].createdAtstring (date-time)yesWhen the event happened
    data[].dataanyyesThe event's payload, as the webhook carries it
    nextCursorstring | nullyesThe next page's cursor; null on the last page
  • 400 — since with order=desc, or before with order=asc; or since or before names no event in this organization's feed (read again without it). — application/problem+json: ProblemDetails
  • 401 — Unauthorized — The Authorization header is missing, or its API key or sign-in token is not valid. — application/problem+json: ProblemDetails
  • 403 — Forbidden — The credential is valid but may not do this: its organization is suspended, or (a sign-in token) the member's role in the organization is too low for the operation. — application/problem+json: ProblemDetails
  • 422 — The query string failed schema validation. — application/problem+json: ProblemDetails

Webhooks

GET GET /v0/event-types

Event types

Lists the event types a webhook endpoint can subscribe to. Sign-in token only.

Auth: Console sign-in token (the console uses this; API keys are not accepted)

Responses

  • 200 — The event types a webhook endpoint can subscribe to. — application/json
    Response fields
    FieldTypeRequiredNotes
    datastring[]yes
  • 401 — Unauthorized — The Authorization header is missing, or its API key or sign-in token is not valid. — application/problem+json: ProblemDetails
  • 503 — ServiceUnavailable — Unavailable just now. Sign-in could not be checked or is not configured, or a service the operation needs is not available; try again shortly. — application/problem+json: ProblemDetails

GET GET /v0/orgs/{orgId}/webhooks

List webhooks

Lists the organization's webhook endpoints. Sign-in token only.

Auth: Console sign-in token (the console uses this; API keys are not accepted)

Parameters

NameTypeRequiredNotes
orgId (path)stringyes

Responses

  • 200 — The organization's webhook endpoints. — application/json
    Response fields
    FieldTypeRequiredNotes
    data{id, url, eventTypes, enabled, createdAt}[]yes
    data[].idstringyeswhk_…
    data[].urlstringyes
    data[].eventTypesstring[]yesEmpty: every event type
    data[].enabledbooleanyes
    data[].createdAtstring (date-time)yes
  • 401 — Unauthorized — The Authorization header is missing, or its API key or sign-in token is not valid. — application/problem+json: ProblemDetails
  • 404 — NotFound — Not found. An id in the path is unknown, of the wrong kind, in another organization or deleted; on a /v0/orgs/{orgId}/… path, also an organization the caller is not a member of. — application/problem+json: ProblemDetails
  • 503 — ServiceUnavailable — Unavailable just now. Sign-in could not be checked or is not configured, or a service the operation needs is not available; try again shortly. — application/problem+json: ProblemDetails

POST POST /v0/orgs/{orgId}/webhooks

Create webhook

Registers a URL to receive events, optionally limited to some event types. The signing secret is returned only here and by rotate-secret. Answers 201; 409 at the per-organization endpoint limit; 422 for an unknown event type or a URL that is refused. Needs the member role or above. Sign-in token only.

Auth: Console sign-in token (the console uses this; API keys are not accepted)

Parameters

NameTypeRequiredNotes
orgId (path)stringyes

Request body application/json

FieldTypeRequiredNotes
urlstringyes1 to 2048 characters
eventTypesstring[]noat most 50 items

Responses

  • 201 — The new endpoint, with its signing secret shown this once. — application/json
    Response fields
    FieldTypeRequiredNotes
    idstringyeswhk_…
    urlstringyes
    eventTypesstring[]yesEmpty: every event type
    enabledbooleanyes
    createdAtstring (date-time)yes
    secretstringyesThe signing secret. Shown only here and by rotate-secret
  • 400 — BadRequest — Malformed request. The body is not valid JSON, or is empty while its Content-Type says JSON. — application/problem+json: ProblemDetails
  • 401 — Unauthorized — The Authorization header is missing, or its API key or sign-in token is not valid. — application/problem+json: ProblemDetails
  • 403 — Forbidden — The credential is valid but may not do this: its organization is suspended, or (a sign-in token) the member's role in the organization is too low for the operation. — application/problem+json: ProblemDetails
  • 404 — NotFound — Not found. An id in the path is unknown, of the wrong kind, in another organization or deleted; on a /v0/orgs/{orgId}/… path, also an organization the caller is not a member of. — application/problem+json: ProblemDetails
  • 409 — Conflict — Conflict. The request clashes with the current state of what it names; the detail says how. — application/problem+json: ProblemDetails
  • 413 — PayloadTooLarge — Body too large. The request body is over the operation's limit (for a send, the organization's message size limit). — application/problem+json: ProblemDetails
  • 415 — UnsupportedMediaType — Not JSON. The body's Content-Type is not one the operation reads: send application/json. — application/problem+json: ProblemDetails
  • 422 — ValidationFailed — Invalid request. A field is missing, unknown, of the wrong type or out of range, or the request breaks one of the operation's rules; the detail says which. — application/problem+json: ProblemDetails
  • 503 — ServiceUnavailable — Unavailable just now. Sign-in could not be checked or is not configured, or a service the operation needs is not available; try again shortly. — application/problem+json: ProblemDetails

PATCH PATCH /v0/orgs/{orgId}/webhooks/{endpointId}

Update webhook

Changes an endpoint's URL, event types or enabled flag. A new or re-enabled URL gets the same check as a new endpoint. Needs the member role or above. Sign-in token only.

Auth: Console sign-in token (the console uses this; API keys are not accepted)

Parameters

NameTypeRequiredNotes
orgId (path)stringyes
endpointId (path)stringyes

Request body application/json

FieldTypeRequiredNotes
urlstringno1 to 2048 characters
eventTypesstring[]noat most 50 items
enabledbooleanno

Responses

  • 200 — The endpoint. — application/json
    Response fields
    FieldTypeRequiredNotes
    idstringyeswhk_…
    urlstringyes
    eventTypesstring[]yesEmpty: every event type
    enabledbooleanyes
    createdAtstring (date-time)yes
  • 400 — BadRequest — Malformed request. The body is not valid JSON, or is empty while its Content-Type says JSON. — application/problem+json: ProblemDetails
  • 401 — Unauthorized — The Authorization header is missing, or its API key or sign-in token is not valid. — application/problem+json: ProblemDetails
  • 403 — Forbidden — The credential is valid but may not do this: its organization is suspended, or (a sign-in token) the member's role in the organization is too low for the operation. — application/problem+json: ProblemDetails
  • 404 — NotFound — Not found. An id in the path is unknown, of the wrong kind, in another organization or deleted; on a /v0/orgs/{orgId}/… path, also an organization the caller is not a member of. — application/problem+json: ProblemDetails
  • 413 — PayloadTooLarge — Body too large. The request body is over the operation's limit (for a send, the organization's message size limit). — application/problem+json: ProblemDetails
  • 415 — UnsupportedMediaType — Not JSON. The body's Content-Type is not one the operation reads: send application/json. — application/problem+json: ProblemDetails
  • 422 — ValidationFailed — Invalid request. A field is missing, unknown, of the wrong type or out of range, or the request breaks one of the operation's rules; the detail says which. — application/problem+json: ProblemDetails
  • 503 — ServiceUnavailable — Unavailable just now. Sign-in could not be checked or is not configured, or a service the operation needs is not available; try again shortly. — application/problem+json: ProblemDetails

DELETE DELETE /v0/orgs/{orgId}/webhooks/{endpointId}

Delete webhook

Deletes the endpoint. Answers 204, or 404 if there is no such endpoint. Needs the member role or above. Sign-in token only.

Auth: Console sign-in token (the console uses this; API keys are not accepted)

Parameters

NameTypeRequiredNotes
orgId (path)stringyes
endpointId (path)stringyes

Responses

  • 204 — The endpoint was deleted.
  • 400 — BadRequest — Malformed request. The body is not valid JSON, or is empty while its Content-Type says JSON. — application/problem+json: ProblemDetails
  • 401 — Unauthorized — The Authorization header is missing, or its API key or sign-in token is not valid. — application/problem+json: ProblemDetails
  • 403 — Forbidden — The credential is valid but may not do this: its organization is suspended, or (a sign-in token) the member's role in the organization is too low for the operation. — application/problem+json: ProblemDetails
  • 404 — NotFound — Not found. An id in the path is unknown, of the wrong kind, in another organization or deleted; on a /v0/orgs/{orgId}/… path, also an organization the caller is not a member of. — application/problem+json: ProblemDetails
  • 503 — ServiceUnavailable — Unavailable just now. Sign-in could not be checked or is not configured, or a service the operation needs is not available; try again shortly. — application/problem+json: ProblemDetails

GET GET /v0/orgs/{orgId}/webhooks/{endpointId}/deliveries

Webhook deliveries

Pages through an endpoint's delivery attempts. Pass the nextCursor of a page as cursor to read the next. Sign-in token only.

Auth: Console sign-in token (the console uses this; API keys are not accepted)

Parameters

NameTypeRequiredNotes
limit (query)integerno1 to 100; default 25
cursor (query)stringno
orgId (path)stringyes
endpointId (path)stringyes

Responses

  • 200 — A page of delivery attempts, newest first. — application/json
    Response fields
    FieldTypeRequiredNotes
    data{id, eventId, eventType, state, held, statusCode, error, attempt, nextRetryAt, deliveredAt, createdAt}[]yes
    data[].idstringyesdlv_…
    data[].eventIdstringyesThe event's id (evt_…), as in the webhook body
    data[].eventTypestringyes
    data[].state"delivered" | "pending" | "retrying" | "held" | "failed"yes
    data[].heldbooleanyesThe same as state "held"
    data[].statusCodeinteger | nullyes
    data[].errorstring | nullyes
    data[].attemptintegeryes
    data[].nextRetryAtstring (date-time) | nullyesnull when held or when no retry is scheduled
    data[].deliveredAtstring (date-time) | nullyes
    data[].createdAtstring (date-time)yes
    nextCursorstring | nullyesThe next page's cursor; null on the last page
  • 400 — InvalidCursor — Invalid cursor. This cursor isn't valid for this list. Read again without it. — application/problem+json: ProblemDetails
  • 401 — Unauthorized — The Authorization header is missing, or its API key or sign-in token is not valid. — application/problem+json: ProblemDetails
  • 404 — NotFound — Not found. An id in the path is unknown, of the wrong kind, in another organization or deleted; on a /v0/orgs/{orgId}/… path, also an organization the caller is not a member of. — application/problem+json: ProblemDetails
  • 422 — ValidationFailed — Invalid request. A field is missing, unknown, of the wrong type or out of range, or the request breaks one of the operation's rules; the detail says which. — application/problem+json: ProblemDetails
  • 503 — ServiceUnavailable — Unavailable just now. Sign-in could not be checked or is not configured, or a service the operation needs is not available; try again shortly. — application/problem+json: ProblemDetails

POST POST /v0/orgs/{orgId}/webhooks/{endpointId}/rotate-secret

Rotate secret

Issues a new signing secret for the endpoint and returns it; this is the only time it is shown. Needs the member role or above. Sign-in token only.

Auth: Console sign-in token (the console uses this; API keys are not accepted)

Parameters

NameTypeRequiredNotes
orgId (path)stringyes
endpointId (path)stringyes

Responses

  • 200 — The new signing secret. — application/json
    Response fields
    FieldTypeRequiredNotes
    secretstringyes
  • 400 — BadRequest — Malformed request. The body is not valid JSON, or is empty while its Content-Type says JSON. — application/problem+json: ProblemDetails
  • 401 — Unauthorized — The Authorization header is missing, or its API key or sign-in token is not valid. — application/problem+json: ProblemDetails
  • 403 — Forbidden — The credential is valid but may not do this: its organization is suspended, or (a sign-in token) the member's role in the organization is too low for the operation. — application/problem+json: ProblemDetails
  • 404 — NotFound — Not found. An id in the path is unknown, of the wrong kind, in another organization or deleted; on a /v0/orgs/{orgId}/… path, also an organization the caller is not a member of. — application/problem+json: ProblemDetails
  • 503 — ServiceUnavailable — Unavailable just now. Sign-in could not be checked or is not configured, or a service the operation needs is not available; try again shortly. — application/problem+json: ProblemDetails

Suppressions

GET GET /v0/suppressions

List suppressions

Addresses this organization will not send to, newest first.

Auth: API key: Authorization: Bearer mc_live_…

From the console: GET /v0/orgs/{orgId}/suppressions, with a console sign-in token.

Parameters

NameTypeRequiredNotes
limit (query)integerno1 to 100; default 25
cursor (query)stringno
search (query)stringno1 to 254 characters

Responses

  • 200 — A page of suppressions. — application/json
    Response fields
    FieldTypeRequiredNotes
    data{address, reason, source, messageId, createdAt}[]yes
    data[].addressstringyes
    data[].reason"hard_bounce" | "complaint" | "manual"yes
    data[].source"ses" | "api"yes
    data[].messageIdstring | nullyesThe message whose bounce or complaint caused it
    data[].createdAtstring (date-time)yes
    nextCursorstring | nullyesThe next page's cursor; null on the last page
  • 400 — InvalidCursor — Invalid cursor. This cursor isn't valid for this list. Read again without it. — application/problem+json: ProblemDetails
  • 401 — Unauthorized — The Authorization header is missing, or its API key or sign-in token is not valid. — application/problem+json: ProblemDetails
  • 403 — Forbidden — The credential is valid but may not do this: its organization is suspended, or (a sign-in token) the member's role in the organization is too low for the operation. — application/problem+json: ProblemDetails
  • 422 — The query string failed schema validation. — application/problem+json: ProblemDetails

DELETE DELETE /v0/suppressions

Remove suppression

Remove an address from the suppression list. A complaint can be removed only by an organization admin, in the console.

Auth: API key: Authorization: Bearer mc_live_…

From the console: DELETE /v0/orgs/{orgId}/suppressions, with a console sign-in token.

Parameters

NameTypeRequiredNotes
address (query)stringyesThe suppressed address, in any case; 3 to 254 characters

Responses

  • 204 — The address was removed.
  • 400 — BadRequest — Malformed request. The body is not valid JSON, or is empty while its Content-Type says JSON. — application/problem+json: ProblemDetails
  • 401 — Unauthorized — The Authorization header is missing, or its API key or sign-in token is not valid. — application/problem+json: ProblemDetails
  • 403 — Forbidden — The credential is valid but may not do this: its organization is suspended, or (a sign-in token) the member's role in the organization is too low for the operation. — application/problem+json: ProblemDetails
  • 404 — No such suppression: the address is not suppressed in this organization (or, at /v0/orgs/{orgId}/…, no such organization). — application/problem+json: ProblemDetails
  • 422 — The query string failed schema validation. — application/problem+json: ProblemDetails

Organizations

POST POST /v0/orgs

Create org

Creates an organization for the signed-in user and returns it with its first API key, shown once. A user may own only one organization on the free plan (409). Omit handle to have one suggested from the name. Sign-in token only.

Auth: Console sign-in token (the console uses this; API keys are not accepted)

Request body application/json

FieldTypeRequiredNotes
namestringyes1 to 200 characters
handlestringno3 to 30 lower-case letters, digits or single hyphens, starting and ending with a letter or digit; fixed once set. Omit it to have one suggested from the name; 1 to 64 characters

Responses

  • 201 — The organization (with its handle), its first API key (shown once) and where provisioning stands. — application/json
    Response fields
    FieldTypeRequiredNotes
    org{id, name, tier, provisionedAt, role, inboxDomain, handle, inboxQuota, deletionScheduledFor, addressSuffix}yes
    org.idstringyes
    org.namestringyes
    org.tierstring | nullyes
    org.provisionedAtstring (date-time) | nullyes
    org.role"owner" | "admin" | "member" | "viewer"yes
    org.inboxDomainstringyesThe domain this organization's next inbox is minted on
    org.handlestring | nullyesFixed at creation; null only for an organization made before handles existed
    org.inboxQuotaintegeryesHow many active inboxes the organization may have
    org.deletionScheduledForstring (date-time) | nullyesWhen the organization's content will be erased, while an owner's deletion request is pending; null otherwise
    org.addressSuffixstringyesHow the next inbox address ends: a dot, the handle, @ and the domain; for NT Connect's own organizations, @ and the domain
    apiKey{id, name, prefix, createdBy, createdAt, lastUsedAt, revokedAt, canDeleteInboxes, key}yes
    apiKey.idstringyeskey_…
    apiKey.namestringyes
    apiKey.prefixstringyes
    apiKey.createdBystring | nullyesThe member who created it (usr_…)
    apiKey.createdAtstring (date-time)yes
    apiKey.lastUsedAtstring (date-time) | nullyes
    apiKey.revokedAtstring (date-time) | nullyes
    apiKey.canDeleteInboxesbooleanyes
    apiKey.keystringyesThe secret. Shown only in this response
    provisioning"granted" | "pending"yes
  • 400 — BadRequest — Malformed request. The body is not valid JSON, or is empty while its Content-Type says JSON. — application/problem+json: ProblemDetails
  • 401 — Unauthorized — The Authorization header is missing, or its API key or sign-in token is not valid. — application/problem+json: ProblemDetails
  • 403 — The user belongs to a suspended organization or one being deleted, or is still on the waitlist. — application/problem+json: ProblemDetails
  • 409 — The handle is taken, or the user already owns an organization on the free plan (orgId names it). — application/json: any
  • 413 — PayloadTooLarge — Body too large. The request body is over the operation's limit (for a send, the organization's message size limit). — application/problem+json: ProblemDetails
  • 415 — UnsupportedMediaType — Not JSON. The body's Content-Type is not one the operation reads: send application/json. — application/problem+json: ProblemDetails
  • 422 — The handle has the wrong shape or uses an NT Connect name, or the name is blank. — application/problem+json: ProblemDetails
  • 503 — ServiceUnavailable — Unavailable just now. Sign-in could not be checked or is not configured, or a service the operation needs is not available; try again shortly. — application/problem+json: ProblemDetails

GET GET /v0/orgs/{orgId}

Get org

Returns the organization and the caller's role in it. Sign-in token only.

Auth: Console sign-in token (the console uses this; API keys are not accepted)

Parameters

NameTypeRequiredNotes
orgId (path)stringyes

Responses

  • 200 — The organization. — application/json
    Response fields
    FieldTypeRequiredNotes
    idstringyes
    namestringyes
    tierstring | nullyes
    provisionedAtstring (date-time) | nullyes
    role"owner" | "admin" | "member" | "viewer"yes
    inboxDomainstringyesThe domain this organization's next inbox is minted on
    handlestring | nullyesFixed at creation; null only for an organization made before handles existed
    inboxQuotaintegeryesHow many active inboxes the organization may have
    deletionScheduledForstring (date-time) | nullyesWhen the organization's content will be erased, while an owner's deletion request is pending; null otherwise
    addressSuffixstringyesHow the next inbox address ends: a dot, the handle, @ and the domain; for NT Connect's own organizations, @ and the domain
  • 401 — Unauthorized — The Authorization header is missing, or its API key or sign-in token is not valid. — application/problem+json: ProblemDetails
  • 404 — NotFound — Not found. An id in the path is unknown, of the wrong kind, in another organization or deleted; on a /v0/orgs/{orgId}/… path, also an organization the caller is not a member of. — application/problem+json: ProblemDetails
  • 503 — ServiceUnavailable — Unavailable just now. Sign-in could not be checked or is not configured, or a service the operation needs is not available; try again shortly. — application/problem+json: ProblemDetails

PATCH PATCH /v0/orgs/{orgId}

Rename org

Admin or owner. Changes the organization's name; the handle is fixed once set. Sign-in token only.

Auth: Console sign-in token (the console uses this; API keys are not accepted)

Parameters

NameTypeRequiredNotes
orgId (path)stringyes

Request body application/json

FieldTypeRequiredNotes
namestringyes1 to 200 characters

Responses

  • 200 — The renamed organization. — application/json
    Response fields
    FieldTypeRequiredNotes
    idstringyes
    namestringyes
    tierstring | nullyes
    provisionedAtstring (date-time) | nullyes
    role"owner" | "admin" | "member" | "viewer"yes
    inboxDomainstringyesThe domain this organization's next inbox is minted on
    handlestring | nullyesFixed at creation; null only for an organization made before handles existed
    inboxQuotaintegeryesHow many active inboxes the organization may have
    deletionScheduledForstring (date-time) | nullyesWhen the organization's content will be erased, while an owner's deletion request is pending; null otherwise
    addressSuffixstringyesHow the next inbox address ends: a dot, the handle, @ and the domain; for NT Connect's own organizations, @ and the domain
  • 400 — BadRequest — Malformed request. The body is not valid JSON, or is empty while its Content-Type says JSON. — application/problem+json: ProblemDetails
  • 401 — Unauthorized — The Authorization header is missing, or its API key or sign-in token is not valid. — application/problem+json: ProblemDetails
  • 403 — Forbidden — The credential is valid but may not do this: its organization is suspended, or (a sign-in token) the member's role in the organization is too low for the operation. — application/problem+json: ProblemDetails
  • 404 — NotFound — Not found. An id in the path is unknown, of the wrong kind, in another organization or deleted; on a /v0/orgs/{orgId}/… path, also an organization the caller is not a member of. — application/problem+json: ProblemDetails
  • 413 — PayloadTooLarge — Body too large. The request body is over the operation's limit (for a send, the organization's message size limit). — application/problem+json: ProblemDetails
  • 415 — UnsupportedMediaType — Not JSON. The body's Content-Type is not one the operation reads: send application/json. — application/problem+json: ProblemDetails
  • 422 — ValidationFailed — Invalid request. A field is missing, unknown, of the wrong type or out of range, or the request breaks one of the operation's rules; the detail says which. — application/problem+json: ProblemDetails
  • 503 — ServiceUnavailable — Unavailable just now. Sign-in could not be checked or is not configured, or a service the operation needs is not available; try again shortly. — application/problem+json: ProblemDetails

DELETE DELETE /v0/orgs/{orgId}

Delete org

Owner only. Starts a 7-day grace, after which the organization's content is erased; undo it any time before with POST /v0/orgs/{orgId}/undo-delete. Send the organization's exact name as confirm. Refused (409) while on a paid plan. Sign-in token only.

Auth: Console sign-in token (the console uses this; API keys are not accepted)

Parameters

NameTypeRequiredNotes
orgId (path)stringyes

Request body application/json

FieldTypeRequiredNotes
confirmstringyes

Responses

  • 200 — The deletion is scheduled; undo it before scheduledFor. — application/json
    Response fields
    FieldTypeRequiredNotes
    status"deletion_scheduled"yes
    scheduledForstring (date-time)yesWhen the content will be erased
  • 400 — BadRequest — Malformed request. The body is not valid JSON, or is empty while its Content-Type says JSON. — application/problem+json: ProblemDetails
  • 401 — Unauthorized — The Authorization header is missing, or its API key or sign-in token is not valid. — application/problem+json: ProblemDetails
  • 403 — Forbidden — The credential is valid but may not do this: its organization is suspended, or (a sign-in token) the member's role in the organization is too low for the operation. — application/problem+json: ProblemDetails
  • 404 — NotFound — Not found. An id in the path is unknown, of the wrong kind, in another organization or deleted; on a /v0/orgs/{orgId}/… path, also an organization the caller is not a member of. — application/problem+json: ProblemDetails
  • 409 — On a paid plan, NT Connect's own organization, or a deletion is already pending. — application/problem+json: ProblemDetails
  • 413 — PayloadTooLarge — Body too large. The request body is over the operation's limit (for a send, the organization's message size limit). — application/problem+json: ProblemDetails
  • 415 — UnsupportedMediaType — Not JSON. The body's Content-Type is not one the operation reads: send application/json. — application/problem+json: ProblemDetails
  • 422 — The confirm text is not the organization's exact name. — application/problem+json: ProblemDetails
  • 503 — ServiceUnavailable — Unavailable just now. Sign-in could not be checked or is not configured, or a service the operation needs is not available; try again shortly. — application/problem+json: ProblemDetails

POST POST /v0/orgs/{orgId}/owner

Transfer ownership

Owner only. Makes an existing member the owner. Answers 409 if a transfer is already in progress or the new owner already owns a free-plan organization, and 503 if the transfer could not be completed, in which case nothing changed. Sign-in token only.

Auth: Console sign-in token (the console uses this; API keys are not accepted)

Parameters

NameTypeRequiredNotes
orgId (path)stringyes

Request body application/json

FieldTypeRequiredNotes
userIdstringyes

Responses

  • 200 — Ownership moved to this user. — application/json
    Response fields
    FieldTypeRequiredNotes
    ownerUserIdstringyesusr_…
  • 400 — BadRequest — Malformed request. The body is not valid JSON, or is empty while its Content-Type says JSON. — application/problem+json: ProblemDetails
  • 401 — Unauthorized — The Authorization header is missing, or its API key or sign-in token is not valid. — application/problem+json: ProblemDetails
  • 403 — Forbidden — The credential is valid but may not do this: its organization is suspended, or (a sign-in token) the member's role in the organization is too low for the operation. — application/problem+json: ProblemDetails
  • 404 — NotFound — Not found. An id in the path is unknown, of the wrong kind, in another organization or deleted; on a /v0/orgs/{orgId}/… path, also an organization the caller is not a member of. — application/problem+json: ProblemDetails
  • 409 — Conflict — Conflict. The request clashes with the current state of what it names; the detail says how. — application/problem+json: ProblemDetails
  • 413 — PayloadTooLarge — Body too large. The request body is over the operation's limit (for a send, the organization's message size limit). — application/problem+json: ProblemDetails
  • 415 — UnsupportedMediaType — Not JSON. The body's Content-Type is not one the operation reads: send application/json. — application/problem+json: ProblemDetails
  • 422 — ValidationFailed — Invalid request. A field is missing, unknown, of the wrong type or out of range, or the request breaks one of the operation's rules; the detail says which. — application/problem+json: ProblemDetails
  • 503 — ServiceUnavailable — Unavailable just now. Sign-in could not be checked or is not configured, or a service the operation needs is not available; try again shortly. — application/problem+json: ProblemDetails

POST POST /v0/orgs/{orgId}/undo-delete

Undo deletion

Owner only. Cancels a pending deletion before the grace ends. 409 when none is pending. Sign-in token only.

Auth: Console sign-in token (the console uses this; API keys are not accepted)

Parameters

NameTypeRequiredNotes
orgId (path)stringyes

Responses

  • 200 — The organization, no longer being deleted. — application/json
    Response fields
    FieldTypeRequiredNotes
    idstringyes
    namestringyes
    tierstring | nullyes
    provisionedAtstring (date-time) | nullyes
    role"owner" | "admin" | "member" | "viewer"yes
    inboxDomainstringyesThe domain this organization's next inbox is minted on
    handlestring | nullyesFixed at creation; null only for an organization made before handles existed
    inboxQuotaintegeryesHow many active inboxes the organization may have
    deletionScheduledForstring (date-time) | nullyesWhen the organization's content will be erased, while an owner's deletion request is pending; null otherwise
    addressSuffixstringyesHow the next inbox address ends: a dot, the handle, @ and the domain; for NT Connect's own organizations, @ and the domain
  • 400 — BadRequest — Malformed request. The body is not valid JSON, or is empty while its Content-Type says JSON. — application/problem+json: ProblemDetails
  • 401 — Unauthorized — The Authorization header is missing, or its API key or sign-in token is not valid. — application/problem+json: ProblemDetails
  • 403 — Forbidden — The credential is valid but may not do this: its organization is suspended, or (a sign-in token) the member's role in the organization is too low for the operation. — application/problem+json: ProblemDetails
  • 404 — NotFound — Not found. An id in the path is unknown, of the wrong kind, in another organization or deleted; on a /v0/orgs/{orgId}/… path, also an organization the caller is not a member of. — application/problem+json: ProblemDetails
  • 409 — No deletion is pending. — application/problem+json: ProblemDetails
  • 503 — ServiceUnavailable — Unavailable just now. Sign-in could not be checked or is not configured, or a service the operation needs is not available; try again shortly. — application/problem+json: ProblemDetails

Members

POST POST /v0/invitations/accept

Accept invitation

Joins the organization an invitation token names. The signed-in user's verified email must match the invited address (403 otherwise). Sign-in token only.

Auth: Console sign-in token (the console uses this; API keys are not accepted)

Request body application/json

FieldTypeRequiredNotes
tokenstringyes1 to 200 characters

Responses

  • 200 — The organization joined, and the role in it. — application/json
    Response fields
    FieldTypeRequiredNotes
    orgIdstringyes
    role"owner" | "admin" | "member" | "viewer"yes
  • 400 — BadRequest — Malformed request. The body is not valid JSON, or is empty while its Content-Type says JSON. — application/problem+json: ProblemDetails
  • 401 — Unauthorized — The Authorization header is missing, or its API key or sign-in token is not valid. — application/problem+json: ProblemDetails
  • 403 — Not for this user. The signed-in user's email is not verified or not the invited one, the user belongs to a suspended organization or one being deleted, or the inviting organization is suspended or being deleted. — application/problem+json: ProblemDetails
  • 404 — The invitation token is not a valid open invitation. — application/problem+json: ProblemDetails
  • 413 — PayloadTooLarge — Body too large. The request body is over the operation's limit (for a send, the organization's message size limit). — application/problem+json: ProblemDetails
  • 415 — UnsupportedMediaType — Not JSON. The body's Content-Type is not one the operation reads: send application/json. — application/problem+json: ProblemDetails
  • 422 — ValidationFailed — Invalid request. A field is missing, unknown, of the wrong type or out of range, or the request breaks one of the operation's rules; the detail says which. — application/problem+json: ProblemDetails
  • 503 — ServiceUnavailable — Unavailable just now. Sign-in could not be checked or is not configured, or a service the operation needs is not available; try again shortly. — application/problem+json: ProblemDetails

GET GET /v0/orgs/{orgId}/invitations

List invitations

Admin or owner. Lists the organization's open invitations. Sign-in token only.

Auth: Console sign-in token (the console uses this; API keys are not accepted)

Parameters

NameTypeRequiredNotes
orgId (path)stringyes

Responses

  • 200 — The open invitations. — application/json
    Response fields
    FieldTypeRequiredNotes
    data{id, email, role, createdAt, expiresAt}[]yes
    data[].idstringyesinv_…
    data[].emailstringyes
    data[].role"admin" | "member" | "viewer"yes
    data[].createdAtstring (date-time)yes
    data[].expiresAtstring (date-time)yes
  • 401 — Unauthorized — The Authorization header is missing, or its API key or sign-in token is not valid. — application/problem+json: ProblemDetails
  • 403 — Forbidden — The credential is valid but may not do this: its organization is suspended, or (a sign-in token) the member's role in the organization is too low for the operation. — application/problem+json: ProblemDetails
  • 404 — NotFound — Not found. An id in the path is unknown, of the wrong kind, in another organization or deleted; on a /v0/orgs/{orgId}/… path, also an organization the caller is not a member of. — application/problem+json: ProblemDetails
  • 503 — ServiceUnavailable — Unavailable just now. Sign-in could not be checked or is not configured, or a service the operation needs is not available; try again shortly. — application/problem+json: ProblemDetails

POST POST /v0/orgs/{orgId}/invitations

Invite

Admin or owner. Creates an invitation for an email address with a role and answers 201. Answers 409 if the person is already a member. Sign-in token only.

Auth: Console sign-in token (the console uses this; API keys are not accepted)

Parameters

NameTypeRequiredNotes
orgId (path)stringyes

Request body application/json

FieldTypeRequiredNotes
emailstringyes3 to 254 characters; matches ^\s*[^@\s]+@[^@\s]+\s*$
role"admin" | "member" | "viewer"yes

Responses

  • 201 — The invitation, with its link shown this once. — application/json
    Response fields
    FieldTypeRequiredNotes
    idstringyesinv_…
    linkstringyesThe invitation link. It exists only in this response
    expiresAtstring (date-time)yes
  • 400 — BadRequest — Malformed request. The body is not valid JSON, or is empty while its Content-Type says JSON. — application/problem+json: ProblemDetails
  • 401 — Unauthorized — The Authorization header is missing, or its API key or sign-in token is not valid. — application/problem+json: ProblemDetails
  • 403 — Forbidden — The credential is valid but may not do this: its organization is suspended, or (a sign-in token) the member's role in the organization is too low for the operation. — application/problem+json: ProblemDetails
  • 404 — NotFound — Not found. An id in the path is unknown, of the wrong kind, in another organization or deleted; on a /v0/orgs/{orgId}/… path, also an organization the caller is not a member of. — application/problem+json: ProblemDetails
  • 409 — The person is already a member. — application/problem+json: ProblemDetails
  • 413 — PayloadTooLarge — Body too large. The request body is over the operation's limit (for a send, the organization's message size limit). — application/problem+json: ProblemDetails
  • 415 — UnsupportedMediaType — Not JSON. The body's Content-Type is not one the operation reads: send application/json. — application/problem+json: ProblemDetails
  • 422 — ValidationFailed — Invalid request. A field is missing, unknown, of the wrong type or out of range, or the request breaks one of the operation's rules; the detail says which. — application/problem+json: ProblemDetails
  • 503 — ServiceUnavailable — Unavailable just now. Sign-in could not be checked or is not configured, or a service the operation needs is not available; try again shortly. — application/problem+json: ProblemDetails

DELETE DELETE /v0/orgs/{orgId}/invitations/{id}

Revoke invitation

Admin or owner. Revokes an open invitation. Answers 204, or 404 if there is no such open invitation. Sign-in token only.

Auth: Console sign-in token (the console uses this; API keys are not accepted)

Parameters

NameTypeRequiredNotes
orgId (path)stringyes
id (path)stringyes

Responses

  • 204 — The invitation was revoked.
  • 400 — BadRequest — Malformed request. The body is not valid JSON, or is empty while its Content-Type says JSON. — application/problem+json: ProblemDetails
  • 401 — Unauthorized — The Authorization header is missing, or its API key or sign-in token is not valid. — application/problem+json: ProblemDetails
  • 403 — Forbidden — The credential is valid but may not do this: its organization is suspended, or (a sign-in token) the member's role in the organization is too low for the operation. — application/problem+json: ProblemDetails
  • 404 — NotFound — Not found. An id in the path is unknown, of the wrong kind, in another organization or deleted; on a /v0/orgs/{orgId}/… path, also an organization the caller is not a member of. — application/problem+json: ProblemDetails
  • 503 — ServiceUnavailable — Unavailable just now. Sign-in could not be checked or is not configured, or a service the operation needs is not available; try again shortly. — application/problem+json: ProblemDetails

GET GET /v0/orgs/{orgId}/members

List members

Lists the organization's members and their roles. Sign-in token only.

Auth: Console sign-in token (the console uses this; API keys are not accepted)

Parameters

NameTypeRequiredNotes
orgId (path)stringyes

Responses

  • 200 — The organization's members. — application/json
    Response fields
    FieldTypeRequiredNotes
    data{userId, email, name, role, createdAt}[]yes
    data[].userIdstringyesusr_…
    data[].emailstring | nullyes
    data[].namestring | nullyes
    data[].role"owner" | "admin" | "member" | "viewer"yes
    data[].createdAtstring (date-time)yes
  • 401 — Unauthorized — The Authorization header is missing, or its API key or sign-in token is not valid. — application/problem+json: ProblemDetails
  • 404 — NotFound — Not found. An id in the path is unknown, of the wrong kind, in another organization or deleted; on a /v0/orgs/{orgId}/… path, also an organization the caller is not a member of. — application/problem+json: ProblemDetails
  • 503 — ServiceUnavailable — Unavailable just now. Sign-in could not be checked or is not configured, or a service the operation needs is not available; try again shortly. — application/problem+json: ProblemDetails

PATCH PATCH /v0/orgs/{orgId}/members/{userId}

Set member role

Admin or owner. Answers 204. The owner's role changes only by an ownership transfer (409). Sign-in token only.

Auth: Console sign-in token (the console uses this; API keys are not accepted)

Parameters

NameTypeRequiredNotes
orgId (path)stringyes
userId (path)stringyes

Request body application/json

FieldTypeRequiredNotes
role"admin" | "member" | "viewer"yes

Responses

  • 204 — The role was changed.
  • 400 — BadRequest — Malformed request. The body is not valid JSON, or is empty while its Content-Type says JSON. — application/problem+json: ProblemDetails
  • 401 — Unauthorized — The Authorization header is missing, or its API key or sign-in token is not valid. — application/problem+json: ProblemDetails
  • 403 — Forbidden — The credential is valid but may not do this: its organization is suspended, or (a sign-in token) the member's role in the organization is too low for the operation. — application/problem+json: ProblemDetails
  • 404 — NotFound — Not found. An id in the path is unknown, of the wrong kind, in another organization or deleted; on a /v0/orgs/{orgId}/… path, also an organization the caller is not a member of. — application/problem+json: ProblemDetails
  • 409 — Conflict — Conflict. The request clashes with the current state of what it names; the detail says how. — application/problem+json: ProblemDetails
  • 413 — PayloadTooLarge — Body too large. The request body is over the operation's limit (for a send, the organization's message size limit). — application/problem+json: ProblemDetails
  • 415 — UnsupportedMediaType — Not JSON. The body's Content-Type is not one the operation reads: send application/json. — application/problem+json: ProblemDetails
  • 422 — ValidationFailed — Invalid request. A field is missing, unknown, of the wrong type or out of range, or the request breaks one of the operation's rules; the detail says which. — application/problem+json: ProblemDetails
  • 503 — ServiceUnavailable — Unavailable just now. Sign-in could not be checked or is not configured, or a service the operation needs is not available; try again shortly. — application/problem+json: ProblemDetails

DELETE DELETE /v0/orgs/{orgId}/members/{userId}

Remove member or leave

Removes a member; any member may remove themselves, removing someone else needs admin. Answers 204. The owner cannot be removed or leave (409). Sign-in token only.

Auth: Console sign-in token (the console uses this; API keys are not accepted)

Parameters

NameTypeRequiredNotes
orgId (path)stringyes
userId (path)stringyes

Responses

  • 204 — The member was removed.
  • 400 — BadRequest — Malformed request. The body is not valid JSON, or is empty while its Content-Type says JSON. — application/problem+json: ProblemDetails
  • 401 — Unauthorized — The Authorization header is missing, or its API key or sign-in token is not valid. — application/problem+json: ProblemDetails
  • 403 — Only an admin can remove other members; removing someone else waits while the organization is suspended; or the organization's deletion is pending. — application/problem+json: ProblemDetails
  • 404 — NotFound — Not found. An id in the path is unknown, of the wrong kind, in another organization or deleted; on a /v0/orgs/{orgId}/… path, also an organization the caller is not a member of. — application/problem+json: ProblemDetails
  • 409 — The owner cannot be removed or leave. — application/problem+json: ProblemDetails
  • 503 — ServiceUnavailable — Unavailable just now. Sign-in could not be checked or is not configured, or a service the operation needs is not available; try again shortly. — application/problem+json: ProblemDetails

API keys

GET GET /v0/orgs/{orgId}/api-keys

List API keys

Lists the organization's API keys. A key's secret is never shown again after it is created. Sign-in token only; needs the member role or above.

Auth: Console sign-in token (the console uses this; API keys are not accepted)

Parameters

NameTypeRequiredNotes
orgId (path)stringyes

Responses

  • 200 — The organization's API keys, revoked ones included. — application/json
    Response fields
    FieldTypeRequiredNotes
    data{id, name, prefix, createdBy, createdAt, lastUsedAt, revokedAt, canDeleteInboxes}[]yes
    data[].idstringyeskey_…
    data[].namestringyes
    data[].prefixstringyes
    data[].createdBystring | nullyesThe member who created it (usr_…)
    data[].createdAtstring (date-time)yes
    data[].lastUsedAtstring (date-time) | nullyes
    data[].revokedAtstring (date-time) | nullyes
    data[].canDeleteInboxesbooleanyes
  • 401 — Unauthorized — The Authorization header is missing, or its API key or sign-in token is not valid. — application/problem+json: ProblemDetails
  • 403 — Forbidden — The credential is valid but may not do this: its organization is suspended, or (a sign-in token) the member's role in the organization is too low for the operation. — application/problem+json: ProblemDetails
  • 404 — NotFound — Not found. An id in the path is unknown, of the wrong kind, in another organization or deleted; on a /v0/orgs/{orgId}/… path, also an organization the caller is not a member of. — application/problem+json: ProblemDetails
  • 503 — ServiceUnavailable — Unavailable just now. Sign-in could not be checked or is not configured, or a service the operation needs is not available; try again shortly. — application/problem+json: ProblemDetails

POST POST /v0/orgs/{orgId}/api-keys

Create API key

Creates a named API key and returns its secret in the response. This is the only time the secret is shown. Sign-in token only; needs the admin role or above.

Auth: Console sign-in token (the console uses this; API keys are not accepted)

Parameters

NameTypeRequiredNotes
orgId (path)stringyes

Request body application/json

FieldTypeRequiredNotes
namestringyes1 to 100 characters
canDeleteInboxesbooleanno

Responses

  • 201 — The key, with its secret shown this once. — application/json
    Response fields
    FieldTypeRequiredNotes
    idstringyeskey_…
    namestringyes
    prefixstringyes
    createdBystring | nullyesThe member who created it (usr_…)
    createdAtstring (date-time)yes
    lastUsedAtstring (date-time) | nullyes
    revokedAtstring (date-time) | nullyes
    canDeleteInboxesbooleanyes
    keystringyesThe secret. Shown only in this response
  • 400 — BadRequest — Malformed request. The body is not valid JSON, or is empty while its Content-Type says JSON. — application/problem+json: ProblemDetails
  • 401 — Unauthorized — The Authorization header is missing, or its API key or sign-in token is not valid. — application/problem+json: ProblemDetails
  • 403 — Forbidden — The credential is valid but may not do this: its organization is suspended, or (a sign-in token) the member's role in the organization is too low for the operation. — application/problem+json: ProblemDetails
  • 404 — NotFound — Not found. An id in the path is unknown, of the wrong kind, in another organization or deleted; on a /v0/orgs/{orgId}/… path, also an organization the caller is not a member of. — application/problem+json: ProblemDetails
  • 413 — PayloadTooLarge — Body too large. The request body is over the operation's limit (for a send, the organization's message size limit). — application/problem+json: ProblemDetails
  • 415 — UnsupportedMediaType — Not JSON. The body's Content-Type is not one the operation reads: send application/json. — application/problem+json: ProblemDetails
  • 422 — ValidationFailed — Invalid request. A field is missing, unknown, of the wrong type or out of range, or the request breaks one of the operation's rules; the detail says which. — application/problem+json: ProblemDetails
  • 503 — ServiceUnavailable — Unavailable just now. Sign-in could not be checked or is not configured, or a service the operation needs is not available; try again shortly. — application/problem+json: ProblemDetails

PATCH PATCH /v0/orgs/{orgId}/api-keys/{keyId}

Set key permissions

Allows or forbids one of the organization's API keys to delete inboxes. Answers 200 with the key; 404 when the key is not in this organization or is revoked. Sign-in token only; needs the admin role or above.

Auth: Console sign-in token (the console uses this; API keys are not accepted)

Parameters

NameTypeRequiredNotes
orgId (path)stringyes
keyId (path)stringyes

Request body application/json

FieldTypeRequiredNotes
canDeleteInboxesbooleanyes

Responses

  • 200 — The key. — application/json
    Response fields
    FieldTypeRequiredNotes
    idstringyeskey_…
    namestringyes
    prefixstringyes
    createdBystring | nullyesThe member who created it (usr_…)
    createdAtstring (date-time)yes
    lastUsedAtstring (date-time) | nullyes
    revokedAtstring (date-time) | nullyes
    canDeleteInboxesbooleanyes
  • 400 — BadRequest — Malformed request. The body is not valid JSON, or is empty while its Content-Type says JSON. — application/problem+json: ProblemDetails
  • 401 — Unauthorized — The Authorization header is missing, or its API key or sign-in token is not valid. — application/problem+json: ProblemDetails
  • 403 — Forbidden — The credential is valid but may not do this: its organization is suspended, or (a sign-in token) the member's role in the organization is too low for the operation. — application/problem+json: ProblemDetails
  • 404 — NotFound — Not found. An id in the path is unknown, of the wrong kind, in another organization or deleted; on a /v0/orgs/{orgId}/… path, also an organization the caller is not a member of. — application/problem+json: ProblemDetails
  • 413 — PayloadTooLarge — Body too large. The request body is over the operation's limit (for a send, the organization's message size limit). — application/problem+json: ProblemDetails
  • 415 — UnsupportedMediaType — Not JSON. The body's Content-Type is not one the operation reads: send application/json. — application/problem+json: ProblemDetails
  • 422 — ValidationFailed — Invalid request. A field is missing, unknown, of the wrong type or out of range, or the request breaks one of the operation's rules; the detail says which. — application/problem+json: ProblemDetails
  • 503 — ServiceUnavailable — Unavailable just now. Sign-in could not be checked or is not configured, or a service the operation needs is not available; try again shortly. — application/problem+json: ProblemDetails

DELETE DELETE /v0/orgs/{orgId}/api-keys/{keyId}

Revoke API key

Revokes one of the organization's API keys. Answers 204; 404 when the key is not in this organization. Sign-in token only; needs the admin role or above.

Auth: Console sign-in token (the console uses this; API keys are not accepted)

Parameters

NameTypeRequiredNotes
orgId (path)stringyes
keyId (path)stringyes

Responses

  • 204 — The key was revoked.
  • 400 — BadRequest — Malformed request. The body is not valid JSON, or is empty while its Content-Type says JSON. — application/problem+json: ProblemDetails
  • 401 — Unauthorized — The Authorization header is missing, or its API key or sign-in token is not valid. — application/problem+json: ProblemDetails
  • 403 — Forbidden — The credential is valid but may not do this: its organization is suspended, or (a sign-in token) the member's role in the organization is too low for the operation. — application/problem+json: ProblemDetails
  • 404 — NotFound — Not found. An id in the path is unknown, of the wrong kind, in another organization or deleted; on a /v0/orgs/{orgId}/… path, also an organization the caller is not a member of. — application/problem+json: ProblemDetails
  • 503 — ServiceUnavailable — Unavailable just now. Sign-in could not be checked or is not configured, or a service the operation needs is not available; try again shortly. — application/problem+json: ProblemDetails

Billing and usage

GET GET /v0/usage

Get usage

Our count, by UTC day and by inbox, for an inclusive range of at most 400 days. total, count and byDay[].count are messages received; sentTotal and sent are messages sent, counted once per recipient. Not Prism's billed usage: that is usage on GET /v0/orgs/{orgId}/billing.

Auth: API key: Authorization: Bearer mc_live_…

From the console: GET /v0/orgs/{orgId}/usage, with a console sign-in token.

Parameters

NameTypeRequiredNotes
from (query)string | string[]no
to (query)string | string[]no

Responses

  • 200 — Our count of received and sent mail; not the billed usage. — application/json
    Response fields
    FieldTypeRequiredNotes
    fromstringyesFirst UTC day, YYYY-MM-DD
    tostringyesLast UTC day, YYYY-MM-DD
    totalintegeryesMessages received
    sentTotalintegeryesMessages sent, one per recipient
    byDay{day, count, sent}[]yes
    byDay[].daystringyesYYYY-MM-DD
    byDay[].countintegeryesReceived
    byDay[].sentintegeryesSent, one per recipient
    byInbox{inboxId, address, deleted, count, sent}[]yes
    byInbox[].inboxIdstring | nullyesnull for mail received before usage tracking
    byInbox[].addressstring | nullyes
    byInbox[].deletedbooleanyes
    byInbox[].countintegeryes
    byInbox[].sentintegeryes
  • 400 — A bad range: from or to missing, given twice or not a real YYYY-MM-DD day; from after to; or more than 400 days. — application/problem+json: ProblemDetails
  • 401 — Unauthorized — The Authorization header is missing, or its API key or sign-in token is not valid. — application/problem+json: ProblemDetails
  • 403 — Forbidden — The credential is valid but may not do this: its organization is suspended, or (a sign-in token) the member's role in the organization is too low for the operation. — application/problem+json: ProblemDetails

GET GET /v0/orgs/{orgId}/billing

Get billing

Returns the organization's plan, mail status, lapse state and this cycle's usage. If the billing provider does not answer, the plan is null and planUnavailable is true rather than an error. Sign-in token only.

Auth: Console sign-in token (the console uses this; API keys are not accepted)

Parameters

NameTypeRequiredNotes
orgId (path)stringyes

Responses

  • 200 — The organization's plan, mail status, lapse state and usage this cycle. — application/json
    Response fields
    FieldTypeRequiredNotes
    tierstring | nullyes
    provisionedAtstring (date-time) | nullyes
    mailStatus"receiving" | "held" | "refused_no_plan" | "refused_low_balance" | "suspended"yesWhat happens to new mail now
    lapse{held, awaitingFallback, fellBack}yes
    lapse.heldbooleanyes
    lapse.awaitingFallbackbooleanyes
    lapse.fellBackbooleanyes
    plan{granted, tier, kind, paymentState, periodStart, interval} | nullyesThe billing provider's live plan; null when it did not answer
    plan.grantedbooleanyes
    plan.tierstring | nullyes
    plan.kindstring | nullyes
    plan.paymentStatestring | nullyes
    plan.periodStartstring | nullyes
    plan.interval"month" | "year" | nullyes
    planUnavailablebooleanyes
    usage{periodStart, periodEnd, allowance, credit, used, available, carriedDebt, purchasedThisCycle, received, sent} | nullyesUsage this cycle: the billed figures, with our own counts beside them; null when the provider gives none
    usage.periodStartstringyes
    usage.periodEndstringyes
    usage.allowancenumberyes
    usage.creditnumberyes
    usage.usednumberyes
    usage.availablenumberyes
    usage.carriedDebtnumberyes
    usage.purchasedThisCyclenumberyes
    usage.receivedintegeryesOur count of received mail this cycle
    usage.sentintegeryesOur count of sent mail this cycle, one per recipient
  • 401 — Unauthorized — The Authorization header is missing, or its API key or sign-in token is not valid. — application/problem+json: ProblemDetails
  • 404 — NotFound — Not found. An id in the path is unknown, of the wrong kind, in another organization or deleted; on a /v0/orgs/{orgId}/… path, also an organization the caller is not a member of. — application/problem+json: ProblemDetails
  • 503 — ServiceUnavailable — Unavailable just now. Sign-in could not be checked or is not configured, or a service the operation needs is not available; try again shortly. — application/problem+json: ProblemDetails

POST POST /v0/orgs/{orgId}/billing/checkout

Plan checkout

Owner only. Returns a url to the hosted checkout page for the chosen tier (pro or scale) and interval (month or year). Answers 409 while the organization is still being set up or another checkout is starting. Sign-in token only.

Auth: Console sign-in token (the console uses this; API keys are not accepted)

Parameters

NameTypeRequiredNotes
orgId (path)stringyes

Request body application/json

FieldTypeRequiredNotes
tier"pro" | "scale"yes
interval"month" | "year"yes

Responses

  • 200 — Where to send the browser: the hosted page. — application/json
    Response fields
    FieldTypeRequiredNotes
    urlstringyes
  • 400 — BadRequest — Malformed request. The body is not valid JSON, or is empty while its Content-Type says JSON. — application/problem+json: ProblemDetails
  • 401 — Unauthorized — The Authorization header is missing, or its API key or sign-in token is not valid. — application/problem+json: ProblemDetails
  • 403 — Forbidden — The credential is valid but may not do this: its organization is suspended, or (a sign-in token) the member's role in the organization is too low for the operation. — application/problem+json: ProblemDetails
  • 404 — NotFound — Not found. An id in the path is unknown, of the wrong kind, in another organization or deleted; on a /v0/orgs/{orgId}/… path, also an organization the caller is not a member of. — application/problem+json: ProblemDetails
  • 409 — Conflict — Conflict. The request clashes with the current state of what it names; the detail says how. — application/problem+json: ProblemDetails
  • 413 — PayloadTooLarge — Body too large. The request body is over the operation's limit (for a send, the organization's message size limit). — application/problem+json: ProblemDetails
  • 415 — UnsupportedMediaType — Not JSON. The body's Content-Type is not one the operation reads: send application/json. — application/problem+json: ProblemDetails
  • 422 — ValidationFailed — Invalid request. A field is missing, unknown, of the wrong type or out of range, or the request breaks one of the operation's rules; the detail says which. — application/problem+json: ProblemDetails
  • 503 — ServiceUnavailable — Unavailable just now. Sign-in could not be checked or is not configured, or a service the operation needs is not available; try again shortly. — application/problem+json: ProblemDetails

POST POST /v0/orgs/{orgId}/billing/portal

Billing portal

Owner only. Returns a url to the hosted page where the payment method and subscription are managed. Answers 409 when there is no billing account yet. Sign-in token only.

Auth: Console sign-in token (the console uses this; API keys are not accepted)

Parameters

NameTypeRequiredNotes
orgId (path)stringyes

Responses

  • 200 — Where to send the browser: the hosted page. — application/json
    Response fields
    FieldTypeRequiredNotes
    urlstringyes
  • 400 — BadRequest — Malformed request. The body is not valid JSON, or is empty while its Content-Type says JSON. — application/problem+json: ProblemDetails
  • 401 — Unauthorized — The Authorization header is missing, or its API key or sign-in token is not valid. — application/problem+json: ProblemDetails
  • 403 — Forbidden — The credential is valid but may not do this: its organization is suspended, or (a sign-in token) the member's role in the organization is too low for the operation. — application/problem+json: ProblemDetails
  • 404 — NotFound — Not found. An id in the path is unknown, of the wrong kind, in another organization or deleted; on a /v0/orgs/{orgId}/… path, also an organization the caller is not a member of. — application/problem+json: ProblemDetails
  • 409 — Conflict — Conflict. The request clashes with the current state of what it names; the detail says how. — application/problem+json: ProblemDetails
  • 503 — ServiceUnavailable — Unavailable just now. Sign-in could not be checked or is not configured, or a service the operation needs is not available; try again shortly. — application/problem+json: ProblemDetails

POST POST /v0/orgs/{orgId}/billing/refresh

Refresh billing

Re-reads the plan from the billing provider and returns the same body as GET /v0/orgs/{orgId}/billing. Answers 503 when billing is not configured. Sign-in token only.

Auth: Console sign-in token (the console uses this; API keys are not accepted)

Parameters

NameTypeRequiredNotes
orgId (path)stringyes

Responses

  • 200 — The organization's plan, mail status, lapse state and usage this cycle. — application/json
    Response fields
    FieldTypeRequiredNotes
    tierstring | nullyes
    provisionedAtstring (date-time) | nullyes
    mailStatus"receiving" | "held" | "refused_no_plan" | "refused_low_balance" | "suspended"yesWhat happens to new mail now
    lapse{held, awaitingFallback, fellBack}yes
    lapse.heldbooleanyes
    lapse.awaitingFallbackbooleanyes
    lapse.fellBackbooleanyes
    plan{granted, tier, kind, paymentState, periodStart, interval} | nullyesThe billing provider's live plan; null when it did not answer
    plan.grantedbooleanyes
    plan.tierstring | nullyes
    plan.kindstring | nullyes
    plan.paymentStatestring | nullyes
    plan.periodStartstring | nullyes
    plan.interval"month" | "year" | nullyes
    planUnavailablebooleanyes
    usage{periodStart, periodEnd, allowance, credit, used, available, carriedDebt, purchasedThisCycle, received, sent} | nullyesUsage this cycle: the billed figures, with our own counts beside them; null when the provider gives none
    usage.periodStartstringyes
    usage.periodEndstringyes
    usage.allowancenumberyes
    usage.creditnumberyes
    usage.usednumberyes
    usage.availablenumberyes
    usage.carriedDebtnumberyes
    usage.purchasedThisCyclenumberyes
    usage.receivedintegeryesOur count of received mail this cycle
    usage.sentintegeryesOur count of sent mail this cycle, one per recipient
  • 400 — BadRequest — Malformed request. The body is not valid JSON, or is empty while its Content-Type says JSON. — application/problem+json: ProblemDetails
  • 401 — Unauthorized — The Authorization header is missing, or its API key or sign-in token is not valid. — application/problem+json: ProblemDetails
  • 404 — NotFound — Not found. An id in the path is unknown, of the wrong kind, in another organization or deleted; on a /v0/orgs/{orgId}/… path, also an organization the caller is not a member of. — application/problem+json: ProblemDetails
  • 503 — ServiceUnavailable — Unavailable just now. Sign-in could not be checked or is not configured, or a service the operation needs is not available; try again shortly. — application/problem+json: ProblemDetails

POST POST /v0/orgs/{orgId}/billing/topup

Top-up checkout

Owner only. Returns a url to the hosted checkout page for the message pack that goes with the organization's plan. Answers 409 on a plan without packs. Sign-in token only.

Auth: Console sign-in token (the console uses this; API keys are not accepted)

Parameters

NameTypeRequiredNotes
orgId (path)stringyes

Responses

  • 200 — Where to send the browser: the hosted page. — application/json
    Response fields
    FieldTypeRequiredNotes
    urlstringyes
  • 400 — BadRequest — Malformed request. The body is not valid JSON, or is empty while its Content-Type says JSON. — application/problem+json: ProblemDetails
  • 401 — Unauthorized — The Authorization header is missing, or its API key or sign-in token is not valid. — application/problem+json: ProblemDetails
  • 403 — Forbidden — The credential is valid but may not do this: its organization is suspended, or (a sign-in token) the member's role in the organization is too low for the operation. — application/problem+json: ProblemDetails
  • 404 — NotFound — Not found. An id in the path is unknown, of the wrong kind, in another organization or deleted; on a /v0/orgs/{orgId}/… path, also an organization the caller is not a member of. — application/problem+json: ProblemDetails
  • 409 — Conflict — Conflict. The request clashes with the current state of what it names; the detail says how. — application/problem+json: ProblemDetails
  • 503 — ServiceUnavailable — Unavailable just now. Sign-in could not be checked or is not configured, or a service the operation needs is not available; try again shortly. — application/problem+json: ProblemDetails

GET GET /v0/orgs/{orgId}/lapse

Get lapse state

Shows whether the organization is in a payment lapse and where the choice of addresses to keep stands. Sign-in token only.

Auth: Console sign-in token (the console uses this; API keys are not accepted)

Parameters

NameTypeRequiredNotes
orgId (path)stringyes

Responses

  • 200 — The payment-lapse state and the inboxes it affects. — application/json
    Response fields
    FieldTypeRequiredNotes
    state"none" | "held" | "awaiting_fallback" | "fell_back"yes
    enforcementbooleanyes
    heldSincestring (date-time) | nullyes
    fallbackAtstring (date-time) | nullyes
    receivingStopsAtstring (date-time) | nullyes
    deletedAtstring (date-time) | nullyes
    deletionIsPermanentbooleanyes
    canChoosebooleanyes
    keepMode"choose" | "swap" | "restore" | nullyesHow a keep choice applies now; null when none can be made
    keepMinintegeryesThe fewest addresses a choice may name now
    keepMaxintegeryesThe most addresses a choice may name now
    freeQuotaintegeryes
    inboxes{id, address, keepChosen, lastMailAt, status, receivingStopsAt, deletedAt}[]yes
    inboxes[].idstringyes
    inboxes[].addressstringyes
    inboxes[].keepChosenbooleanyes
    inboxes[].lastMailAtstring (date-time) | nullyes
    inboxes[].status"kept" | "stops" | "stopped"yes
    inboxes[].receivingStopsAtstring (date-time) | nullyes
    inboxes[].deletedAtstring (date-time) | nullyes
  • 401 — Unauthorized — The Authorization header is missing, or its API key or sign-in token is not valid. — application/problem+json: ProblemDetails
  • 404 — NotFound — Not found. An id in the path is unknown, of the wrong kind, in another organization or deleted; on a /v0/orgs/{orgId}/… path, also an organization the caller is not a member of. — application/problem+json: ProblemDetails
  • 503 — ServiceUnavailable — Unavailable just now. Sign-in could not be checked or is not configured, or a service the operation needs is not available; try again shortly. — application/problem+json: ProblemDetails

PUT PUT /v0/orgs/{orgId}/lapse/keep

Keep inboxes

Sets which inboxes (at most 50) keep their addresses through a payment lapse. Admin or owner. Answers 409 when there is no lapse in progress, or when addresses have already stopped receiving and the choice can no longer change. Sign-in token only.

Auth: Console sign-in token (the console uses this; API keys are not accepted)

Parameters

NameTypeRequiredNotes
orgId (path)stringyes

Request body application/json

FieldTypeRequiredNotes
inboxIdsstring[]yesat most 50 items

Responses

  • 200 — The payment-lapse state and the inboxes it affects. — application/json
    Response fields
    FieldTypeRequiredNotes
    state"none" | "held" | "awaiting_fallback" | "fell_back"yes
    enforcementbooleanyes
    heldSincestring (date-time) | nullyes
    fallbackAtstring (date-time) | nullyes
    receivingStopsAtstring (date-time) | nullyes
    deletedAtstring (date-time) | nullyes
    deletionIsPermanentbooleanyes
    canChoosebooleanyes
    keepMode"choose" | "swap" | "restore" | nullyesHow a keep choice applies now; null when none can be made
    keepMinintegeryesThe fewest addresses a choice may name now
    keepMaxintegeryesThe most addresses a choice may name now
    freeQuotaintegeryes
    inboxes{id, address, keepChosen, lastMailAt, status, receivingStopsAt, deletedAt}[]yes
    inboxes[].idstringyes
    inboxes[].addressstringyes
    inboxes[].keepChosenbooleanyes
    inboxes[].lastMailAtstring (date-time) | nullyes
    inboxes[].status"kept" | "stops" | "stopped"yes
    inboxes[].receivingStopsAtstring (date-time) | nullyes
    inboxes[].deletedAtstring (date-time) | nullyes
  • 400 — BadRequest — Malformed request. The body is not valid JSON, or is empty while its Content-Type says JSON. — application/problem+json: ProblemDetails
  • 401 — Unauthorized — The Authorization header is missing, or its API key or sign-in token is not valid. — application/problem+json: ProblemDetails
  • 403 — Forbidden — The credential is valid but may not do this: its organization is suspended, or (a sign-in token) the member's role in the organization is too low for the operation. — application/problem+json: ProblemDetails
  • 404 — NotFound — Not found. An id in the path is unknown, of the wrong kind, in another organization or deleted; on a /v0/orgs/{orgId}/… path, also an organization the caller is not a member of. — application/problem+json: ProblemDetails
  • 409 — Conflict — Conflict. The request clashes with the current state of what it names; the detail says how. — application/problem+json: ProblemDetails
  • 413 — PayloadTooLarge — Body too large. The request body is over the operation's limit (for a send, the organization's message size limit). — application/problem+json: ProblemDetails
  • 415 — UnsupportedMediaType — Not JSON. The body's Content-Type is not one the operation reads: send application/json. — application/problem+json: ProblemDetails
  • 422 — ValidationFailed — Invalid request. A field is missing, unknown, of the wrong type or out of range, or the request breaks one of the operation's rules; the detail says which. — application/problem+json: ProblemDetails
  • 503 — ServiceUnavailable — Unavailable just now. Sign-in could not be checked or is not configured, or a service the operation needs is not available; try again shortly. — application/problem+json: ProblemDetails

Status

GET GET /health

Health check

Answers {"status": "ok", "version": "<api version>"} while the API is running. Needs no credential.

Auth: None

Responses

  • 200 — Running, and which api version. — application/json
    Response fields
    FieldTypeRequiredNotes
    status"ok"yes
    versionstringyes

GET GET /openapi.json

OpenAPI document

This API's OpenAPI 3.1 description, as JSON. Needs no credential.

Auth: None

Responses

  • 200 — The OpenAPI document. — application/json
    Response fields

GET GET /v0/brief

API Brief

Every operation on one line, each ending in its ref, as plain text: the API Brief's index. GET /v0/brief/{ref} has one operation in full. Needs no credential.

Auth: None

Responses

  • 200 — The index. — text/plain: string

GET GET /v0/brief/{ref}

Operation's Brief

One operation in full, as plain text: auth, parameters, body, responses, errors and an example request. The ref is the one its index line ends with, without the #. Needs no credential.

Auth: None

Parameters

NameTypeRequiredNotes
ref (path)stringyes

Responses

  • 200 — The operation's page. — text/plain: string
  • 404 — No operation has this ref. — application/problem+json: ProblemDetails

GET GET /v0/status

Service status

Each component's current state and its last 90 UTC days of checks, oldest first: how many minutes were up, degraded, down and disabled. Outbound is disabled while sending is switched off, and carries queued, the number of sends waiting. A component with no check in the last 3 minutes is unknown. Needs no credential; cached for 30 seconds.

Auth: None

Responses

  • 200 — Each component's current state and daily history. — application/json
    Response fields
    FieldTypeRequiredNotes
    generatedAtstring (date-time)yes
    components{id, name, state, queued?, days}[]yes
    components[].idstringyes
    components[].namestringyes
    components[].state"up" | "degraded" | "down" | "disabled" | "unknown"yes
    components[].queuedintegernoOutbound only: sends waiting to go out at the latest check. Absent for the other components, and when the check is not recent; at least 0
    components[].days{date, up, degraded, down, disabled}[]yes
    components[].days[].datestringyesA UTC day, YYYY-MM-DD
    components[].days[].upintegeryes
    components[].days[].degradedintegeryes
    components[].days[].downintegeryes
    components[].days[].disabledintegeryesMinutes outbound was switched off (always 0 for the other components)

Account

GET GET /v0/me

Get the user

Returns the signed-in user's profile. Answers 401 until sign-in has been completed with POST /v0/me/session.

Auth: Console sign-in token (the console uses this; API keys are not accepted)

Responses

  • 200 — The signed-in user and their organizations. — application/json
    Response fields
    FieldTypeRequiredNotes
    user{id, email, name}yes
    user.idstringyesusr_…, as in the members list
    user.emailstring | nullyes
    user.namestring | nullyes
    orgs{id, name, role, tier, handle}[]yes
    orgs[].idstringyes
    orgs[].namestringyes
    orgs[].role"owner" | "admin" | "member" | "viewer"yes
    orgs[].tierstring | nullyes
    orgs[].handlestring | nullyes
    canCreateFreeOrgbooleanyes
    canStartbooleanyesMay create an organization now
  • 401 — No valid access token, or (GET) sign-in not completed. — application/problem+json: ProblemDetails
  • 503 — Sign-in is not configured, or Zitadel could not be reached; nothing was written. — application/problem+json: ProblemDetails

POST POST /v0/me/session

Start a session

Call right after the sign-in redirect. Registers the signed-in user, taking their email from the identity provider with the caller's own token, and returns their profile. Idempotent; it never creates an organization.

Auth: Console sign-in token (the console uses this; API keys are not accepted)

Responses

  • 200 — The signed-in user and their organizations. — application/json
    Response fields
    FieldTypeRequiredNotes
    user{id, email, name}yes
    user.idstringyesusr_…, as in the members list
    user.emailstring | nullyes
    user.namestring | nullyes
    orgs{id, name, role, tier, handle}[]yes
    orgs[].idstringyes
    orgs[].namestringyes
    orgs[].role"owner" | "admin" | "member" | "viewer"yes
    orgs[].tierstring | nullyes
    orgs[].handlestring | nullyes
    canCreateFreeOrgbooleanyes
    canStartbooleanyesMay create an organization now
  • 400 — BadRequest — Malformed request. The body is not valid JSON, or is empty while its Content-Type says JSON. — application/problem+json: ProblemDetails
  • 401 — No valid access token, or (GET) sign-in not completed. — application/problem+json: ProblemDetails
  • 503 — Sign-in is not configured, or Zitadel could not be reached; nothing was written. — application/problem+json: ProblemDetails