List email suppressions
/v1/email/suppressionsfor await (const suppression of bird.suppressions.list()) {
console.log(suppression.email, suppression.reason);
}for suppression in client.suppressions.list():
print(suppression.email, suppression.reason)for suppression, err := range client.Suppressions.List(context.Background(), bird.SuppressionsListParams{}) {
if err != nil {
log.Fatal(err)
}
fmt.Println(suppression.Email, suppression.Reason)
}foreach ($bird->suppressions->list() as $suppression) {
echo $suppression->getEmail(), ' ', $suppression->getReason(), PHP_EOL;
}bird email suppressions listcurl -X GET "https://us1.platform.bird.com/v1/email/suppressions" \
-H "Authorization: Bearer $TOKEN" \
--url-query "email=user@example.com" \
--url-query "limit=25"{
"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.
Query Parameters
emailstringCase-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.
reasonstringReturn 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_typestringReturn 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
limitintegerMaximum number of items to return per page.
starting_afterstringCursor from the next_cursor field of a previous list response. Returns items immediately after the cursor position in the current sort order.
ending_beforestringCursor 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.
Response Payload
dataPage of suppression records.
Show child attributes
data.iddata.emailThe suppressed address, stored lowercase.
data.scopeShow child attributes
data.scope.typeHow widely the email suppression applies. Responses use workspace. The values category, audience, topic, contact, and domain are reserved and have no records. The record's applies_to field determines which message categories are blocked.
Possible values: workspace, category, audience, topic, contact, domain
data.scope.idPublic ID or alias of the scoped resource. For workspace scope, this is the workspace ID.
data.reasonWhy the address is suppressed:
hard_bounce: A delivery permanently failed.complaint: The recipient reported a message as spam.manual: Added through the API or dashboard.unsubscribe: The recipient opted out. Deprecated, and no new record carries it: an opt-out is a messaging preference rather than a suppression. Legacy records remain visible until they are moved to messaging preferences.
An address can hold one record per reason. This list grows over time. Treat unknown values as informational rather than rejecting the record.
Possible values (may grow over time): hard_bounce, complaint, manual, unsubscribe
data.originHow the suppression came to exist:
bounce_event: Created automatically from a hard bounce.complaint_event: Created from a spam complaint.api_key: Added through the API with an API key.user: Added by a user in the dashboard.unsubscribe_event: The mailbox provider reported an opt-out. Deprecated withreason: unsubscribe.unsubscribe_link: The recipient used a Bird unsubscribe link. Deprecated withreason: unsubscribe.
This list grows over time. Treat unknown values as informational rather than rejecting the record.
Possible values (may grow over time): bounce_event, complaint_event, api_key, user, unsubscribe_event, unsubscribe_link
data.applies_toWhich sends the suppression blocks.
all: blocks every message category, including transactional.non_transactional: blocks marketing but allows transactional messages. A recipient who complained can therefore still receive mail such as password resets.category: scopes the block to a preference category and blocks every category until one is set.
This list grows over time, and any value other than non_transactional
blocks every category, so treat an unknown value as blocking the send.
Possible values (may grow over time): all, non_transactional, category
data.source_email_idID of the email that triggered suppression. Null for manual additions.
data.source_recipient_idID of the recipient event that triggered suppression. Null for manual additions.
data.created_atWhen the address was suppressed.
next_cursorCursor for the next page. Pass back as starting_after to advance forward. null when no next page exists.
prev_cursorCursor for the previous page. Pass back as ending_before to step backward. null when no previous page exists.
refresh_cursorRefresh 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.
Related resources
Continue with the documentation, guides and examples for this topic.