Email log

Every email the system queued or sent, with its bodies and delivery status, for the Platform admin. See ADR 0021.

List emails

GET /v1/emails

MCP tool
list_emails read-only
Auth
Bearer token (bearerAuth)

Every email the system has queued or sent, newest first, without bodies. The Platform admin only. template, status, recipient, user_id and organisation_id narrow it, and from (inclusive) and to (exclusive) to a range of times it was queued. Emails are kept 90 days. A page can hold fewer items than limit, even none, and still have a next_cursor.

Parameters

NameInTypeRequiredDescription
cursorquerystringnoThe next_cursor from the previous page. Omit it for the first page. At least 1 character.
limitqueryintegernoThe most items to return. 1 to 100. Default 50.
templatequeryEmailTemplatenoOnly emails of this template.
statusqueryEmailStatusnoOnly emails in this status.
recipientqueryEmailnoOnly emails to this address, in any case.
user_idqueryUserIdnoOnly emails to this User's address.
organisation_idqueryOrganisationIdnoOnly emails about this Organisation.
fromqueryTimestampnoOnly emails queued at or after this time.
toqueryTimestampnoOnly emails queued before this time.

Responses

StatusDescriptionBody
200One page of emails.EmailPage
400The request is malformed or fails validation (invalid_request), or an ID has the wrong prefix for its field (invalid_id). errors names each invalid field.Problem
401No valid bearer token (unauthenticated). Header WWW-Authenticate: The bearer challenge, per RFC 6750.Problem
403The caller can see the resource, but their Role doesn't allow this operation (forbidden). The attempt is audited with result=denied.Problem

Get an email

GET /v1/emails/{email_id}

MCP tool
get_email read-only
Auth
Bearer token (bearerAuth)

One email, with its subject, HTML and text bodies as sent and its status timeline, with any error. One-time codes are masked. The Platform admin only.

Parameters

NameInTypeRequiredDescription
email_idpathEmailIdyesEmail ID.

Responses

StatusDescriptionBody
200The email.EmailDetail
400The request is malformed or fails validation (invalid_request), or an ID has the wrong prefix for its field (invalid_id). errors names each invalid field.Problem
401No valid bearer token (unauthenticated). Header WWW-Authenticate: The bearer challenge, per RFC 6750.Problem
403The caller can see the resource, but their Role doesn't allow this operation (forbidden). The attempt is audited with result=denied.Problem
404The resource doesn't exist, or the caller can't see it (not_found). The two are never told apart.Problem

Resend an email

POST /v1/emails/{email_id}/resend

MCP tool
resend_email not destructive
Auth
Bearer token (bearerAuth)

Queues the same email again, to the same address, as a new email whose resend_of names this one. The Platform admin only. An invitation is resent with a fresh code, which replaces the old one, so the old email's code stops working; once the invitation has been accepted it can't be resent (409 not_resendable). A password reset or set-password email starts a fresh reset through the user pool, as the person's own "Forgot password?" does: a new code, which replaces the old one, emailed by the pool, so email is null and the new email shows in the log a moment later; 429 rate_limited if the pool refuses another for now. Records one email.resent audit event.

Parameters

NameInTypeRequiredDescription
email_idpathEmailIdyesEmail ID.

Responses

StatusDescriptionBody
202The new email, queued, or null when the user pool sends it.EmailResent
400The request is malformed or fails validation (invalid_request), or an ID has the wrong prefix for its field (invalid_id). errors names each invalid field.Problem
401No valid bearer token (unauthenticated). Header WWW-Authenticate: The bearer challenge, per RFC 6750.Problem
403The caller can see the resource, but their Role doesn't allow this operation (forbidden). The attempt is audited with result=denied.Problem
404The resource doesn't exist, or the caller can't see it (not_found). The two are never told apart.Problem
409The change breaks a uniqueness rule or the resource's current state (conflict).Problem
429TooManyRequestsProblem

Schemas

EmailTemplate

Which email it is: added_to_organisation tells an existing User they've been added to another Organisation; invitation carries a one-time code for someone with no account yet; password_reset and set_password carry the user pool's code to reset a password, or to set one for someone who only uses Google.

Type: string. One of added_to_organisation, invitation, password_reset, set_password.

EmailStatus

Where the email has got to. queued: written with the change that caused it, not yet sent. sent: the mail service accepted it. delivered: the recipient's server accepted it. bounced: the recipient's server refused it. complained: the recipient marked it as spam. failed: it couldn't be sent. suppressed: not sent, because the address bounced or complained before.

Type: string. One of queued, sent, delivered, bounced, complained, failed, suppressed.

Email

An email address. Compared case-insensitively, and returned in lower case.

Type: string (email). At most 254 characters. Example: jason@northgate.example.

UserId

User ID.

Type: string. Exactly 18 characters. Pattern ^USR[a-z0-9]{15}$. Example: USR8hfaw8hfpwhjf94.

OrganisationId

Organisation ID.

Type: string. Exactly 18 characters. Pattern ^ORG[a-z0-9]{15}$. Example: ORG8hfaw8hfpwhjf94.

Timestamp

UTC, with milliseconds and a Z suffix.

Type: string (date-time). Pattern ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$. Example: 2026-11-28T14:27:03.412Z.

EmailPage

FieldTypeRequiredDescription
itemsarray of EmailSummaryyes
next_cursorstring | nullyesAn opaque cursor for the next page, or null on the last page.

CursorPage

One page of a list. A list response combines this with its own items through allOf. Pass next_cursor back as cursor to get the next page; it is null on the last page.

FieldTypeRequiredDescription
itemsarray of anyyes
next_cursorstring | nullyesAn opaque cursor for the next page, or null on the last page.

EmailSummary

