> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ycloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# WhatsApp Calling  Status  Update Webhook Examples

> Handle WhatsApp call status updates.

<Note>For the exhaustive schema-derived catalog, see [all examples](/en/api-reference/guides/examples/webhook-examples/webhook-payload-examples).</Note>

## What it is

Handle WhatsApp call status updates.

## Before you begin

* Create a public HTTPS endpoint in your application.
* Configure a YCloud webhook endpoint for the event types you need.
* Store the endpoint signing secret securely.
* Make event processing idempotent.

## How it works

YCloud sends an HTTP `POST` request when the event occurs. Verify the signature, durably record the event, return a `2xx` response, and process slow work asynchronously.

## Request

The scenarios below show requests delivered to your webhook URL. Treat the event `id` as the delivery identifier and use `type` to route the payload.

## Response

Return a `2xx` status after accepting the event.

```http theme={"theme":{"light":"github-light","dark":"github-dark"}}
HTTP/1.1 200 OK
```

<Note>For endpoint setup, signature validation, and retry behavior, see [Configure webhooks](/en/api-reference/guides/api-fundamentals/configure-webhooks).</Note>

<br />

When a business calls a WhatsApp user, it receives a status webhook with the call state: RINGING, ACCEPTED, or REJECTED.

## Business initiated call is ringing the user

When the WhatsApp user’s client device begins ringing:

### Request

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
 "id": "evt_676e5ab57a9cb742d02d7646",
 "type": "whatsapp.call.status.updated",
 "apiVersion": "v2",
 "createTime": "2024-12-27T07:41:28.422Z",
 "callingStatusUpdated": {
   "wabaId": "188234691048809",
   "wacid": "wacid.HBgNNjI4MTM2MTkwNTEzMxUCABE",
   "status": "RINGING",
   "recipientPhone": "+6281361905133",
   "recipientUserId" : "ID.13491208655302741918",
   "parentRecipientUserId": "ID.11815799212886844830"
 }
}
```

### Response

Acknowledge the delivery after durably accepting the event.

```http theme={"theme":{"light":"github-light","dark":"github-dark"}}
HTTP/1.1 200 OK
```

<br />

### Explanation

Route the event by `type`, deduplicate it by `id`, and move slow or failure-prone work to an asynchronous processor.

## Business initiated call is accepted by the user

When the WhatsApp user accepts the call:

### Request

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
 "id": "evt_67724ad42b4b206adc55f099",
 "type": "whatsapp.call.status.updated",
 "apiVersion": "v2",
 "createTime": "2024-12-27T07:42:00.577Z",
 "callingStatusUpdated": {
   "wabaId": "188234691048809",
   "wacid": "wacid.HBgNNjI4MTM2MTkwNTEzMxUCABE",
   "status": "ACCEPTED",
   "recipientPhone": "+6281361905133",
   "recipientUserId" : "ID.13491208655302741918",
   "parentRecipientUserId": "ID.11815799212886844830"
 }
}
```

### Response

Acknowledge the delivery after durably accepting the event.

```http theme={"theme":{"light":"github-light","dark":"github-dark"}}
HTTP/1.1 200 OK
```

<br />

### Explanation

Route the event by `type`, deduplicate it by `id`, and move slow or failure-prone work to an asynchronous processor.

## Business initiated call is rejected by the user

When the call is rejected by the WhatsApp user. You'll also receive the call terminate webhook in this case:

### Request

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
 "id": "evt_677258526a15af2a8c7184a3",
 "type": "whatsapp.call.status.updated",
 "apiVersion": "v2",
 "createTime": "2024-12-27T07:41:32.093Z",
 "callingStatusUpdated": {
   "wabaId": "188234691048809",
   "wacid": "wacid.HBgNNjI4MTM2MTkwNTEzMxUCAB",
   "status": "REJECTED",
   "recipientPhone": "+6281361905133",
   "recipientUserId" : "ID.13491208655302741918",
   "parentRecipientUserId": "ID.11815799212886844830"
 }
}
```

### Response

Acknowledge the delivery after durably accepting the event.

```http theme={"theme":{"light":"github-light","dark":"github-dark"}}
HTTP/1.1 200 OK
```

### Explanation

Route the event by `type`, deduplicate it by `id`, and move slow or failure-prone work to an asynchronous processor.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.