Get a message
https://anjal.app/v1/inboxes/{id}/messages/{messageId}Returns full bodies plus attachment metadata. Also marks the message as read.
Some mail clients paste a screenshot straight into the HTML as a data:
URI, which can be hundreds of KB inside htmlBody. Pass
inlineImages=refs to get each one replaced by attachment:<id>, the
id of the attachment holding the same image, and that attachment marked
inline: true. Fetch it from the attachments endpoint. The response then
also carries inlineImages: { replaced, unmatched }; unmatched counts
images that had no matching attachment and were removed with no pointer.
Without the parameter htmlBody is returned exactly as received.
Path parameters
idrequired string | Inbox UUID |
messageIdrequired string | Message UUID |
Query parameters
inlineImages"refs" | `refs` replaces inline `data:` images in `htmlBody` with `attachment:<id>` references. |
Responses
idstring | format: uuid |
direction"inbound" | "outbound" | enum: "inbound" | "outbound" |
fromstring | |
tostring | |
subjectstring | |
plainBodystring | |
htmlBodystring | |
isReadboolean | |
threadIdstring | format: uuid |
messageIdHeaderstring | |
inReplyTostring | |
receivedAtstring | format: date-time |
labelsstring[] | Lowercase labels on this message. |
isSpamboolean | Flagged by the spam filter. Spam is left out of lists unless `includeSpam=true`. |
deliveryStatus"delivered" | "bounced" | "complained" | "rejected" | null | Outbound only. `delivered` means the recipient's mail server accepted it (not a guarantee of inbox placement). Null until known. enum: "delivered" | "bounced" | "complained" | "rejected" | null |
deliveredAtstring | When the recipient's mail server accepted the message (outbound only). format: date-time |
firstOpenedAtstring | Time of the first open (outbound sends with `trackOpens: true` only). NULL until the first open. Opens are a hint, not proof: Apple Mail Privacy Protection fetches images on delivery, and clients that block images never report an open. format: date-time |
lastOpenedAtstring | Most recent open event. Updates on every open. format: date-time |
openCountinteger | Total opens. Subject to the same caveats as the timestamps. default: 0 |
firstClickedAtstring | Timestamp of the first recipient link-click. Reliable signal of engagement (unlike opens, click events are not Apple-MPP-poisoned). NULL until the first click. format: date-time |
lastClickedAtstring | format: date-time |
clickCountinteger | default: 0 |
attachmentsobject[] | |
idstring | format: uuid |
filenamestring | |
contentTypestring | |
sizeBytesinteger | |
inlineboolean | Present and true when `htmlBody` embedded this attachment as an inline image and `?inlineImages=refs` replaced it with `attachment:<id>`. |
Authentication
Send your API key in the X-API-Key header (or Authorization: Bearer <key>). Any prefix accepted by this endpoint — tk_, wk_, ak_, or sa_ — is documented in the key prefix table.