Block-List Events
Webhook
Online sends a block-list event to your webhook when a contact is blocked or unblocked.
| Subscription | Sent when |
|---|---|
block_list.contact_blocked | A contact was blocked. |
block_list.contact_unblocked | A contact was unblocked. |
Block-list events are account-wide: they are sent for every inbox, whatever
the webhook's inbox_ids.
Settings:
| Setting | Value |
|---|---|
| URL | Your webhook URL — create the webhook with Add Webhook and choose its events in subscriptions |
| Method | JSON via POST |
Example — block_list.contact_blocked:
{
"event": "block_list.contact_blocked",
"account_id": 12,
"timestamp": 1794471000,
"contact": {
"id": 801,
"phone_number": "+972501234567",
"normalized_phone": "972501234567"
},
"source": "api",
"allow_unverified_ssl": false
}
Payload explained
| Parameter | Description / Example |
|---|---|
event | What happened. See the values below. |
account_id | The account ID. |
timestamp | When it happened (Unix time, seconds). |
contact | The contact. |
source | How the contact was blocked or unblocked. See the values below. |
allow_unverified_ssl | Added by Online to every payload. |
event
| Value | Explanation |
|---|---|
| block_list.contact_blocked | A contact was blocked. |
| block_list.contact_unblocked | A contact was unblocked. |
source
| Value | Explanation |
|---|---|
| api | With an access token, through the API. |
| manual | Not through the API — for example by an agent in the dashboard. |
Webhook payload
Your response
- 200
Answer with any 2xx status within 5 seconds. Online ignores the body of your answer, and does not send the event again.