Reference

Blocked addresses API

List, add, and remove blocked addresses, so your own unsubscribe list stays in sync.

On this page

Every request needs Authorization: Bearer with an API key. Errors use the shapes and codes in Errors and retry decisions. The OpenAPI document has the full schemas.

List suppressions

GET /v1/suppressions (listSuppressions)

Lists the blocked addresses Ternwire won't email, newest first: bounces, spam complaints and the ones you added.

Needs an API key with the send scope.

Query parameters

NameTypeRequiredNotes
cursorstringNo
limitintegerNoFrom 1 to 100. Default 25.
searchstringNoMatches part of the address At most 320 characters.
curl --request GET "https://ternwire.com/v1/suppressions" \
  --header "Authorization: Bearer $TERNWIRE_API_KEY"

Create suppression

POST /v1/suppressions (createSuppression)

Blocks an address, for example after someone unsubscribes in your app. Returns 201 when it is added and 200 when you already blocked it.

Needs an API key with the send scope.

Request body

NameTypeRequiredNotes
addressstringYesThe address to stop emailing Email address. At most 320 characters.
curl --request POST "https://ternwire.com/v1/suppressions" \
  --header "Authorization: Bearer $TERNWIRE_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
    "address": "ada@example.com"
  }'

Delete suppression

DELETE /v1/suppressions/{suppressionId} (deleteSuppression)

Unblocks the address, clearing its bounce and manual blocks. Returns 409 suppression_not_removable for an address that reported spam.

Needs an API key with the send scope.

Path parameters

NameTypeRequiredNotes
suppressionIdstringYes
curl --request DELETE "https://ternwire.com/v1/suppressions/{suppressionId}" \
  --header "Authorization: Bearer $TERNWIRE_API_KEY"