Skip to content
Notice This app is in Beta Testing We are still testing Record Sender, so features may change.
Sign in

Messages — API reference

Reading a mailbox, sending mail, marking messages read or flagged (docs/mail.md).

← All groups
POST /api/v1/drafts

Save a draft

What the composer's **Save draft** does: `POST /api/v1/drafts` saves a new draft in the mailbox's Drafts folder (201), `PATCH /api/v1/drafts/{id}` updates that draft (200). Nothing is sent; recipients are verified for display only. Without `from` the credential's first mailbox is used.

Scope: mail:send · Idempotency-Key · messages.draft

Request body application/json
bcc [string (email)] | string
cc [string (email)] | string
from string Mailbox address or id (default: the first mailbox)
html_body string
subject string
text_body string
to [string (email)] | string
Responses 200 · 401 · 402 · 403 · 404 · 409 · 422 · 429

200 Success

message * MailMessage
fields

MailMessage

cc [string]
channel string | null
direction "inbound" | "outbound" | "internal"
flagged boolean
from_address string (email)
from_name string | null
id * string (uuid)
message_id string The RFC 5322 Message-ID
received_at string | null
scheduled_at string | null
seen boolean
sent_at string | null
snippet string The start of the text body
status string draft | queued | scheduled | sent | received | failed …
subject string | null
thread_id string | null
to [string]
verification object | null Recipient address → verification result

401 Problem details (401)

402 Problem details (402)

403 Problem details (403)

404 No such mailbox in this account, or no such draft

Problem

