Mail API reference

Mail API · Received

get/v1/workspaces/{workspace_id}/received/{id}Auth

Get one received email

Metadata, the authentication results, the envelope recipient and the attachment manifest. `body_preview` is null without `mail.message.body.read`; the full message is at `/received/{id}/raw`.

Path parameters

workspace_id*string · uuid

Id of the workspace.

id*string · uuid

Received email id.

Response · 200

id*string · uuid

The received email id.

Example: "7d9c1e2a-3b4c-4d5e-8f6a-7b8c9d0e1f2a"

mailbox_id*string · uuid

The mailbox that received it.

mailbox_address*string · email

The receiving mailbox address (`local_part@domain`).

Example: "support@in.example.com"

from*string

Sender address (the From header).

Example: "jane@example.org"

to*array

Addresses in the To header.

Example: ["support@in.example.com"]

cc*array

Addresses in the Cc header.

Example: []

subject*string

Subject line; null when the email has none.

Example: "Invoice #42"

rfc822_message_id*string

The RFC 822 Message-ID header, as received.

Example: "<CAF1234@mail.gmail.com>"

received_at*string · date-time

When the email arrived.

read_at*string · date-time

When it was marked read; null while unread.

spam_verdict*object

The spam filter's verdict; null when the filter did not run.

Example: "ham"

spam*boolean

True when the spam filter quarantined it (verdict `junk` or `reject`).

Example: false

spf_result*string

SPF result for the sender, e.g. `pass`, `fail`, `softfail`, `none`.

Example: "pass"

dkim_result*string

DKIM result, e.g. `pass`, `fail`, `none`.

Example: "pass"

dmarc_result*string

DMARC result, e.g. `pass`, `fail`, `none`.

Example: "pass"

size_bytes*number

Size of the raw message in bytes.

Example: 5120

attachment_count*number

Number of attachments.

Example: 1

envelope_to*string

The SMTP envelope recipient (RCPT TO).

Example: "support@in.example.com"

body_preview*string

First 512 bytes of the plain-text body. Message content, so it is only filled for callers holding `mail.message.body.read`; everyone else gets null. The full message is at `/received/{id}/raw`, behind the same action.

attachments*array

The email's attachments.

Example

Request

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

Response

{
  "id": "7d9c1e2a-3b4c-4d5e-8f6a-7b8c9d0e1f2a",
  "mailbox_id": "00000000-0000-0000-0000-000000000000",
  "mailbox_address": "support@in.example.com",
  "from": "jane@example.org",
  "to": [
    "support@in.example.com"
  ],
  "cc": [],
  "subject": "Invoice #42",
  "rfc822_message_id": "<CAF1234@mail.gmail.com>",
  "received_at": "2026-01-01T00:00:00.000Z",
  "read_at": "2026-01-01T00:00:00.000Z",
  "spam_verdict": "ham",
  "spam": false,
  "spf_result": "pass",
  "dkim_result": "pass",
  "dmarc_result": "pass",
  "size_bytes": 5120,
  "attachment_count": 1,
  "envelope_to": "support@in.example.com",
  "body_preview": "string",
  "attachments": [
    {
      "position": 0,
      "filename": "invoice.pdf",
      "content_id": "string",
      "content_type": "application/pdf",
      "size_bytes": 48213,
      "sha256": "string"
    }
  ]
}