One email in the log, without its bodies.

FieldTypeRequiredDescription
idEmailIdyesEmail ID.
templateEmailTemplateyesWhich email it is: added_to_organisation tells an existing User they've been added to another Organisation; invitation carries a one-time code for someone with no account yet; password_reset and set_password carry the user pool's code to reset a password, or to set one for someone who only uses Google.
statusEmailStatusyesWhere the email has got to. queued: written with the change that caused it, not yet sent. sent: the mail service accepted it. delivered: the recipient's server accepted it. bounced: the recipient's server refused it. complained: the recipient marked it as spam. failed: it couldn't be sent. suppressed: not sent, because the address bounced or complained before.
toEmailyesThe recipient.
user_idUserId | nullyesThe recipient's User, or null when the address has none.
organisation_idOrganisationId | nullyesThe Organisation it is about, or null for a platform-level email.
subjectstring | nullyesThe subject as sent, with any [DEV] or [STAGING] prefix. null until sent.
created_atTimestampyesUTC, with milliseconds and a Z suffix.
resend_ofEmailId | nullyesThe email this one resent, or null.

EmailId

Email ID.

Type: string. Exactly 18 characters. Pattern ^EML[a-z0-9]{15}$. Example: EML8hfaw8hfpwhjf94.

Problem

An RFC 9457 problem details object, sent as application/problem+json.

FieldTypeRequiredDescription
typestring (uri-reference)yesA URI identifying the problem type. about:blank when code says enough. Example: about:blank.
titlestringyesA short, human-readable summary of the problem type. Example: Not found.
statusintegeryesThe HTTP status code. 400 to 599. Example: 404.
codestringyesA stable, snake_case machine code. Clients branch on this, never on title. Pattern ^[a-z][a-z0-9]*(_[a-z0-9]+)*$. Examples: not_found, invalid_id.
detailstringnoA human-readable explanation of this occurrence.
instancestring (uri-reference)noThe request path that produced the problem.
request_idstringyesLinks the problem to the request logs and any audit event.
started_byUplinkSessionStarternochannel_in_use only: who started the Channel's active Uplink session.
reasonstringnosession_ended only: idle (unused past its window) or signed_out (by another session, e.g. after a password change). One of idle, signed_out.
errorsarray of ProblemFieldErrornoOne entry per invalid field, for invalid_request and invalid_id.
retry_after_secondsintegernorate_limited only: how long to wait before trying again, in seconds. At least 0.

UplinkSessionStarter

Who pressed Start.

FieldTypeRequiredDescription
user_idUserIdyesUser ID.
namestringyesHow to show them. Their email, until Users have names. Example: mike@northgate.example.

ProblemFieldError

FieldTypeRequiredDescription
pointerstringnoA JSON Pointer into the request body, e.g. /first_admin_email.
parameterstringnoThe name of the path, query or header parameter, e.g. organisation_id.
detailstringyesWhat is wrong with the field.

EmailDetail

One email, with its bodies and status timeline.

FieldTypeRequiredDescription
idEmailIdyesEmail ID.
templateEmailTemplateyesWhich email it is: added_to_organisation tells an existing User they've been added to another Organisation; invitation carries a one-time code for someone with no account yet; password_reset and set_password carry the user pool's code to reset a password, or to set one for someone who only uses Google.
statusEmailStatusyesWhere the email has got to. queued: written with the change that caused it, not yet sent. sent: the mail service accepted it. delivered: the recipient's server accepted it. bounced: the recipient's server refused it. complained: the recipient marked it as spam. failed: it couldn't be sent. suppressed: not sent, because the address bounced or complained before.
toEmailyesThe recipient.
user_idUserId | nullyesThe recipient's User, or null when the address has none.
organisation_idOrganisationId | nullyesThe Organisation it is about, or null for a platform-level email.
subjectstring | nullyesThe subject as sent, with any [DEV] or [STAGING] prefix. null until sent.
created_atTimestampyesUTC, with milliseconds and a Z suffix.
resend_ofEmailId | nullyesThe email this one resent, or null.
htmlstring | nullyesThe HTML body as sent, with any one-time code masked. null until sent, or when it never was.
textstring | nullyesThe plain-text body as sent, with any one-time code masked. null until sent, or when it never was.
timelinearray of EmailStatusChangeyesEvery status it has had, oldest first.
stageEmailStage | nullyesThe stage that sent it, which decides the subject prefix. null until sent, or when it never was.
provider_message_idstring | nullyesThe mail service's ID for the message (SES, or Mailpit locally), once sent.
cause_audit_event_idAuditEventIdyesThe audit event of the change that queued it.

EmailStatusChange

FieldTypeRequiredDescription
statusEmailStatusyesWhere the email has got to. queued: written with the change that caused it, not yet sent. sent: the mail service accepted it. delivered: the recipient's server accepted it. bounced: the recipient's server refused it. complained: the recipient marked it as spam. failed: it couldn't be sent. suppressed: not sent, because the address bounced or complained before.
atTimestampyesUTC, with milliseconds and a Z suffix.
detailstring | nullyesWhat the mail service said, e.g. why it bounced or failed. null when nothing.

EmailStage

The stage that sent it: local is a developer's environment. local and dev prefix the subject with [DEV], staging with [STAGING], and prod with nothing.

Type: string. One of local, dev, staging, prod.

AuditEventId

Audit event ID.

Type: string. Exactly 18 characters. Pattern ^EVT[a-z0-9]{15}$. Example: EVT8hfaw8hfpwhjf94.

EmailResent

What a resend queued.

FieldTypeRequiredDescription
emailEmailDetail | nullyesThe new email, queued. null for a password reset or set-password code, which the user pool sends: its new email shows in the log a moment later, to the same address.