Request an export
Auth: Bearer key.
bearerAuthorizationBearer <token>An API key in the Authorization header.
application/json- body
kind*stringWhat to export: log_csv, log_ndjson, bodies or data.
"log_csv""log_ndjson""bodies""data"status?stringOnly messages with this status. Ignored when kind is data.
"queued""sent""delivered""deferred""bounced""complained""failed"domain?stringOnly messages sent from this domain id. Ignored when kind is data.
tag?stringOnly messages carrying this tag. Ignored when kind is data.
since?unknownOnly messages created at or after this ISO 8601 timestamp. Ignored when kind is data.
until?unknownOnly messages created at or before this ISO 8601 timestamp. Ignored when kind is data.
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- response
id?stringOpaque id, prefixed exp_.
kind?stringWhat this export contains.
"log_csv""log_ndjson""bodies""data"status?stringrequested 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.
"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?stringISO 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.
curl -X POST 'https://pouch.example.com/v1/exports' \ -H 'Content-Type: application/json' \ -d '{ "kind": "log_csv"}'{ "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"}