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
| Name | In | Type | Description |
|---|---|---|---|
format * | query | enum: csv | jsonl | |
q | query | string | Same query language as GET /v1/emails |
since | query | string (date-time) | |
until | query | string (date-time) |
Example
curl "https://api.sendtide.ch/v1/emails/export?format=csv" \
-H "Authorization: Bearer sk_test_…" Responses
| Status | Description |
|---|---|
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
| Status | Description | ||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
200 | The latest exports Response fields
|
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
| Field | Type | Description |
|---|---|---|
format * | enum: csv | jsonl | |
q | string | |
since | string (date-time) | |
until | string (date-time) | |
source | enum: live | archive | all | Default: "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
| Status | Description | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
202 | Accepted Export Response fields
| ||||||||||||||||||||||||||||||||||||
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
| Name | In | Type | Description |
|---|---|---|---|
id * | path | string |
Example
curl "https://api.sendtide.ch/v1/exports/exp_8kq2m4bt" \
-H "Authorization: Bearer sk_test_…" Responses
| Status | Description | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
200 | The export Export Response fields
| ||||||||||||||||||||||||||||||||||||
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
| Status | Description | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
202 | Accepted Export Response fields
| ||||||||||||||||||||||||||||||||||||
403 | Error in the usual format, errors and limits |