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.
Paramètres de requête
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.
Contenu de la réponse
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.
Ressources associées
Poursuivez avec la documentation, les guides et les exemples sur ce sujet.