Skip to Content
Pouch
Emails

List messages

GET
/v1/emails

Auth: Bearer key.

Authorization

bearer
headerAuthorizationBearer <token>

An API key in the Authorization header.

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.

status?string

Only messages with one of these statuses, comma-separated: queued, sent, delivered, deferred, bounced, complained, failed.

domain?string

Only messages sent from this domain id.

key?string

Only messages sent with this key id.

batch?string

Only messages sent in this batch id.

held?string

true for queued messages a paused domain or a suspended organization is holding, false for the rest. Omit for both.

Value in"true""false"
sensitive?string

true for messages whose body is withheld from every read, false for the rest. Omit for both.

Value in"true""false"
tag?string

Only messages carrying this tag.

to?string

Only messages to this address, in to, cc or bcc, matched on its normalized form.

Length3 <= length
reason?string

Only messages with a bounce or complaint carrying exactly this reason, as the provider gave it.

Length1 <= length
since?unknown

Only messages created at or after this ISO 8601 timestamp.

until?unknown

Only messages created at or before this ISO 8601 timestamp.

include?string

Comma-separated expansions to add: events (every lifecycle transition, oldest first); occurrences (what happened without changing the status: retries, backoffs, suppressions, a shredded body, webhook deliveries, oldest first); body (html, text and attachments with download links that expire, or null and why); rendered (the html as the recipient got it, framed in the domain's layout, or null and why); resends (the copies resent from this message, oldest first).

fields?string

Comma-separated top-level keys to return in place of the defaults. id always comes back. Valid: id, url, status, from, to, cc, bcc, reply_to, subject, tags, headers, layout, key_id, batch_id, test_mode, sensitive, warnings, provider_message_id, reason, attempts, next_attempt_at, created_at, sent_at, delivered_at, abandoned_at, size, resent_from, events, occurrences, body, rendered, body_unavailable, resends.

Response Body

A page of the key's messages, newest first.

application/json
  1. response
data?array<>

The page of messages, 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/emails'
Example Response
{  "data": [    {      "id": "string",      "url": "string",      "status": "queued",      "from": "string",      "to": [        "string"      ],      "cc": [        "string"      ],      "bcc": [        "string"      ],      "reply_to": [        "string"      ],      "subject": "string",      "tags": [        "string"      ],      "headers": {},      "layout": true,      "key_id": "string",      "batch_id": "string",      "test_mode": true,      "sensitive": true,      "warnings": [        {          "code": "previously_bounced",          "address": "string",          "message": "string",          "detail": {}        }      ],      "provider_message_id": "string",      "reason": "string",      "attempts": 0,      "next_attempt_at": "string",      "created_at": "string",      "sent_at": "string",      "delivered_at": "string",      "abandoned_at": "string",      "size": {        "body_bytes": 0,        "attachment_bytes": 0      },      "resent_from": "string",      "resends": [        {          "id": "string",          "status": "string",          "created_at": "string"        }      ],      "events": [        {          "id": "string",          "status": "string",          "reason": "string",          "occurred_at": "string"        }      ],      "occurrences": [        {          "id": "string",          "kind": "retry",          "reason": "string",          "occurred_at": "string",          "detail": {}        }      ],      "body": {        "html": "string",        "text": "string",        "attachments": [          {            "filename": "string",            "content_type": "string",            "size": 0,            "download_url": "string"          }        ]      },      "rendered": {        "html": "string",        "framed": true,        "frame_changed": true      },      "body_unavailable": {        "reason": "withheld",        "message": "string",        "ended_at": "string"      }    }  ],  "next_cursor": "string"}