If you want to temporary block a contact from receiving messages you can do so by using the blocking feature managed by our API. Reach out to your Success Manager to get it activated on your account.
When you block a contact you'll set an end date and until that date, no messages will be sent. You can release a block if necessary.
You can also use the Event Hub for blocking contacts.
Setup
To block a contact use the following method:
PUT /{customerid}/lists/contacts/tempblock
You can find a contact by:
- ORIGINALID
- EMAILADDRESS
And specify where the contact is be stored:
- <listId> (a specific list)
- -1 (any list)
Then add the unique search value (the contact's original ID or email address) and the end date for the block.
Example DTO 1
Search for a specific Original Id (111) on all lists (-1) and block the contact until February 1, 2020.
{
"findBy":"ORIGINALID",
"listId":"-1",
"searchValue":"111",
"blockUntil":"2020-02-01"
}
Example DTO 2
Search for a specific Original Id (111) on the list with ID 42 and block the contact until February 1, 2020.
{
"findBy":"ORIGINALID",
"listId":"42",
"searchValue":"111",
"blockUntil":"2020-02-01"
}
Example DTO 3
Search for a specific emailaddress (lady_gaga@example.com) on all lists (-1) and block the contact until February 1, 2020.
{
"findBy":"EMAILADRESS",
"listId":"-1",
"searchValue":"lady_gaga@example.com",
"blockUntil":"2020-02-01"
}
Example DTO 4
Search for a specific emailaddress (lady_gaga@example.com) on the list with ID 42 and block the contact until February 1, 2020.
{
"findBy":"EMAILADRESS",
"listId":"42",
"searchValue":"lady_gaga@example.com",
"blockUntil":"2020-02-01"
}
Releasing a block
To release a block you simply POST one of the DTOs above and leave blockUntil empty.
{
"findBy":"EMAILADRESS",
"listId":"42",
"searchValue":"lady_gaga@example.com",
"blockUntil":""
}
Get a blocked status
To get information about the blocked status of a contact you can use the method
GET /{customerid}/lists/contacts/tempblock
and one of the above DTOs but remove blockUntil:
{
"findBy":"EMAILADRESS",
"listId":"42",
"searchValue":"lady_gaga@example.com",
}