# API-Referenz: Sperrliste

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

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

6 Endpunkte der Gruppe «Sperrliste». Die Referenz stammt aus der englischen OpenAPI-Spezifikation und ist nicht übersetzt.
## List suppressed addresses

GET /v1/suppressions
### Parameter
| Name | Ort | Typ | Beschreibung |
| --- | --- | --- | --- |
| q | query | string | |
| reason | query | enum: bounce / complaint / unsubscribe / manual | |
| limit | query | integer | Page size. The default and the maximum depend on the endpoint (emails 50 up to 500, received mail 50 up to 200, audit up to 200, the others 100 up to 500 or 1000). Default: 100 |
| cursor | query | string | The next_cursor of the previous page. Opaque; pass it unchanged to the same endpoint with the same filters. |
| after veraltet | query | string | Deprecated, use cursor. The address to continue after. |
### Beispiel

```
curl "https://api.sendtide.ch/v1/suppressions" \
  -H "Authorization: Bearer sk_test_…"
```
### Antworten
| Status | Beschreibung |
| --- | --- |
| 200 | Addresses |
## Suppress an address

POST /v1/suppressions
With a category the address is only suppressed for mail of that category.
### Request-Body application/json
| Feld | Typ | Beschreibung |
| --- | --- | --- |
| address * | string (email) | |
| reason | enum: manual / unsubscribe | |
| category | string | Example: newsletter |
### Beispiel

```
curl -X POST "https://api.sendtide.ch/v1/suppressions" \
  -H "Authorization: Bearer sk_test_…" \
  -H "Content-Type: application/json" \
  -d '{"address":"anna@example.com","category":"newsletter"}'
```
### Antworten
| Status | Beschreibung |
| --- | --- |
| 201 | Added |
## Import a CSV of suppressed addresses

POST /v1/suppressions/import
Send the CSV as text/csv or as the file field of a multipart/form-data form (at most 16 MB, 100'000 rows, else 422 too_many_rows). Columns: email (or address), reason (manual, unsubscribe, bounce, complaint; default manual), category, created_at (RFC 3339 or YYYY-MM-DD), with a header row or in this order without one. Rows are deduplicated (address and category); addresses that are already listed stay as they are. Invalid rows are reported (the first 100), all others are imported.
### Request-Body text/csv
### Beispiel

```
curl -X POST "https://api.sendtide.ch/v1/suppressions/import" \
  -H "Authorization: Bearer sk_test_…" \
  -H "Content-Type: text/csv" \
  --data-binary @suppressions.csv
```
### Antworten
| Status | Beschreibung |
| --- | --- |
| 200 | Result |
| 422 | Fehler im üblichen Format, [Fehler und Limits](https://sendtide.ch/docs/fehler-und-limits/) |
## Export the suppression list as CSV

GET /v1/suppressions/export
Columns email,reason,category,created_at, streamed. A cell that starts with = + - or @ gets a leading quote, so a spreadsheet does not run it; the import removes it.
### Parameter
| Name | Ort | Typ | Beschreibung |
| --- | --- | --- | --- |
| reason | query | enum: bounce / complaint / unsubscribe / manual | |
### Beispiel

```
curl "https://api.sendtide.ch/v1/suppressions/export" \
  -H "Authorization: Bearer sk_test_…"
```
### Antworten
| Status | Beschreibung |
| --- | --- |
| 200 | The CSV |
## Allow up to 10'000 addresses again

POST /v1/suppressions/delete
Complaints stay on the list and are counted in locked. Removing bounce suppressions is limited to 100 per day and account (UTC day); a request that would go over the limit removes nothing and answers 429 suppression_removal_limit. The allowance is removals in listSuppressions.
### Request-Body application/json
| Feld | Typ | Beschreibung |
| --- | --- | --- |
| emails * | array | |
### Beispiel

```
curl -X POST "https://api.sendtide.ch/v1/suppressions/delete" \
  -H "Authorization: Bearer sk_test_…" \
  -H "Content-Type: application/json" \
  -d '{"emails":["anna@example.com"]}'
```
### Antworten
| Status | Beschreibung |
| --- | --- |
| 200 | Result |
| 429 | More bounce suppressions than today's allowance (suppression_removal_limit), nothing was removed |
## Allow an address again

DELETE /v1/suppressions/{address}
Removes the address for every category. A complaint cannot be removed (409 suppression_locked). Bounce suppressions can be removed 100 times per day and account (UTC day), then 429 suppression_removal_limit.
### Parameter
| Name | Ort | Typ | Beschreibung |
| --- | --- | --- | --- |
| address * | path | string | |
### Beispiel

```
curl -X DELETE "https://api.sendtide.ch/v1/suppressions/anna@example.org" \
  -H "Authorization: Bearer sk_test_…"
```
### Antworten
| Status | Beschreibung |
| --- | --- |
| 204 | Removed |
| 409 | The recipient complained |
| 429 | Today's allowance of bounce removals is used up (suppression_removal_limit) |
