Documentation
Sign inGet started

Add an SMS suppression

POST
/v1/sms/suppressions
// A suppression covers one sender and one subscriber, so stopping every sender
// means one call per sender.
const suppression = await bird.smsSuppressions.add({
  destination: "+15550001234",
  originator: "+15557654321",
});
console.log(suppression.id);
Stops a sender's messages to a subscriber, with reason manual, blocking every category including transactional. Both ends are required: a suppression covers a sender-and-subscriber pair, so stopping all of your senders means one call per sender.
Adding is idempotent. A 201 means a new suppression was recorded, and a 200 means a manual one for that pair was already in place and is returned unchanged. A pair already stopped for another reason, such as the subscriber having texted a stop keyword, still gets its own manual record, and messages stay stopped until every one of them has ended.
Request Payload
destination
string
required
The subscriber to stop messaging, in E.164 format.
originator
string
required
The sender to stop. Your other senders keep reaching this subscriber, so stopping every one of them means one call per sender.
Response Payload
id
string
required
destination
string
required
The subscriber, in E.164 format.
originator
string
required
The sender this stops. A suppression covers one sender, so your other senders still reach this subscriber. Opting out of one of your programmes is not opting out of all of them.
reason
string
required
origin
string
required
applies_to
string
required
blocking
boolean
required
Whether 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_id
nullable string
The inbound message the subscriber opted out with, or the outbound message whose delivery report reported the opt-out. Null when neither applies.
effective_at
string
required
When 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_at
nullable string
When this stopped applying. Null while it is still stopping messages.
ended_reason
nullable string
What ended it. Null while it is still stopping messages.
ended_effective_at
nullable string
When the subscriber opted back in, as reported. Null while it is still stopping messages.
source_end_sms_id
nullable string
The 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_at
string
required
When we recorded it.
last_asserted_at
string
required
When 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.