Sign inGet Started

Get an Apple Messages for Business suppression

GET
/v1/amb/suppressions/{suppression_id}
const result = await bird.amb.suppressions.get(
  "asp_01krdgeqcxet5s7t44vh8rt9mg",
);
console.log(result);
Réponse200
{
  "id": "asp_01krdgeqcxet5s7t44vh8rt9mg",
  "business_account_id": "abz_01krdgeqcxet5s7t44vh8rt9mg",
  "address": "+15551234567",
  "address_type": "opaque_user_id",
  "reason": "manual",
  "origin": "user",
  "applies_to": "all",
  "source_message_id": "amb_01krdgeqcxet5s7t44vh8rt9mg",
  "source_event_id": "aev_01krdgeqcxet5s7t44vh8rt9mg",
  "source_end_message_id": "amb_01krdgeqcxet5s7t44vh8rt9mg",
  "ended_reason": "user"
}

Returns the suppression episode for the given ID, including one that has already ended. An ended episode keeps its dates and reports when and how it ended.

Paramètres

suppression_idstring

Contenu de la réponse

id
string
obligatoire
business_account_id
nullable string
obligatoire
address
string
obligatoire

Canonical E.164 phone number, or the exact opaque identifier Apple supplied.

address_type
string
obligatoire

What kind of value address holds.

  • phone_number means address is the customer's phone number. Apple's CloseSession event carries a phone number rather than an opaque identifier, so a suppression opened by a close on a conversation identified by phone number takes this kind.
  • opaque_user_id means address is the opaque identifier Apple assigns to the customer's conversation with the business, stable across a close and a later re-initiation.

Possible values: phone_number, opaque_user_id

reason
string
obligatoire

Why the handle is suppressed. manual means it was added directly through this API or the dashboard. opted_out covers every case where Apple or the customer signaled they should not be contacted: a close, a permanent delivery failure, a declined invitation, or a stop keyword. This list grows over time, so treat an unknown value as informational rather than rejecting the record.

Possible values (may grow over time): manual, opted_out

origin
string
obligatoire

Who created the episode. user and api_key identify manual blocks. close_session and gone are protected automatic conversation facts. Phone invitation opt-outs are recorded as preferences.

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

applies_to
string
obligatoire

Paths blocked by this episode. Treat unknown values as blocking.

Possible values (may grow over time): all, invitations

source_message_id
string

Message whose permanent delivery failure opened the episode, when applicable.

source_event_id
string

Conversation event that opened the episode, when applicable.

source_end_message_id
string

Inbound message that ended an eligible automatic episode, when applicable.

effective_at
string
obligatoire

When the blocking state took effect.

created_at
string
obligatoire

When Bird recorded this episode.

ended_at
nullable string
obligatoire

When Bird recorded the end, or null while active.

ended_reason
nullable string
obligatoire

What ended the episode, or null while active. Customers can end only manual episodes.

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

ended_effective_at
nullable string
obligatoire

When the end took effect, or null while active.

Poursuivez avec la documentation, les guides et les exemples sur ce sujet.