Get a WhatsApp suppression
GET
/v1/whatsapp/suppressions/{suppression_id}
// Resolves a record that has already ended, which the list leaves out.
const suppression = await bird.whatsapp.suppressions.get("was_01krdgeqcxet5s7t44vh8rt9mg");
console.log(suppression.reason, suppression.ended_at ?? "still in force");# Resolves a record that has already ended, which the list leaves out.
suppression = client.whatsapp.suppressions.get("was_01krdgeqcxet5s7t44vh8rt9mg")
print(suppression.reason, suppression.ended_at or "still in force")suppression, err := client.Whatsapp.Suppressions.Get(context.Background(), "was_01krdgeqcxet5s7t44vh8rt9mg")
if err != nil {
log.Fatal(err)
}
fmt.Println(suppression.Reason, suppression.EndedAt)// Resolves a record that has already ended, which the list leaves out.
$suppression = $bird->whatsapp->suppressions->get('was_01krdgeqcxet5s7t44vh8rt9mg');
echo $suppression->getReason(), ' ', $suppression->getEndedAt()?->format(DATE_ATOM) ?? 'still in force';bird whatsapp suppressions get <suppression-id>curl -X GET "https://us1.platform.bird.com/v1/whatsapp/suppressions/{suppression_id}" \
-H "Authorization: Bearer $TOKEN"Risposta200
{
"id": "was_01krdgeqcxet5s7t44vh8rt9mg",
"address": "+5511977670804",
"waba": null,
"reason": "manual",
"origin": "api_key",
"applies_to": "all",
"source_whatsapp_id": "wam_01krdgeqcxet5s7t44vh8rt9mg",
"ended_reason": "api_key"
}
Returns the suppression record for the given ID, including one that has already ended. An ended record keeps its dates and reports when and how it ended.
Parametri
suppression_id
string
Payload di risposta
id
string
obbligatorio
Unique identifier for the suppression record.
address
string
obbligatorio
The suppressed WhatsApp address. For a phone number this is canonical E.164 with a leading plus sign, such as +5511977670804.
waba
nullable string
The WhatsApp Business Account the suppression is limited to, identified by its WhatsApp-issued account ID, or null when it covers the whole workspace.
reason
string
obbligatorio
Why the address is suppressed. manual means it was added directly rather than created automatically from a delivery outcome. This list grows over time, so treat an unknown value as informational rather than rejecting the record.
Possible values (may grow over time): manual
origin
string
obbligatorio
How the suppression came to exist: api_key (added through the API with an API key) or user (added by a user in the dashboard). This list grows over time, so treat an unknown value as informational rather than rejecting the record.
Possible values (may grow over time): api_key, user
applies_to
string
obbligatorio
Blocking policy. all blocks every message category. Treat an unrecognized value as blocking.
Possible values (may grow over time): all
source_whatsapp_id
string
ID of the WhatsApp message that caused this address to be suppressed, when the suppression was created automatically. Omitted for addresses added manually.
ended_at
nullable string
When this stopped applying. Null while it is still stopping messages, which is the case for every record in the list.
ended_reason
nullable string
What ended it: api_key (deleted through the API with an API key) or user (deleted by a user in the dashboard). Null while it is still stopping messages. This list grows over time, so treat an unknown value as informational rather than rejecting the record.
Possible values (may grow over time): api_key, user
created_at
string
obbligatorio
When the suppression was created.
Risorse correlate
Prosegui con la documentazione, le guide e gli esempi per questo argomento. Le risorse sono in inglese.
Comprendi il concettoShould I use a Bird SDK or call the API directly?Segui il percorso di apprendimentoBuild your first integrationGuida all'implementazioneSend your first email
Ottieni un brief di implementazione