Sign inGet Started

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");
Odpowiedź200
{
  "id": "was_01krdgeqcxet5s7t44vh8rt9mg",
  "address": "+5511977670804",
  "waba": null,
  "reason": "manual",
  "origin": "user",
  "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.

Parametry

suppression_idstring

ID of the WhatsApp suppression record to retrieve or end.

Treść odpowiedzi

id
string
wymagane

Unique identifier for the suppression record.

address
string
wymagane

The suppressed WhatsApp address. For a phone number this is canonical E.164 with a leading plus sign, such as +5511977670804.

waba
nullable string
wymagane

The WhatsApp Business Account this stops, identified by its WhatsApp-issued account ID. Null when it stops the address for every account in the workspace, whichever one sends.

reason
string
wymagane

Why the address cannot be messaged:

  • manual: Your workspace added the suppression through the API or the dashboard, and can end it.

Possible values (may grow over time): manual

origin
string
wymagane

How the suppression came to exist:

  • api_key: an API call.
  • user: someone acting in the dashboard.

Kept beside the reason because one reason can arrive by more than one route.

Possible values (may grow over time): api_key, user

applies_to
string
wymagane

Message categories blocked for this address. all blocks every category, including authentication and transactional messages, and is the only value in use. Treat unrecognized values as blocking every category.

Possible values (may grow over time): all

blocking
boolean
wymagane

Whether this is stopping messages right now. Always true in a list, which carries only the suppressions in force; false when you fetch one by ID that has since ended, which is also when ended_at is set.

source_whatsapp_id
nullable string
wymagane

The WhatsApp message a suppression was opened from. Null for a manual suppression, and Bird records no other kind today, so this is null on every record.

effective_at
string
wymagane

When the suppression took effect. For one added through the API or the dashboard this is when it was added, so it matches created_at. This is what orders the list.

ended_at
nullable string
wymagane

When this stopped applying. Null while it is still stopping messages.

ended_reason
nullable string
wymagane

What ended it:

  • api_key: an API call.
  • user: someone acting in the dashboard.

Null while the suppression is still stopping messages.

Possible values (may grow over time): api_key, user

ended_effective_at
nullable string
wymagane

When the end took effect. For one ended through the API or the dashboard this matches ended_at. Null while it is still stopping messages.

created_at
string
wymagane

When we recorded it.

last_asserted_at
string
wymagane

When we last recorded this suppression being stated. Later than created_at when your workspace added it again while it was already in force; a repeat adds no new record.

Przejdź do dokumentacji, przewodników i przykładów dotyczących tego tematu.