Get an Apple Messages for Business suppression
/v1/amb/suppressions/{suppression_id}const result = await bird.amb.suppressions.get(
"asp_01krdgeqcxet5s7t44vh8rt9mg",
);
console.log(result);result = client.amb.suppressions.get('asp_01krdgeqcxet5s7t44vh8rt9mg')
print(result)result, err := client.Amb.Suppressions.Get(ctx, "asp_01krdgeqcxet5s7t44vh8rt9mg")
if err != nil {
log.Fatal(err)
}
fmt.Println(result)$bird->amb->suppressions->get('asp_01krdgeqcxet5s7t44vh8rt9mg');bird amb suppressions get <suppression-id>curl -X GET "https://us1.platform.bird.com/v1/amb/suppressions/{suppression_id}" \
-H "Authorization: Bearer $TOKEN"{
"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",
"ended_reason": "user",
"source_end_message_id": "amb_01krdgeqcxet5s7t44vh8rt9mg"
}
Returns one suppression: the address and business account it covers, why messages are stopped, how the record came to exist, what it stops, and whether it is still in force.
This operation also returns a suppression that has already ended. The blocking field is false, and the ended_* fields say when and why. An ID you kept from a create or a list therefore stays readable. To find one when you only know the address, use GET /v1/amb/suppressions with the address parameter. An ID that does not exist in the workspace returns 404.
Parameters
suppression_idstringID of the suppression, as returned when it was created or listed.
Response Payload
idbusiness_account_idThe business account this stops. Null when it stops the address for every account in the workspace. A workspace-wide suppression covers the same address everywhere; it does not link the different opaque identifiers one person holds with different accounts.
addressThe customer: a phone number in E.164 format, or the exact opaque identifier Apple supplied. address_type says which.
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 messages are stopped. manual means your workspace added it through this API or the dashboard. opted_out means the customer or Apple signaled they should not be contacted, such as a close of the conversation. 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
originHow the suppression came to exist:
user: someone acting in the dashboard.api_key: an API call.close_session: Apple reporting that the customer closed the conversation.gone: Apple refusing a send because the customer had closed the conversation.
user and api_key are the manual suppressions, the ones you can end. The two closes are
the customer's own statement and end when they return. A customer declining or opting out of
invitations by phone number is recorded as a preference rather than here.
Possible values (may grow over time): user, api_key, close_session, gone
applies_toWhat this stops. all stops every outbound path to the address: operator and automated replies, API sends, typing indicators and invitations. invitations stops invitations to the phone number and leaves an open conversation reachable. Treat unrecognized values as stopping everything.
Possible values (may grow over time): all, invitations
blockingWhether this is stopping messages right now; applies_to says what it stops. 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_message_idThe outbound message Apple refused because the customer had closed the conversation, when that is what opened this. Null for a close Apple reported and for a manual suppression.
source_event_idThe conversation event recording the close Apple reported, when that is what opened this. Null for a refused send and for a manual suppression.
effective_atWhen the customer closed the conversation, as reported by Apple; when Apple refused a send because the conversation was closed; or when a manual suppression was added. This is what orders the list, and it can differ from created_at: earlier when a close reached us late, later when the customer closed the conversation again while this was in force, which moves it to that later close.
created_atWhen we recorded it.
last_asserted_atWhen 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.
ended_atWhen this stopped applying. Null while it is still stopping messages.
ended_reasonWhat ended it:
user: someone acting in the dashboard.api_key: an API call.reinitiated: the customer returning to the conversation they had closed.
A user or an API call can end a manual suppression and nothing else; a close is the
customer's own statement and ends when they return.
Null while the suppression is in force.
Possible values (may grow over time): user, api_key, reinitiated
ended_effective_atWhen the customer returned to the conversation, as reported by Apple, or when your workspace ended it. Null while it is still stopping messages.
source_end_message_idThe message the customer returned with, when there was one. Null while it is still stopping messages, and when something other than a customer message ended it: your workspace ending it, or the customer returning by accepting an invitation.
Related resources
Continue with the documentation, guides and examples for this topic.