Create an Apple Messages for Business suppression
/v1/amb/suppressionsconst result = await bird.amb.suppressions.create({
address: "opaque-customer",
address_type: "opaque_user_id",
});
console.log(result);result = client.amb.suppressions.create(address='opaque-customer', address_type='opaque_user_id')
print(result)result, err := client.Amb.Suppressions.Create(ctx, bird.AmbSuppressionsCreateParams{Address: "opaque-customer", AddressType: "opaque_user_id"})
if err != nil {
log.Fatal(err)
}
fmt.Println(result)$bird->amb->suppressions->create((new Model\AMBSuppressionCreate())->setAddress('opaque-customer')->setAddressType('opaque_user_id'));bird amb suppressions create \
--address +15551234567 \
--address-type phone_numbercurl -X POST "https://us1.platform.bird.com/v1/amb/suppressions" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"address": "+15551234567",
"address_type": "phone_number"
}'{
"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_idLimit this manual block to one account. Omit to cover the same address across the workspace.
addressThe phone number or opaque identifier to suppress. For a phone number, supply canonical E.164 with a leading plus sign.
address_typeWhat kind of value address holds.
phone_numbermeansaddressis 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_idmeansaddressis 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
idbusiness_account_idaddressCanonical E.164 phone number, or the exact opaque identifier Apple supplied.
address_typeWhat kind of value address holds.
phone_numbermeansaddressis 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_idmeansaddressis 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
reasonWhy 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
originWho 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_toPaths blocked by this episode. Treat unknown values as blocking.
Possible values (may grow over time): all, invitations
source_message_idMessage whose permanent delivery failure opened the episode, when applicable.
source_event_idConversation event that opened the episode, when applicable.
source_end_message_idInbound message that ended an eligible automatic episode, when applicable.
effective_atWhen the blocking state took effect.
created_atWhen Bird recorded this episode.
ended_atWhen Bird recorded the end, or null while active.
ended_reasonWhat 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_atWhen the end took effect, or null while active.
Ressources associées
Poursuivez avec la documentation, les guides et les exemples sur ce sujet.