# API-Referenz: Exporte

> Endpunkte der Gruppe «Exporte» der Sendtide API mit Parametern, Request-Body, Antworten und curl-Beispielen. Die Referenz ist auf Englisch.

URL: https://sendtide.ch/docs/api/exports/

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.
### Parameter
| Name | Ort | Typ | Beschreibung |
| --- | --- | --- | --- |
| 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) | |
### Beispiel

```
curl "https://api.sendtide.ch/v1/emails/export?format=csv" \
  -H "Authorization: Bearer sk_test_…"
```
### Antworten
| Status | Beschreibung |
| --- | --- |
| 200 | The file |
| 422 | Fehler im üblichen Format, [Fehler und Limits](https://sendtide.ch/docs/fehler-und-limits/) |
## List exports

GET /v1/exports
### Beispiel

```
curl "https://api.sendtide.ch/v1/exports" \
  -H "Authorization: Bearer sk_test_…"
```
### Antworten
| Status | Beschreibung |
| --- | --- |
| 200 | The latest exports |
## 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
| Feld | Typ | Beschreibung |
| --- | --- | --- |
| format * | enum: csv / jsonl | |
| q | string | |
| since | string (date-time) | |
| until | string (date-time) | |
| source | enum: live / archive / all | Default: "live" |
### Beispiel

```
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"}'
```
### Antworten
| Status | Beschreibung |
| --- | --- |
| 202 | Accepted Export |
| 403 | Fehler im üblichen Format, [Fehler und Limits](https://sendtide.ch/docs/fehler-und-limits/) |
| 422 | Fehler im üblichen Format, [Fehler und Limits](https://sendtide.ch/docs/fehler-und-limits/) |
| 429 | Fehler im üblichen Format, [Fehler und Limits](https://sendtide.ch/docs/fehler-und-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).
### Parameter
| Name | Ort | Typ | Beschreibung |
| --- | --- | --- | --- |
| id * | path | string | |
### Beispiel

```
curl "https://api.sendtide.ch/v1/exports/exp_8kq2m4bt" \
  -H "Authorization: Bearer sk_test_…"
```
### Antworten
| Status | Beschreibung |
| --- | --- |
| 200 | The export Export |
| 404 | Fehler im üblichen Format, [Fehler und Limits](https://sendtide.ch/docs/fehler-und-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.
### Beispiel

```
curl -X POST "https://api.sendtide.ch/v1/account/export" \
  -H "Authorization: Bearer sk_test_…"
```
### Antworten
| Status | Beschreibung |
| --- | --- |
| 202 | Accepted Export |
| 403 | Fehler im üblichen Format, [Fehler und Limits](https://sendtide.ch/docs/fehler-und-limits/) |
