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 empty result does not establish that the address can receive mail. Read /v1/preferences?channel=email&handle= with the complete address to inspect its preferences, including Brand and sender scope. Subscribe to preference.revoked, preference.granted, and preference.deleted when maintaining a scoped preference mirror. Bird evaluates delivery policy after accepting a send.
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.
Brand-scoped spam complaints are recorded as preferences with origin complaint and do not appear in this list. Read /v1/preferences to inspect those opt-outs. Complaints without reliable Brand attribution and existing workspace-wide complaint suppressions remain here.
Query पैरामीटर
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
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.
संबंधित संसाधन
इस विषय के लिए दस्तावेज़, गाइड और उदाहरणों के साथ आगे बढ़ें।