Sign inGet Started

Create an Apple Messages for Business suppression

POST
/v1/amb/suppressions
const result = await bird.amb.suppressions.create({
  address: "opaque-customer",
  address_type: "opaque_user_id",
});
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"
}

Manually opens a suppression episode for a address, blocking every outbound path to it: operator and automated replies, API sends, typing indicators, and invitations. Set business_account_id to block the address for one brand only, or omit it to block the address for every brand in the workspace. If the address already has an active episode with reason manual, the API returns 200 with the existing episode instead of creating a second one.

Corps de la requête

business_account_id
string

Limit this manual block to one account. Omit to cover the same address across the workspace.

address
string
obligatoire

The phone number or opaque identifier to suppress. For a phone number, supply canonical E.164 with a leading plus sign.

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

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.