Sign inGet Started

List email suppressions

GET
/v1/email/suppressions
for await (const suppression of bird.suppressions.list()) {
  console.log(suppression.email, suppression.reason);
}
Réponse200
{
  "data": [
    {
      "id": "sup_01krdgeqcxet5s7t44vh8rt9mg",
      "email": "user@example.com",
      "scope": {
        "type": "workspace",
        "id": "ws_01krdgeqcxet5s7t44vh8rt9mg"
      },
      "reason": "hard_bounce",
      "origin": "bounce_event",
      "applies_to": "all",
      "source_email_id": "em_01krdgeqcxet5s7t44vh8rt9mg",
      "source_recipient_id": "er_01krdgeqcxet5s7t44vh8rt9mg"
    }
  ],
  "next_cursor": "eyJ2IjoxLCJzIjoiXCIyMDI2LTA1LTI1VDE0OjAzOjEwWlwiIiwiaSI6IjAxOTJmM2IxLTRjN2UtN2EyYi05ZDYxLThmM2E1YzJlN2I0MCJ9",
  "prev_cursor": null,
  "refresh_cursor": "eyJ2IjoxLCJzIjoiXCIyMDI2LTA1LTI1VDE2OjQyOjAxWlwiIiwiaSI6IjAxOTJmM2IxLTllMDQtN2NkMy1iODE3LTJhNmY0ZDFjOGUwOSJ9"
}

Returns the workspace's suppressed email addresses as a paginated list, newest first. Pass an address in the email parameter to narrow the page to that address.

The email filter matches by prefix rather than exactly, so bob@example.com also returns a suppressed bob@example.com.au. Compare the email on each record before treating the address you asked about as suppressed.

An address can appear more than once because Bird keeps one suppression record per reason. Delivery stays blocked while any blocking record for the address remains.

Paramètres de requête

emailstring

Case-insensitive prefix filter on the address. Returns every suppression whose address starts with this value. A full address finds that address's records, while a fragment such as alice finds every address beginning with it. The same address can match several records, one per suppression reason.

reasonstring

Return only suppressions with this reason:

  • hard_bounce: Delivery permanently failed.
  • complaint: The recipient reported a message as spam.
  • unsubscribe: The recipient opted out. Deprecated: unsubscribes are now recorded as messaging preferences rather than suppressions, so no new records carry this reason. The filter returns legacy records until they are moved to messaging preferences.
  • manual: Added through the API or dashboard.

Possible values: hard_bounce, complaint, unsubscribe, manual

scope_typestring

Return only suppressions with this scope.

Every suppression is workspace-wide, so workspace returns all of them without narrowing the results. The other five values, category, audience, topic, contact and domain, always come back with an empty page.

Possible values: workspace, category, audience, topic, contact, domain

limitinteger

Maximum number of items to return per page.

starting_afterstring

Cursor from the next_cursor field of a previous list response. Returns items immediately after the cursor position in the current sort order.

ending_beforestring

Cursor from the prev_cursor or refresh_cursor field of a previous list response. Returns items immediately before the cursor position in the current sort order. prev_cursor returns the preceding page. refresh_cursor anchors at the first row of that response, which on a newest-first sort is how to fetch the items that have appeared since.

Contenu de la réponse

data
array of object
obligatoire

Page of suppression records.

Afficher les attributs enfants
next_cursor
nullable string
obligatoire

Cursor for the next page. Pass back as starting_after to advance forward. null when no next page exists.

prev_cursor
nullable string
obligatoire

Cursor for the previous page. Pass back as ending_before to step backward. null when no previous page exists.

refresh_cursor
nullable string
obligatoire

Refresh anchor, the first row of this response. Pass back as ending_before to fetch what precedes it in the current sort order. On a newest-first sort those are the items that have appeared since; on any other sort they are the items that sort earlier, so refreshing such a list means re-fetching it instead. Non-null whenever data is non-empty; null only on an empty page. Distinct from prev_cursor.