Sendry Docs
API Reference

Unsubscribes

Manage global and list-level unsubscribes so addresses are excluded from sends.

The unsubscribe list records addresses that should not receive email. A record with no list_id is a global unsubscribe; a record with a list_id suppresses the address only for that mailing list. Sendry checks this list before sending.


List unsubscribes

GET /v1/unsubscribes

Requires read_only scope. Results are ordered by created_at, newest first.

Query parameters

ParameterTypeDefaultDescription
limitnumber50Results per page (1-100).
cursorstringPagination cursor from the previous response's next_cursor.
emailstringFilter by email address.
list_idstringFilter by mailing list ID.

Response

{
  "data": [
    {
      "id": "unsub_abc123",
      "email": "user@example.com",
      "list_id": "newsletter",
      "reason": "manual",
      "created_at": "2025-03-12T09:00:00Z"
    }
  ],
  "has_more": false,
  "next_cursor": null
}

Add to unsubscribe list

POST /v1/unsubscribes

Requires sending_access scope. Inserting an address that is already unsubscribed is a no-op.

Request body

FieldTypeRequiredDescription
emailstringYesEmail address to unsubscribe.
list_idstringNoMailing list identifier for a list-level unsubscribe. Null means global.
reasonstringNoReason for unsubscribing. Defaults to manual.

Example request

{
  "email": "user@example.com",
  "list_id": "newsletter",
  "reason": "no longer interested"
}

Response

{
  "id": "unsub_abc123",
  "email": "user@example.com",
  "list_id": "newsletter",
  "reason": "no longer interested",
  "created_at": "2025-03-12T09:00:00Z"
}

Batch add to unsubscribe list

POST /v1/unsubscribes/batch

Requires sending_access scope. Accepts up to 1,000 addresses at a time.

Request body

FieldTypeRequiredDescription
emailsstring[]YesEmail addresses to unsubscribe (1-1000 items).
list_idstringNoMailing list identifier applied to every address.
reasonstringNoReason applied to every address. Defaults to manual.

Example request

{
  "emails": ["user@example.com", "other@example.com"],
  "list_id": "newsletter",
  "reason": "batch import"
}

Response

{
  "inserted": 2
}

Get unsubscribe record

GET /v1/unsubscribes/:id

Requires read_only scope.

Response

{
  "id": "unsub_abc123",
  "email": "user@example.com",
  "list_id": "newsletter",
  "reason": "manual",
  "created_at": "2025-03-12T09:00:00Z"
}

Remove from unsubscribe list

DELETE /v1/unsubscribes/:id

Requires sending_access scope. Removing a record lets future sends reach the address again.

Response

{
  "deleted": true
}

On this page