Hoppa till innehållet

Read a message

GET/v1/messages/{id}

TypeScript sendora.messages.get(messageId)

Python sendora.messages.get(message_id)

Key sk_… a server key

The message as the log holds it, its attachments described but not returned, and every event on its timeline. Bodies are never returned.

Parameters

  • idin pathstring (uuid)required

    The message id.

Responses

200The message with its attachments described and its timeline.

  • messageIdstring (uuid)required
  • streamIdstring (uuid)required

    The stream the message went on.

  • broadcastIdstring (uuid) or nullrequired

    The broadcast the message belongs to; null for a message sent on its own.

  • status"accepted" | "injected" | "failed"required

    accepted until handed to the mail server, injected after; failed if that never worked.

  • fromstringrequired
  • subjectstringrequired
  • tagstring or nullrequired
  • metadatamap of string to stringrequired
  • submittedAtstring (date-time)required
  • testbooleanrequired

    True when the message went through a test server: its events were simulated and nobody received it.

  • recipientsarray of objectrequired
    • addressstringrequired
    • kind"to" | "cc" | "bcc"required
    • status"queued" | "delivered" | "deferred" | "bounced" | "expired"required

      queued until the receiver answers; deferred while it keeps saying try later.

  • attachmentsarray of objectrequired
    • namestringrequired
    • contentTypestringrequired
    • contentIdstring or nullrequired
    • sizeintegerrequired

      Bytes before encoding.

  • eventsarray of objectrequired

    Oldest first.

    • recipientstring or nullrequired

      The recipient the event is about; null when it concerns the message as a whole.

    • type"Reception" | "Delivery" | "Bounce" | "TransientFailure" | "Expiration" | "AdminBounce" | "OOB" | "Feedback" | "AdminRebind" | "DeferredInjectionRebind" | "Rejection" | "Delayed"required

      Reception when the mail server took it, Delivery, TransientFailure, Bounce, OOB for a bounce report received by mail, Feedback for a spam complaint.

    • atstring (date-time)required
    • codeinteger or nullrequired

      The SMTP status code the receiver answered.

    • detailsstring or nullrequired

      The receiver’s response text.

    • classificationstring or nullrequired

      How a bounce was classified, such as InvalidRecipient.

Example (47 lines)
{
  "messageId": "5f432ffd-c005-499b-aa3a-5b8a088ea20e",
  "streamId": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
  "broadcastId": null,
  "status": "injected",
  "from": "no-reply@example.se",
  "subject": "Your invoice for September",
  "tag": "invoice",
  "metadata": {
    "invoiceId": "2026-0912"
  },
  "submittedAt": "2026-09-15T12:00:00.000Z",
  "test": false,
  "recipients": [
    {
      "address": "anna@example.com",
      "kind": "to",
      "status": "delivered"
    }
  ],
  "attachments": [
    {
      "name": "invoice.pdf",
      "contentType": "application/pdf",
      "contentId": null,
      "size": 48213
    }
  ],
  "events": [
    {
      "recipient": "anna@example.com",
      "type": "Reception",
      "at": "2026-09-15T12:00:00.000Z",
      "code": 250,
      "details": null,
      "classification": null
    },
    {
      "recipient": "anna@example.com",
      "type": "Delivery",
      "at": "2026-09-15T12:00:02.000Z",
      "code": 250,
      "details": "2.0.0 OK",
      "classification": null
    }
  ]
}

Errors

Every error answers error, the code, and message, a sentence for a person. A code that adds fields is shown in full below the table.

CodeStatusMeaning
unauthorized401The key is missing, malformed or revoked.
wrong_token_kind403The key is of the other kind: a server key (sk_) where an account key (ak_) is needed, or the reverse. The message names the kind the operation takes.
not_found404No such message of this server.