Skip to Content
Pouch
Inbound

Read one inbound message

GET
/v1/inbound/{id}

Auth: Bearer key scoped to the domain it was received on.

Authorization

bearer
headerAuthorizationBearer <token>

An API key in the Authorization header.

Path Parameters

id*string

An opaque, type-prefixed id.

Query Parameters

include?string

Comma-separated expansions to add: body (text and html, read from storage, returned by default); delivery (the newest delivery to the domain's inbound webhook, without its payload, or null).

fields?string

Comma-separated top-level keys to return in place of the defaults. id always comes back. Valid: id, url, domain_id, from, to, subject, text, html, headers, message_id, in_reply_to, outbound_message_id, attachments, raw_download_url, verdicts, address_ids, thread_id, received_at, expires_at, delivery.

Response Body

The message, while it's retained.

application/json
  1. response
id?string

Opaque id, prefixed inb_.

url?string

Where this message can be read at.

domain_id?string

The domain this mail was received on.

from?string

Sender, as Name when a name was given.

to?array<string>

Recipients the provider delivered this to.

subject?string

Subject line.

text?|

Plain-text body, when the sender included one. Part of the body expansion: a fields list without text or html skips reading it.

html?|

HTML body, when the sender included one. Part of the body expansion, with text.

headers?

Headers as the provider forwarded them.

message_id?|

The sender's Message-Id header, verbatim.

in_reply_to?|

The sender's In-Reply-To header, verbatim.

outbound_message_id?|

Set when in_reply_to matches a message this organization sent. Threading is metadata only — nothing here lets you reply.

attachments?array<>

Content isn't inlined; each attachment's download_url fetches it.

raw_download_url?|

A signed link to the message as received (message/rfc822), valid for 15 minutes. Null in a webhook payload, when the provider didn't hand the original over, and when the message failed a virus scan.

verdicts?|

The provider's scan results, each pass, fail, gray, processing_failed or null. Null when the provider doesn't scan. Check spf, dkim and dmarc before trusting from.

address_ids?array<string>

Addresses this message was delivered to, prefixed adr_. Empty for mail no address took.

thread_id?string

Opaque id, prefixed thr_, shared by every message linked to this one through Message-ID, In-Reply-To or References.

received_at?string

ISO 8601 timestamp.

expires_at?string

ISO 8601 timestamp this message is purged at, row and attachments together.

delivery?|

With include=delivery. The newest delivery to the domain's inbound webhook, in the shape GET /v1/webhook_endpoints/:id/deliveries returns, without payload. Null when none was queued.

Example Request
curl -X GET 'https://pouch.example.com/v1/inbound/string'
Example Response
{  "id": "string",  "url": "string",  "domain_id": "string",  "from": "string",  "to": [    "string"  ],  "subject": "string",  "text": "string",  "html": "string",  "headers": {},  "message_id": "string",  "in_reply_to": "string",  "outbound_message_id": "string",  "attachments": [    {      "filename": "string",      "content_type": "string",      "size": 0,      "quarantined": true,      "download_url": "string"    }  ],  "raw_download_url": "string",  "verdicts": {    "spam": "string",    "virus": "string",    "spf": "string",    "dkim": "string",    "dmarc": "string"  },  "address_ids": [    "string"  ],  "thread_id": "string",  "received_at": "string",  "expires_at": "string",  "delivery": {    "id": "string",    "endpoint_id": "string",    "event_type": "string",    "status": "pending",    "attempt_count": 0,    "last_status_code": 0,    "last_error": "string",    "next_attempt_at": "string",    "succeeded_at": "string",    "expires_at": "string",    "message_id": "string",    "created_at": "string",    "payload": {},    "attempts": [      {        "id": "string",        "attempt": 0,        "status_code": 0,        "error": "string",        "duration_ms": 0,        "created_at": "string"      }    ]  }}