Get an SMS suppression
/v1/sms/suppressions/{suppression_id}const suppression = await bird.smsSuppressions.get("sup_abc123");
console.log(suppression.reason, suppression.blocking);suppression = client.sms_suppressions.get("sup_abc123")
print(suppression.reason, suppression.blocking)suppression, err := client.SmsSuppressions.Get(context.Background(), "sup_01j9x2k3m4n5p6q7r8s9t0v1w2")
if err != nil {
log.Fatal(err)
}
fmt.Println(suppression.Originator, suppression.Destination, *suppression.Blocking)$suppression = $bird->smsSuppressions->get('sup_abc123');
echo $suppression->getReason(), ' ', var_export($suppression->getBlocking(), true);bird sms suppressions get <suppression-id>curl -X GET "https://us1.platform.bird.com/v1/sms/suppressions/{suppression_id}" \
-H "Authorization: Bearer $TOKEN"{
"id": "ssu_01krdgeqcxet5s7t44vh8rt9mg",
"destination": "+15550001234",
"originator": "+15557654321",
"reason": "keyword_stop",
"origin": "keyword",
"applies_to": "all",
"source_sms_id": "sms_01krdgeqcxet5s7t44vh8rt9mg",
"ended_reason": "keyword_start",
"source_end_sms_id": "sms_01krdgeqcxet5s7t44vh8rt9mg"
}
Returns one suppression: the sender and subscriber it covers, why messages are stopped, how the record came to exist, what it blocks, 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 delete therefore stays readable. To find one when you only know the number, use GET /v1/sms/suppressions with the destination 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
iddestinationThe subscriber, in E.164 format.
originatorThe sender this stops. A suppression covers one sender, so your other senders still reach this subscriber. Opting out of one of your programs does not opt out of the others.
reasonoriginapplies_toblockingWhether 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_sms_idThe inbound message the subscriber opted out with, or the outbound message whose delivery report reported the opt-out. Null when neither applies.
effective_atWhen the subscriber opted out, as reported by whoever reported it. This is what orders one subscriber's history, and it can be earlier than created_at when a message reached us late.
ended_atWhen this stopped applying. Null while it is still stopping messages.
ended_reasonWhat ended it. Null while it is still stopping messages.
ended_effective_atWhen the subscriber opted back in, as reported. Null while it is still stopping messages.
source_end_sms_idThe inbound message the subscriber opted back in with, when there was one. Null while it is still stopping messages, and when something other than a start keyword ended it.
created_atWhen we recorded it.
last_asserted_atWhen we last recorded the subscriber opting out of this sender. Later than created_at when they texted a stop keyword again while already suppressed, which adds no new record but does earn another confirmation reply.
Related resources
Continue with the documentation, guides and examples for this topic.