v1

latestOpenAPI 3.0.12026-07-2471135326.0 KB
Subscribers

Add Contact to Blocklist

This endpoint allows you to add a contact to the blocklist in the same request.

According to the type of delivery channel, the contact can be added to the blocklist with its corresponding Sender.

NOTE: if the contact is added in different senders, regardless of the delivery channel, the end user will be able to receive messages. Therefore, each sender has its own blocklist.

For more information how to add a contact to the blocklist, go to the Blocklisted Contact section.

post/v2/subscribers

Request body

tostring required
<p>Enter the contact data you want to add to the blocklist according to the sending entity and delivery channel.</p> <p>To add a contact to the blocklist via SMS, WhatsApp or RCS, you need to provide the phone number of the contact.</p><p>To add a contact to the blocklist via Email, you need to provide the email address of the contact.</p>
reasonstring required

Enter the reason why the contact is added to the blocklist.

type'SMS' | 'EMAIL' | 'WHATSAPP' | 'RCS' required
<p>Type of delivery channel, in which the contact will no longer receive messages.</p><p><ul><li><code>´SMS´</code></li><li><code>´EMAIL´</code></li><li><code>´WHATSAPP´</code></li><li><code>´RCS´</code></li></ul></p>
fromstring required
<p>Enter the sending identity (Sender) according to the delivery channel.</p> <p>Each sender has its own blocklist.</p>
listType'BLACK' required
<p>Type of list to which the contact is added.</p> <p><ul><li><code>´BLACK´</code></li></p>

Example request

{
  "to": "email@example.com",
  "reason": "LIST_CLEANUP|CONTACT_COMPLAINT|SUPPORT_REQUEST",
  "type": "SMS",
  "from": "from",
  "listType": "BLACK"
}

Response

new contact added

Example response

{
  "meta": {
    "timestamp": 1597166699457,
    "transactionId": "70169d77-c165-4795-9932-35b8a3af96fb",
    "explain": "a descriptive text"
  },
  "data": {
    "id": "507f1f77bcf86cd799439011",
    "to": "584000000001,email@example.com",
    "reason": "UNSUBSCRIBED, BOUNCED_PERMANENT,COMPLAINED"
  }
}