<!-- Generated from the canonical 99 Digital API documentation. Do not edit this file. -->

Canonical page: https://docs.99digital.co.il/online-api/webhooks/block-list-events

# Block-List Events

**Webhook.** Sent to the webhook URL you configure.

Online sends a block-list event to your webhook when a contact is [blocked](https://docs.99digital.co.il/online-api/contacts/block-contact) or [unblocked](https://docs.99digital.co.il/online-api/contacts/unblock-contact).

| 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](https://docs.99digital.co.il/online-api/webhooks/add-webhook) and choose its events in `subscriptions` |
| Method | JSON via POST |

**Example** — `block_list.contact_blocked`:

```json
{
  "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

Content type: `application/json` (required)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `event` | string | Yes | What happened. One of: `block_list.contact_blocked` — A contact was blocked; `block_list.contact_unblocked` — A contact was unblocked. |
| `account_id` | integer | No | The account ID. |
| `timestamp` | integer | No | When it happened (Unix time, seconds). |
| `contact` | object | No | The contact. |
| `contact.id` | integer | No | The contact ID. |
| `contact.phone_number` | string \| null | No | The phone number. |
| `contact.normalized_phone` | string \| null | No | The phone number in normalized form. |
| `source` | string | No | How the contact was blocked or unblocked. One of: `api` — With an access token, through the API; `manual` — Not through the API — for example by an agent in the dashboard. |
| `allow_unverified_ssl` | boolean | Yes | Added by Online to every payload. |

### Example (generated from the schema)

```json
{
  "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
}
```

## Responses

### 200 — Answer with any `2xx` status within 5 seconds. Online ignores the body of your answer, and does not send the event again.
