5 Endpunkte der Gruppe «Exporte». Die Referenz stammt aus der englischen OpenAPI-Spezifikation und ist nicht übersetzt.
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.
While 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_cursor
string | 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}. sourcearchive 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).
While 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
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).
While 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
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.
Beispiel
curl -X POST "https://api.sendtide.ch/v1/account/export" \
-H "Authorization: Bearer sk_test_…"
Antworten
Status
Beschreibung
202
AcceptedExportFelder der Antwort
id
string
Example: exp_8kq2m4bt
kind
enum: emails | account
format
enum: csv | jsonl | zip
status
enum: pending | running | ready | failed
error
string | null
rows
integer
size
integer
Bytes of the file
params
object
created_at
string (date-time)
finished_at
string | null (date-time)
expires_at
string | null (date-time)
24 hours after the file is ready
download_url
string | null
While 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