Skip to Content
Pouch
Emails

Watch a message

GET
/v1/emails/{id}/events

Auth: Bearer key scoped to the message's domain.

Authorization

bearer
headerAuthorizationBearer <token>

An API key in the Authorization header.

Path Parameters

id*string

An opaque, type-prefixed id.

Response Body

text/event-stream. Replays the message's existing transitions on connect, then holds the connection open until it reaches a terminal state, where the server closes it. Honors a Last-Event-ID header on reconnect, replaying only what's new since then. Webhooks are how a system finds out; this is how a person watches — see docs/api/conventions.md.

application/json
  1. response
id?string

Opaque id, prefixed evt_. Sent as the frame's SSE id — echo it back as a Last-Event-ID header to resume after a disconnect.

type?string

The transition this frame reports. Also sent as the frame's SSE event name. The three delivered/bounced/complained values match the webhook event of the same name.

Value in"email.queued""email.sent""email.delivered""email.deferred""email.bounced""email.complained""email.failed"
created_at?string

ISO 8601 timestamp the transition happened.

data?

The message, in the same shape GET /v1/emails/:id returns — and the same shape a webhook posts.

Example Request
curl -X GET 'https://pouch.example.com/v1/emails/string/events'
Example Response
{  "id": "string",  "type": "email.queued",  "created_at": "string",  "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"  }}