Blocklisted Subscriber
It may happen that, occasionally, your customers are unhappy receiving your SMS, Email, WhatsApp, or RCS messages. And in times of data protection regulations and e-privacy changes, no one wants to mess with an unhappy customer, even malicious users or users with inappropriate behavior may also appear, which can cause problems for your campaigns.
One way to ensure particular recipients won’t be included in any upcoming campaigns (single or bulk messages) is to exclude them using the Blocklisted Subscriber API. Simply add selected phone numbers or emails to the blocklist.
Therefore, a Blocklist is a list of numbers and emails that is tied to a specific sender. All messages sent using any API credentials from this account are passed through this list. If the number is in the list, the message is not sent. It applies both to API calls and messages sent from the platform.
You can blocklist subscribers based on the delivery channel on which users do not want to receive messages:
- SMS
- RCS
Adding Subscriber to Blocklist
This endpoint allows you to add a subscriber to the blocklist in the same request.
According to the type of delivery channel, the subscriber can be added to the blocklist with its corresponding Sender.
For example, there are 3 delivery channels configured with their corresponding Senders:
Channel | Senders |
|---|---|
SMS |
|
|
As shown in the table above, let's unsubscribe (add to the blocklist) an end user from the “528811” sender number that corresponds to the SMS delivery channel. Once added to the blocklist, this end user won't receive any more messages via SMS from the “52881” sender, but they can still receive messages from the “141555549”. That is, if the subscriber is added to different senders, regardless of the delivery channel, the end user will be able to receive messages. Therefore, each sender has its own blocklist.
HTTP Request: POST /subscribers
In the following API call example, we are going to add 1 subscriber, whose phone number is “+525500000000”, to the blocklist from the “141555549” sender number that corresponds to the SMS delivery channel.
{
"to": "+525500000000",
"reason": "UNSUBSCRIBED",
"type": "SMS",
"from": "141555549",
"listType": "BLACK"
}The parameters presented in the request body example when adding the subscriber to the blocklist are the following:
| Parameter | Required | Description |
|---|---|---|
| to | Yes | Enter the subscriber data you want to add to the blocklist according to the sending entity and delivery channel. To add a subscriber to the blocklist via SMS, WhatsApp or RCS, you need to provide the phone number of the subscriber. To add a subscriber to the blocklist via Email, you need to provide the email address of the subscriber. |
| reason | Yes | Enter the reason why the subscriber is added to the blocklist. |
| type | Yes | Type of delivery channel, in which the subscriber will no longer receive messages.
|
| from | Yes | Enter the sending identity (Sender) according to the delivery channel. Each sender has its own blocklist. |
| listType | No | Type of list to which the subscriber is added.
|
When you added the subscriber to the blocklist, the response body contains the following data:
{
"meta": {
"timestamp": 1691605563383,
"transactionId": "7933b9dc-6b1f-46b7-9c77"
},
"data": {
"id": "64d3da3b27e58a0e93eefff7",
"to": "+525500000000",
"reason": "UNSUBSCRIBED",
"date": "2023-08-09T18:26:03.384279468Z"
}
}Parameters presented in the response body example when adding the subscriber to the blocklist are the following:
| Parameter | Description |
|---|---|
| data | Data contained once the subscriber was added to the blocklist. |
| data. id |
Unique identifier of the blocklisted subscriber. |
| data. to |
Subscriber data you want to add to the blocklist according to the sending entity and delivery channel. To add a subscriber to the blocklist via SMS, WhatsApp or RCS, you need to provide the phone number of the subscriber. To add a subscriber to the blocklist via Email, you need to provide the email address of the subscriber. |
| data. reason |
The reason why the subscriber was added to the blocklist. |
| data. date |
Date when the subscriber was added to the blocklist. |
Getting Subscriber from Blocklist
When the subscriber has been added to a specific list, we proceed to get the information of the subscriber that the blocklist contains. That is, this endpoint allows you to get a subscriber from a blocklist that belongs to a specific sender.
HTTP Request: GET /subscribers
To get subscriber information from a blocklist, you need to provide the following required parameters:
Required Parameter | Description |
|---|---|
type | Type of delivery channel, in which the subscriber no longer receives messages.
|
from | Sending identity (Sender) according to the delivery channel. Each sender has its own blocklist. |
listType | Type of list to which the subscriber is added.
|
to | Subscriber data is added to the blocklist according to the sending entity and delivery channel. Enter the Phone number of the subscriber in case the subscriber was added to the blocklist via SMS, WhatsApp, or RCS. Enter the email address of the subscriber in case the subscriber was added to the blocklist via Email. |
Once the API call is executed, from the response body, you can get the unique identifier ("data.id") of the blocklisted subscriber.
Updated 21 days ago
