Waitlist open: get early access

API reference: Exports

5 endpoints of the Exports group.

Download mail as CSV or JSON Lines (streamed)

GET/v1/emails/export

The mail of a range (default: the last 30 days) with the filters of the search, newest last. Up to 100'000 mails; more is 422 range_too_large, use POST /v1/exports. JSON Lines carry recipients and events, CSV the flat columns. Cells that start with =, +, - or @ get a leading quote, so spreadsheets do not run them.

Parameters

NameInTypeDescription
format *queryenum: csv | jsonl
qquerystringSame query language as GET /v1/emails
sincequerystring (date-time)
untilquerystring (date-time)

Example

curl "https://api.sendtide.ch/v1/emails/export?format=csv" \
  -H "Authorization: Bearer sk_test_…"

Responses

StatusDescription
200 The file
422 Error in the usual format, errors and limits

List exports

GET/v1/exports

Example

curl "https://api.sendtide.ch/v1/exports" \
  -H "Authorization: Bearer sk_test_…"

Responses

StatusDescription
200 The latest exports
Response fields
dataarray<Export>
data[].idstringExample: exp_8kq2m4bt
data[].kindenum: emails | account
data[].formatenum: csv | jsonl | zip
data[].statusenum: pending | running | ready | failed
data[].errorstring | null
data[].rowsinteger
data[].sizeintegerBytes of the file
data[].paramsobject
data[].created_atstring (date-time)
data[].finished_atstring | null (date-time)
data[].expires_atstring | null (date-time)24 hours after the file is ready
data[].download_urlstring | nullWhile the export is ready, only in GET /v1/exports/{id}, and only in the first read after it is ready (the token is stored hashed); ?new_link=true makes a new link and the earlier one stops working. Bucket exports get a presigned link on every read. Needs no key
next_cursorstring | null

Export mail as a job

POST/v1/exports

The scheduler builds a gzip file (CSV or JSON Lines) of the mail of a range with the filters of the search. Poll GET /v1/exports/{id}. source archive or all includes the archive (Scale plan, 403 plan_limit otherwise); all needs jsonl. At most 5 exports are open at once (429 too_many_exports).

Request body application/json

FieldTypeDescription
format *enum: csv | jsonl
qstring
sincestring (date-time)
untilstring (date-time)
sourceenum: live | archive | allDefault: "live"

Example

curl -X POST "https://api.sendtide.ch/v1/exports" \
  -H "Authorization: Bearer sk_test_…" \
  -H "Content-Type: application/json" \
  -d '{"format":"jsonl","q":"status:bounced","since":"2026-11-01T00:00:00Z"}'

Responses

StatusDescription
202 Accepted Export
Response fields
idstringExample: exp_8kq2m4bt
kindenum: emails | account
formatenum: csv | jsonl | zip
statusenum: pending | running | ready | failed
errorstring | null
rowsinteger
sizeintegerBytes of the file
paramsobject
created_atstring (date-time)
finished_atstring | null (date-time)
expires_atstring | null (date-time)24 hours after the file is ready
download_urlstring | nullWhile the export is ready, only in GET /v1/exports/{id}, and only in the first read after it is ready (the token is stored hashed); ?new_link=true makes a new link and the earlier one stops working. Bucket exports get a presigned link on every read. Needs no key
403 Error in the usual format, errors and limits
422 Error in the usual format, errors and limits
429 Error in the usual format, errors and limits

Status of an export, and its download link

GET/v1/exports/{id}

download_url is set while the export is ready; the link works for 24 hours after that and needs no key. After that the file is gone (status: failed, error: expired).

Parameters

NameInTypeDescription
id *pathstring

Example

curl "https://api.sendtide.ch/v1/exports/exp_8kq2m4bt" \
  -H "Authorization: Bearer sk_test_…"

Responses

StatusDescription
200 The export Export
Response fields
idstringExample: exp_8kq2m4bt
kindenum: emails | account
formatenum: csv | jsonl | zip
statusenum: pending | running | ready | failed
errorstring | null
rowsinteger
sizeintegerBytes of the file
paramsobject
created_atstring (date-time)
finished_atstring | null (date-time)
expires_atstring | null (date-time)24 hours after the file is ready
download_urlstring | nullWhile the export is ready, only in GET /v1/exports/{id}, and only in the first read after it is ready (the token is stored hashed); ?new_link=true makes a new link and the earlier one stops working. Bucket exports get a presigned link on every read. Needs no key
404 Error in the usual format, errors and limits

Export all data of the account (owner, dashboard session only)

POST/v1/account/export

A zip of JSON files with everything the account holds (nDSG requests). Passwords, key hashes and other secrets are not included. Follow it like any export.

Example

curl -X POST "https://api.sendtide.ch/v1/account/export" \
  -H "Authorization: Bearer sk_test_…"

Responses

StatusDescription
202 Accepted Export
Response fields
idstringExample: exp_8kq2m4bt
kindenum: emails | account
formatenum: csv | jsonl | zip
statusenum: pending | running | ready | failed
errorstring | null
rowsinteger
sizeintegerBytes of the file
paramsobject
created_atstring (date-time)
finished_atstring | null (date-time)
expires_atstring | null (date-time)24 hours after the file is ready
download_urlstring | nullWhile the export is ready, only in GET /v1/exports/{id}, and only in the first read after it is ready (the token is stored hashed); ?new_link=true makes a new link and the earlier one stops working. Bucket exports get a presigned link on every read. Needs no key
403 Error in the usual format, errors and limits