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

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

# Event: WhatsApp

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

For every WhatsApp event that happens in the partners system, you will get a webhook (`event` "whatsapp"): during the onboarding of a WhatsApp number through an onboarding link, and when a WhatsApp account is deleted.

**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 |

`whatsapp_extra_info` tells you what happened:

- **1, 2 and 3** are sent during the onboarding of a number through the link
  you created with [Step 2: Onboarding](https://docs.99digital.co.il/partners-api/whatsapp/step-2-onboarding).
  They include `daily_limit` and `whatsapp_apiKey`.
- **4** is sent when the WhatsApp account is deleted, with
  [Delete WhatsApp Account](https://docs.99digital.co.il/partners-api/whatsapp/delete-whatsapp-account) or
  in the partners dashboard.
- **5** is sent when there was an error in the client's onboarding process,
  also when the client cancels or closes the Facebook login window of the
  onboarding.

The first webhook you will get after your client finishes the onboarding will
be with `whatsapp_extra_info` 1 or 2, and it will include the
`whatsapp_apiKey`. We recommend that you use it with
[Set Webhook](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) of the WhatsApp API (V2), in
order to start getting webhook updates regarding this WhatsApp account.

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

```json
{
  "status": "OK",
  "event": "whatsapp",
  "whatsapp": "972501234567",
  "whatsapp_reference": "1234567",
  "whatsapp_extra_info": 2,
  "daily_limit": 250,
  "whatsapp_apiKey": "3f9a1c-7b2e4d-c8a05f-61d9e2-b47c3a"
}
```

### Response explained

| Parameter | Description / Example |
| --- | --- |
| `status` | "OK" always. |
| `event` | "whatsapp" always. |
| `whatsapp` | The WhatsApp number that is relevant, in international format. |
| `whatsapp_reference` | The reference value that was provided by you when creating the account (`reference` in [Step 2: Onboarding](https://docs.99digital.co.il/partners-api/whatsapp/step-2-onboarding)). Empty when you didn't provide one; when such an account is deleted (`whatsapp_extra_info` 4), it is "0". |
| `whatsapp_extra_info` | A number related to the WhatsApp update — when will you get this webhook. See the values below. |
| `daily_limit` | The daily business conversations limit this line can have right from the start. Sent only with `whatsapp_extra_info` 1, 2 or 3. See the values below. |
| `whatsapp_apiKey` | The apiKey that was created for you, to use the [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) (V2) with this number. Sent only with `whatsapp_extra_info` 1, 2 or 3. |

#### `whatsapp_extra_info`

| Value | Explanation |
| --- | --- |
| 1 | The client has finished the onboarding process through the link, but the account is not yet ready to start messaging at all. |
| 2 | The client has finished the onboarding process through the link, and the account is ready to start receiving and replying to messages only. |
| 3 | The WhatsApp account is ready to start sending templates and receiving messages. Onboarding completed. |
| 4 | The WhatsApp account has been deleted. |
| 5 | There was an error on the client's onboarding process (also sent when the client cancels or closes the Facebook login window). Please contact your client to provide support. |

#### `daily_limit`

| Value | Explanation |
| --- | --- |
| 0 | The daily messages limit was not determined yet. Please send your first outgoing message or template and you will get a webhook with an update. |
| 50 | 50 daily conversations. |
| 250 | 250 daily conversations (this is usually the default when the business is not verified). |
| 1000 | 1,000 daily conversations. |
| 2000 | 2,000 daily conversations (this is usually the default when the business is verified). |
| 10000 | 10,000 daily conversations. |
| 100000 | 100,000 daily conversations. |
| 1000000 | If you get this number, it means unlimited. |

## Webhook payload

Content type: `application/json` (required)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `status` | string | Yes | "OK" always. One of: `OK`. |
| `event` | string | Yes | "whatsapp" always. Always `whatsapp`. |
| `whatsapp` | string | Yes | The WhatsApp number that is relevant, in international format. Example: `972501234567`. |
| `whatsapp_reference` | string | Yes | The reference value that was provided by you when creating the account (`reference` in [Step 2: Onboarding](https://docs.99digital.co.il/partners-api/whatsapp/step-2-onboarding)). Empty when you didn't provide one; when such an account is deleted (`whatsapp_extra_info` 4), it is "0". Example: `1234567`. |
| `whatsapp_extra_info` | integer | Yes | A number related to the WhatsApp update — when will you get this webhook. One of: `1` — The client has finished the onboarding process through the link, but the account is not yet ready to start messaging at all; `2` — The client has finished the onboarding process through the link, and the account is ready to start receiving and replying to messages only; `3` — The WhatsApp account is ready to start sending templates and receiving messages. Onboarding completed; `4` — The WhatsApp account has been deleted; `5` — There was an error on the client's onboarding process (also sent when the client cancels or closes the Facebook login window). Please contact your client to provide support. Example: `2`. |
| `daily_limit` | integer | No | The daily business conversations limit this line can have right from the start. Sent only with `whatsapp_extra_info` 1, 2 or 3. One of: `0` — The daily messages limit was not determined yet. Please send your first outgoing message or template and you will get a webhook with an update; `50` — 50 daily conversations; `250` — 250 daily conversations (this is usually the default when the business is not verified); `1000` — 1,000 daily conversations; `2000` — 2,000 daily conversations (this is usually the default when the business is verified); `10000` — 10,000 daily conversations; `100000` — 100,000 daily conversations; `1000000` — If you get this number, it means unlimited. Example: `250`. |
| `whatsapp_apiKey` | string | No | The apiKey that was created for you, to use the [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) (V2) with this number. Sent only with `whatsapp_extra_info` 1, 2 or 3. Example: `3f9a1c-7b2e4d-c8a05f-61d9e2-b47c3a`. |

### Example: WhatsApp

The client finished the onboarding, and the account is ready to receive and reply to messages (`whatsapp_extra_info` 2).

- `daily_limit` and `whatsapp_apiKey` come only with
  `whatsapp_extra_info` 1, 2 and 3.
- When the account is deleted (4) or the onboarding failed (5), the
  webhook has only `status`, `event`, `whatsapp`,
  `whatsapp_reference` and `whatsapp_extra_info`.

```json
{
  "status": "OK",
  "event": "whatsapp",
  "whatsapp": "972501234567",
  "whatsapp_reference": "1234567",
  "whatsapp_extra_info": 2,
  "daily_limit": 250,
  "whatsapp_apiKey": "3f9a1c-7b2e4d-c8a05f-61d9e2-b47c3a"
}
```

## 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.
