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

Canonical page: https://docs.99digital.co.il/partners-api/settings/webhook/online-event

# Event: Online

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

For every Online omnichannel event, you will get a webhook (`event` "online"). Fields that don't belong to the event (for example `inboxID` when an account is created) are empty strings.

**Settings:**

| Setting | Value |
| --- | --- |
| URL | Your URL — set it with [Set Webhook](https://docs.99digital.co.il/partners-api/settings/webhook/set-webhook) |
| Method | JSON via POST |

| `online_extra_info` | Sent by |
| --- | --- |
| 1 — new account | [Create a new online account](https://docs.99digital.co.il/partners-api/online/create-a-new-online-account), or the partners dashboard |
| 2 — active, 3 — suspended | [Update account](https://docs.99digital.co.il/partners-api/online/update-account) with `account_status` 1 or 0 |
| 4 — account deleted | [Delete an account](https://docs.99digital.co.il/partners-api/online/delete-an-account), or the partners dashboard |
| 5 — new WhatsApp inbox | [Create a new WhatsApp Inbox](https://docs.99digital.co.il/partners-api/online/create-a-new-whatsapp-inbox), or the partners dashboard |
| 6 — WhatsApp inbox deleted | [Delete a WhatsApp Inbox](https://docs.99digital.co.il/partners-api/online/delete-a-whatsapp-inbox), or the partners dashboard |
| 7 — agent login link | [Login to an agent](https://docs.99digital.co.il/partners-api/online/login-to-an-agent) |

**With every Online omnichannel event, you will get some of the following:**

```json
{
  "status": "OK",
  "event": "online",
  "accountID": 523,
  "inboxID": "",
  "agentID": 14,
  "server": "online",
  "online_reference": "5234-my-code",
  "online_extra_info": 1
}
```

### Response explained

| Parameter | Description / Example |
| --- | --- |
| `status` | "OK" always. |
| `event` | "online" always. |
| `accountID` | The account ID. |
| `inboxID` | The inbox ID — with `online_extra_info` 5 and 6. An empty string with the other events. |
| `agentID` | The agent ID — with `online_extra_info` 1 (the account's admin agent) and 7 (the agent of the login link). An empty string with the other events. |
| `server` | The server subdomain of the account. |
| `online_reference` | The reference value that was provided by you when creating the Online account (`online_extra_info` 1) or the WhatsApp inbox (5). An empty string with the other events. |
| `online_extra_info` | A number related to the Online update event — when will you get this webhook. See the values below. |

#### `online_extra_info`

| Value | Explanation |
| --- | --- |
| 1 | A new account was created. |
| 2 | The account status changed to "active". |
| 3 | The account status changed to "suspended". |
| 4 | The account was deleted. |
| 5 | A new WhatsApp inbox was created. |
| 6 | A WhatsApp inbox was deleted. |
| 7 | A new agent login link was created. |

## Webhook payload

Content type: `application/json` (required)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `status` | string | Yes | "OK" always. One of: `OK`. |
| `event` | string | Yes | "online" always. Always `online`. |
| `accountID` | integer | Yes | The account ID. Example: `523`. |
| `inboxID` | integer \| string | Yes | The inbox ID — with `online_extra_info` 5 and 6. An empty string with the other events. Example: `3`. |
| `agentID` | integer \| string | Yes | The agent ID — with `online_extra_info` 1 (the account's admin agent) and 7 (the agent of the login link). An empty string with the other events. Example: `14`. |
| `server` | string | Yes | The server subdomain of the account. Example: `online`. |
| `online_reference` | string | Yes | The reference value that was provided by you when creating the Online account (`online_extra_info` 1) or the WhatsApp inbox (5). An empty string with the other events. Example: `5234-my-code`. |
| `online_extra_info` | integer | Yes | A number related to the Online update event — when will you get this webhook. One of: `1` — A new account was created; `2` — The account status changed to "active"; `3` — The account status changed to "suspended"; `4` — The account was deleted; `5` — A new WhatsApp inbox was created; `6` — A WhatsApp inbox was deleted; `7` — A new agent login link was created. Example: `1`. |

### Example: Online

A new Online account was created (`online_extra_info` 1): `agentID` is its admin agent, and `inboxID` is empty.

```json
{
  "status": "OK",
  "event": "online",
  "accountID": 523,
  "inboxID": "",
  "agentID": 14,
  "server": "online",
  "online_reference": "5234-my-code",
  "online_extra_info": 1
}
```

## Responses

### 200 — Received. Answer with a 2xx status (200 OK) within 10 seconds, and process the webhook afterwards. The body of your answer is ignored.

### default — Any other answer, or no answer in time, is a failed delivery. There are no retries: a webhook that was not delivered is not sent again.