code * string Stable machine-readable code (snake_case)
detail string A sentence an app can show
error object | string Legacy member kept for existing clients (deprecated)
errors object Field → messages, for validation errors
instance string The request path
message string Legacy member of the mobile sign-in errors (deprecated)
request_id string
status * integer
title * string
type string (uri) A URI identifying the problem type (https://recordsender.com/problems/<code>)

409 Problem details (409)

422 `invalid`: the draft couldn't be saved

Problem

code * string Stable machine-readable code (snake_case)
detail string A sentence an app can show
error object | string Legacy member kept for existing clients (deprecated)
errors object Field → messages, for validation errors
instance string The request path
message string Legacy member of the mobile sign-in errors (deprecated)
request_id string
status * integer
title * string
type string (uri) A URI identifying the problem type (https://recordsender.com/problems/<code>)

429 Problem details (429)

PATCH /api/v1/drafts/{id}

Save a draft

What the composer's **Save draft** does: `POST /api/v1/drafts` saves a new draft in the mailbox's Drafts folder (201), `PATCH /api/v1/drafts/{id}` updates that draft (200). Nothing is sent; recipients are verified for display only. Without `from` the credential's first mailbox is used.

Scope: mail:send · messages.draft_patch

ParameterInTypeDescription
id *pathstring (uuid)
Request body application/json
bcc [string (email)] | string
cc [string (email)] | string
from string Mailbox address or id (default: the first mailbox)
html_body string
subject string
text_body string
to [string (email)] | string
Responses 200 · 401 · 402 · 403 · 404 · 422 · 429

200 Success

message * MailMessage
fields

MailMessage

cc [string]
channel string | null
direction "inbound" | "outbound" | "internal"
flagged boolean
from_address string (email)
from_name string | null
id * string (uuid)
message_id string The RFC 5322 Message-ID
received_at string | null
scheduled_at string | null
seen boolean
sent_at string | null
snippet string The start of the text body
status string draft | queued | scheduled | sent | received | failed …
subject string | null
thread_id string | null
to [string]
verification object | null Recipient address → verification result

401 Problem details (401)

402 Problem details (402)

403 Problem details (403)

404 No such mailbox in this account, or no such draft

Problem

code * string Stable machine-readable code (snake_case)
detail string A sentence an app can show
error object | string Legacy member kept for existing clients (deprecated)
errors object Field → messages, for validation errors
instance string The request path
message string Legacy member of the mobile sign-in errors (deprecated)
request_id string
status * integer
title * string
type string (uri) A URI identifying the problem type (https://recordsender.com/problems/<code>)

422 `invalid`: the draft couldn't be saved

Problem

code * string Stable machine-readable code (snake_case)
detail string A sentence an app can show
error object | string Legacy member kept for existing clients (deprecated)
errors object Field → messages, for validation errors
instance string The request path
message string Legacy member of the mobile sign-in errors (deprecated)
request_id string
status * integer
title * string
type string (uri) A URI identifying the problem type (https://recordsender.com/problems/<code>)

429 Problem details (429)

GET /api/v1/messages

List or search a mailbox's messages

The newest 100 messages of a folder (Inbox by default), or the 100 best matches of `q`. Without `mailbox` the credential's first mailbox is read. A personal mailbox is its owner's only. An API key never reads the Security folder (sign-in codes): it answers an empty list.

Scope: mail:read · paginated · messages.index

ParameterInTypeDescription
mailboxquerystringMailbox address or id (default: the first mailbox)
folderquerystringFolder role or name: inbox (default), sent, drafts, archive, trash, spam, security …
qquerystringSearch query; when given, `folder` is ignored
cursorquerystringThe `next_cursor` of the previous page
limitqueryintegerPage size
Responses 200 · 401 · 403 · 429

200 Success

has_more boolean
mailbox string (email)
messages * [MailMessage]
fields

MailMessage

cc [string]
channel string | null
direction "inbound" | "outbound" | "internal"
flagged boolean
from_address string (email)
from_name string | null
id * string (uuid)
message_id string The RFC 5322 Message-ID
received_at string | null
scheduled_at string | null
seen boolean
sent_at string | null
snippet string The start of the text body
status string draft | queued | scheduled | sent | received | failed …
subject string | null
thread_id string | null
to [string]
verification object | null Recipient address → verification result
next_cursor string | null Pass as `cursor` for the next page; null on the last

401 Problem details (401)

403 Problem details (403)

429 Problem details (429)

POST /api/v1/messages

Send a message

Accepted for delivery (202). Every recipient is checked by email verification first: a blocked recipient refuses the whole send (422 `recipient_blocked` with `blocked`). `Idempotency-Key` (or `client_ref`) makes retries safe: a repeat answers the message already sent. A personal mailbox sends for its owner and the delegates they chose. Deliverability limits answer 422 `sending_limit`, `warmup_limit`, `marketing_throttled` or `marketing_paused`; a shared-mailbox reply someone else beat answers 422 `collision` (resend with `send_anyway`).

Scope: mail:send · Idempotency-Key · messages.create

ParameterInTypeDescription
Idempotency-KeyheaderstringMakes retries safe (same as `client_ref`)
Request body application/json
attachment_ids [string (uuid)] Document ids to attach
bcc [string (email)] | string
category "transactional" | "marketing" | "personal" Traffic class (default: transactional for API keys)
cc [string (email)] | string
client_ref string Idempotency key for offline outboxes
format string Body format hint
from string Mailbox address or id to send from (default: the first mailbox)
html_body string
identity_id string (uuid) A verified identity to send as
in_reply_to string A message id (or Message-ID) in this mailbox to reply to
reply_started_at string (date-time) When the reply was started (shared-mailbox collision check)
request_read_receipt boolean
scheduled_at string (date-time) Send later
send_anyway boolean Send despite a collision
signature_id string (uuid)
subject string
text_body string
to [string (email)] | string
track_clicks boolean Click tracking (marketing mail, when the account allows it)
undo_seconds integer Undo-send window (0, 5, 10, 20, 30; default: the person's setting)
Responses 202 · 400 · 401 · 402 · 403 · 409 · 422 · 429

202 Success

message * MailMessage
fields

MailMessage

cc [string]
channel string | null
direction "inbound" | "outbound" | "internal"
flagged boolean
from_address string (email)
from_name string | null
id * string (uuid)
message_id string The RFC 5322 Message-ID
received_at string | null
scheduled_at string | null
seen boolean
sent_at string | null
snippet string The start of the text body
status string draft | queued | scheduled | sent | received | failed …
subject string | null
thread_id string | null
to [string]
verification object | null Recipient address → verification result

400 No recipients in to, cc or bcc

Problem

code * string Stable machine-readable code (snake_case)
detail string A sentence an app can show
error object | string Legacy member kept for existing clients (deprecated)
errors object Field → messages, for validation errors
instance string The request path
message string Legacy member of the mobile sign-in errors (deprecated)
request_id string
status * integer
title * string
type string (uri) A URI identifying the problem type (https://recordsender.com/problems/<code>)

401 Problem details (401)

402 Problem details (402)

403 Problem details (403)

409 Problem details (409)

422 Problem details (422)

429 Problem details (429)

GET /api/v1/messages/{id}

A message with its body, attachments and deliveries

Scope: mail:read · messages.show

ParameterInTypeDescription
id *pathstring (uuid)
Responses 200 · 401 · 403 · 404 · 429

200 Success

attachments [MailAttachment]
fields

MailAttachment

content_id string | null
content_type string
document_id string (uuid)
filename string
inline boolean
size integer
deliveries [MailDelivery]
fields

MailDelivery

attempts integer
delivered_at string | null
last_error string | null
recipient string (email)
status string
message * MailMessageFull
fields

MailMessageFull

cc [string]
channel string | null
direction "inbound" | "outbound" | "internal"
flagged boolean
from_address string (email)
from_name string | null
html_body string | null Sanitised HTML; inline parts stay `cid:` references
id * string (uuid)
message_id string The RFC 5322 Message-ID
received_at string | null
scheduled_at string | null
seen boolean
sent_at string | null
status string draft | queued | scheduled | sent | received | failed …
subject string | null
text_body string | null
thread_id string | null
to [string]
verification object | null Recipient address → verification result

401 Problem details (401)

403 Problem details (403)

404 Problem details (404)

429 Problem details (429)

PATCH /api/v1/messages/{id}

Mark a message read/unread or flagged

Only the fields given change; replays are harmless.

Scope: mail:read · messages.update

ParameterInTypeDescription
id *pathstring (uuid)
Request body application/json
flagged boolean
seen boolean
Responses 200 · 401 · 402 · 403 · 404 · 422 · 429

200 Success

message * MailMessage
fields

MailMessage

cc [string]
channel string | null
direction "inbound" | "outbound" | "internal"
flagged boolean
from_address string (email)
from_name string | null
id * string (uuid)
message_id string The RFC 5322 Message-ID
received_at string | null
scheduled_at string | null
seen boolean
sent_at string | null
snippet string The start of the text body
status string draft | queued | scheduled | sent | received | failed …
subject string | null
thread_id string | null
to [string]
verification object | null Recipient address → verification result

401 Problem details (401)

402 Problem details (402)

403 Problem details (403)

404 Problem details (404)

422 Problem details (422)

429 Problem details (429)