Skip to content
Inkbox

Inkbox

ContactDocs

Jump to

Messages

Messages represent individual emails in a mailbox. List and detail endpoints return message metadata; full body content (text/HTML) is fetched from storage on detail requests. All list endpoints use cursor-based pagination.


List messages GET

GET /mailboxes/{email_address}/messages

List messages in a mailbox, newest first, with cursor pagination.

Path parameters

ParameterTypeDescription
email_addressstringEmail address of the mailbox

Query parameters

ParameterTypeDefaultDescription
cursorstringOpaque cursor from a previous response's next_cursor
limitinteger50Results per page (1–100)
directionstringFilter by "inbound" or "outbound". Omit for all messages

Response (200)

JSONJSON

Code examples


Get message GET

GET /mailboxes/{email_address}/messages/{message_id}

Get a single message with its full body content (plain text and HTML).

Path parameters

ParameterTypeDescription
email_addressstringEmail address of the mailbox
message_idUUIDUnique identifier of the message

Response (200)

JSONJSON

Code examples


Send message POST

POST /mailboxes/{email_address}/messages

Compose and send an email from a mailbox. The message is sent via SES, and bodies are stored in S3. Threading is automatically resolved from in_reply_to_message_id.

Path parameters

ParameterTypeDescription
email_addressstringEmail address of the sending mailbox

Request body

FieldTypeRequiredDescription
recipients.tostring[]YesPrimary recipients (at least one)
recipients.ccstring[]NoCC recipients
recipients.bccstring[]NoBCC recipients (excluded from headers, delivered separately)
subjectstringYesEmail subject line (max 998 chars)
body_textstringNoPlain-text body
body_htmlstringNoHTML body
in_reply_to_message_idstringNoRFC 5322 Message-ID of the email being replied to
attachmentsobject[]NoFile attachments (see below). Blocked types: .exe, .bat, .scr. Max total 25 MB.

AttachmentUpload object:

FieldTypeDescription
filenamestringFile name (max 255 chars)
content_typestringMIME type (e.g. application/pdf)
content_base64stringBase64-encoded file content

Request example

JSONJSON

Response (201)

Returns the created message metadata (same as a list item — body content is not included).

Error responses

StatusDescription
429Mailbox has exceeded 600 sends in the last hour. Response includes Retry-After (seconds), X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset headers

Code examples


Update message flags PATCH

PATCH /mailboxes/{email_address}/messages/{message_id}

Update is_read or is_starred on a message. Omit a field to leave it unchanged.

Path parameters

ParameterTypeDescription
email_addressstringEmail address of the mailbox
message_idUUIDUnique identifier of the message

Request body

FieldTypeRequiredDescription
is_readbooleanNoMark as read (true) or unread (false)
is_starredbooleanNoStar or unstar the message

Code examples


Delete message DELETE

DELETE /mailboxes/{email_address}/messages/{message_id}

Delete a message. Returns 204 No Content on success.

Path parameters

ParameterTypeDescription
email_addressstringEmail address of the mailbox
message_idUUIDUnique identifier of the message

Code examples


Download attachment GET

GET /mailboxes/{email_address}/messages/{message_id}/attachments/{filename}

Download an attachment from a message. By default, responds with a 302 redirect to a presigned S3 URL. Set redirect=false to get the URL as JSON instead.

Path parameters

ParameterTypeDescription
email_addressstringEmail address of the mailbox
message_idUUIDUnique identifier of the message
filenamestringAttachment filename (must match exactly with attachment_metadata[].filename)

Query parameters

ParameterTypeDefaultDescription
redirectbooleantruetrue returns a 302 redirect to the download URL. false returns the URL as JSON.

Response (302) — redirect mode (default)

Redirects to a presigned S3 URL with a Content-Disposition: attachment header. The URL is valid for 15 minutes.

Response (200) — JSON mode

JSONJSON
FieldTypeDescription
urlstringPresigned download URL (valid for 15 minutes)
filenamestringAttachment filename
expires_inintegerURL expiration time in seconds

Error responses

StatusDescription
403Mailbox does not belong to your organization
404Mailbox, message, or attachment not found

Code examples


Message object

MessageResponse (list items)

FieldTypeDescription
idUUIDUnique message identifier
mailbox_idUUIDOwning mailbox
thread_idUUID | nullConversation thread, if resolved
message_idstringRFC 5322 Message-ID header value
from_addressstringSender address
to_addressesstring[]Primary recipients
cc_addressesstring[] | nullCC recipients
subjectstring | nullEmail subject line
snippetstring | nullFirst ~200 chars of the plain-text body
directionstringinbound or outbound
statusstringqueued, sent, delivered, bounced, failed, or received
is_readbooleanWhether the message has been read
is_starredbooleanWhether the message is starred
has_attachmentsbooleanWhether the message has attachments
created_atstringCreation timestamp (ISO 8601)

MessageDetailResponse (single message)

Includes all MessageResponse fields plus:

FieldTypeDescription
body_textstring | nullPlain-text body
body_htmlstring | nullHTML body
bcc_addressesstring[] | nullBCC recipients
in_reply_tostring | nullRFC 5322 In-Reply-To header
referencesstring[] | nullRFC 5322 References headers
attachment_metadataobject[] | nullAttachment descriptors (filename, content_type, size, s3_key)
ses_message_idstring | nullSES-assigned message ID (outbound only)
updated_atstringLast update timestamp (ISO 8601)

Inkbox

Copyright © 2026 Inkbox

This site is protected by reCAPTCHA.

Google Privacy Policy and Terms of Service apply.

Website

Inkbox

Copyright © 2026 Inkbox

This site is protected by reCAPTCHA.

Google Privacy Policy and Terms of Service apply.

Website