Mail API reference

Mail API · Messages

get/v1/workspaces/{workspace_id}/mailboxes/{id}/messages/{mid}Auth

Get a single message (metadata + attachment manifest; `body_preview` is null without `mail.message.body.read`). Use /:mid/raw for content.

Path parameters

workspace_id*string · uuid

Id of the workspace.

id*string · uuid

Id of the mailboxe.

mid*string · uuid

Id of the message in the mailbox.

Response · 200

id*string · uuid

The message id.

mailbox_id*string · uuid

The mailbox the message was delivered to.

seq_id*string

Sequential ID per mailbox.

Example: "42"

raw_object_key*string

Storage object key for the raw RFC5322 .eml.

envelope_to*string

The SMTP envelope recipient.

from_address*string

Sender address from the From header.

from_local*string

Part of the sender address before the @.

from_domain*string

Domain of the sender address.

to_addresses*array

Addresses from the To header.

cc_addresses*array

Addresses from the Cc header.

subject*string

Subject line; null when the message has none.

body_preview*string

First 512 bytes of the plaintext body. This is message content, not metadata, so it is only populated for callers holding `mail.message.body.read`; everyone else sees null. The full body is at /:mid/raw, behind the same action.

rfc822_message_id*string

The Message-ID header; null when missing.

size_bytes*number

Size of the raw message in bytes.

spam_score*string

Spam score from the receiving filter; null when not scored.

spam_verdict*string

Spam verdict from the receiving filter; null when not scored.

spf_result*string

SPF result for the sender; null when not checked.

dkim_result*string

DKIM result; null when not checked.

dmarc_result*string

DMARC result; null when not checked.

quarantined*boolean

True when the message was quarantined as spam or malware.

received_at*string · date-time

When the message arrived.

read_at*string · date-time

When the message was marked read; null while unread.

deleted_at*string · date-time

When the message was deleted; null while not deleted.

attachments*array

The message's attachments.

Example

Request

GET https://api.mail.productcraft.co/v1/workspaces/{workspace_id}/mailboxes/{id}/messages/{mid}
Authorization: Bearer YOUR_TOKEN

Response

{
  "id": "00000000-0000-0000-0000-000000000000",
  "mailbox_id": "00000000-0000-0000-0000-000000000000",
  "seq_id": "42",
  "raw_object_key": "string",
  "envelope_to": "string",
  "from_address": "string",
  "from_local": "string",
  "from_domain": "string",
  "to_addresses": [
    "string"
  ],
  "cc_addresses": [
    "string"
  ],
  "subject": "string",
  "body_preview": "string",
  "rfc822_message_id": "string",
  "size_bytes": 0,
  "spam_score": "string",
  "spam_verdict": "string",
  "spf_result": "string",
  "dkim_result": "string",
  "dmarc_result": "string",
  "quarantined": false,
  "received_at": "2026-01-01T00:00:00.000Z",
  "read_at": "2026-01-01T00:00:00.000Z",
  "deleted_at": "2026-01-01T00:00:00.000Z",
  "attachments": [
    {
      "position": 0,
      "filename": "string",
      "content_id": "string",
      "content_type": "string",
      "size_bytes": 0,
      "sha256": "string"
    }
  ]
}