Skip to Content
Pouch
Addresses

List an address's mail

GET
/v1/addresses/{id}/messages

Auth: Bearer live key scoped to the address's domain.

Authorization

bearer
headerAuthorizationBearer <token>

An API key in the Authorization header.

Path Parameters

id*string

An opaque, type-prefixed id.

Query Parameters

limit?integer

How many messages to return, at most 200.

Range1 <= value <= 200
Default50
cursor?string

Id of the last message on the previous page.

after?string

Only messages received after this message id, for picking up where a previous read stopped.

thread?string

Only messages in this thread id.

wait?integer

Seconds to wait for a message when none matches yet, up to 55. Returns as soon as one arrives, or an empty page when the time runs out. 0 answers at once.

Range0 <= value <= 55
Default0
include?string

Comma-separated expansions to add: body (text and html, read from storage, returned by default).

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.

Response Body

A page of the mail delivered to the address, newest first, in the shape GET /v1/inbound/:id returns. Empty when wait ran out. A waiting request holds one of the key's stream slots.

application/json
  1. response
data?array<>

The page of inbound mail, newest first.

next_cursor?|

Id to pass as cursor for the next page. Null on the last page.

Example Request
curl -X GET 'https://pouch.example.com/v1/addresses/string/messages'
Example Response
{  "data": [    {      "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"          }        ]      }    }  ],  "next_cursor": "string"}