Messages

Get a message

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.

get/v1/inboxes/{id}/messages/{messageId}

Request

  • Base URL: https://anjal.app
  • URL: https://anjal.app/v1/inboxes/{id}/messages/{messageId}
  • Auth: API key in header X-API-Key

Query parameters

inlineImages'refs'

refs replaces inline data: images in htmlBody with attachment:<id> references.

Response

OK

idstring uuid
direction'inbound' | 'outbound'
fromstring
tostring
subjectstring
plainBodystring nullable
htmlBodystring nullable
isReadboolean
threadIdstring uuid nullable
messageIdHeaderstring nullable
inReplyTostring nullable
receivedAtstring 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' nullable

Outbound only. delivered means the recipient's mail server accepted it (not a guarantee of inbox placement). Null until known.

deliveredAtstring date-time nullable

When the recipient's mail server accepted the message (outbound only).

firstOpenedAtstring date-time nullable

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.

lastOpenedAtstring date-time nullable

Most recent open event. Updates on every open.

openCountinteger

Total opens. Subject to the same caveats as the timestamps.

firstClickedAtstring date-time nullable

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.

lastClickedAtstring date-time nullable
clickCountinteger

Example response

{
  "attachments": [
    {
      "contentType": "application/pdf"
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.