Skip to Content
Pouch
Exports

Request an export

POST
/v1/exports

Auth: Bearer key.

Authorization

bearer
headerAuthorizationBearer <token>

An API key in the Authorization header.

Request Body

application/json
  1. body
kind*string

What to export: log_csv, log_ndjson, bodies or data.

Value in"log_csv""log_ndjson""bodies""data"
status?string

Only messages with this status. Ignored when kind is data.

Value in"queued""sent""delivered""deferred""bounced""complained""failed"
domain?string

Only messages sent from this domain id. Ignored when kind is data.

tag?string

Only messages carrying this tag. Ignored when kind is data.

since?unknown

Only messages created at or after this ISO 8601 timestamp. Ignored when kind is data.

until?unknown

Only messages created at or before this ISO 8601 timestamp. Ignored when kind is data.

Response Body

The queued export. Poll GET /v1/exports/:id until status is ready, failed or expired. Always queues, whatever the row count — there's no synchronous response shape here, unlike the dashboard's own export routes below their size ceiling.

application/json
  1. response
id?string

Opaque id, prefixed exp_.

kind?string

What this export contains.

Value in"log_csv""log_ndjson""bodies""data"
status?string

requested and running are both in progress. ready carries download_url. failed carries error. expired means the artifact's retention window (7 days from ready_at) has passed — request a new export.

Value in"requested""running""ready""failed""expired"
count?|

Row count as of the request.

filename?|

Set once the export is ready.

download_url?|

A signed link to the artifact, minted fresh on every read. Present only while status is ready — request the export again to re-read this field for a current link.

error?|

Set only when status is failed.

requested_at?string

ISO 8601 timestamp.

started_at?|

ISO 8601 timestamp the worker began building this export, or null.

ready_at?|

ISO 8601 timestamp, or null.

failed_at?|

ISO 8601 timestamp, or null.

expires_at?|

ISO 8601 timestamp the artifact is deleted, or null before it's ready.

Example Request
curl -X POST 'https://pouch.example.com/v1/exports' \  -H 'Content-Type: application/json' \  -d '{  "kind": "log_csv"}'
Example Response
{  "id": "string",  "kind": "log_csv",  "status": "requested",  "count": 0,  "filename": "string",  "download_url": "string",  "error": "string",  "requested_at": "string",  "started_at": "string",  "ready_at": "string",  "failed_at": "string",  "expires_at": "string"}