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

# Webhook Events

> Get notified when RCS is sent, delivered, clicked, fails, or is cancelled.

<Tip>
  With the API you **ask**; with webhooks Notifique **tells you**. Great for marking campaigns as delivered or measuring button clicks, without polling.
</Tip>

## In brief

* Every delivery is a **POST** `application/json` to your registered URL.
* `rcs.*` events are **RCS only**, SMS uses `sms.*`, WhatsApp uses `message.*`.
* `instanceId` is **empty** (RCS does not use a channel instance).
* Enable **only** the events your integration needs.
* Respond **2xx quickly**; heavy processing goes to your queue.

General setup: [Webhooks](/en/guides/webhooks/index). Security (HMAC signature): [Webhook security](/en/guides/webhooks/seguranca).

***

## How the POST looks

```json theme={null}
{
  "event": "rcs.delivered",
  "workspaceId": "clxx123...",
  "instanceId": "",
  "timestamp": "2025-02-10T14:30:00.000Z",
  "data": {
    "rcsId": "clxx456...",
    "to": "5511999999999",
    "status": "DELIVERED",
    "deliveredAt": "2025-02-10T14:30:05.000Z"
  }
}
```

| Field         | Description                                 |
| ------------- | ------------------------------------------- |
| `event`       | Event name (e.g. `rcs.delivered`)           |
| `workspaceId` | Workspace ID                                |
| `instanceId`  | Always empty for RCS                        |
| `timestamp`   | ISO 8601, use for anti-replay               |
| `data`        | Send fields (`rcsId`, `to`, `status`, etc.) |

Headers: `X-Notifique-Signature`, `X-Notifique-Timestamp`, `X-Workspace-Id`, `X-Webhook-Event`.

***

## What your server should return

| Response                | Effect                               |
| ----------------------- | ------------------------------------ |
| **2xx** within \~10s    | Event delivered; removed from queue  |
| **4xx / 5xx / timeout** | Automatic retry (5 min, 30 min, 2 h) |

<Note>
  Slow processing? Return **200** immediately and process in the background.
</Note>

***

## Event reference

| Event           | When it fires                      | What to do with it    |
| --------------- | ---------------------------------- | --------------------- |
| `rcs.sent`      | RCS accepted and sent to network   | Mark as sent          |
| `rcs.delivered` | Delivered to device                | Confirm delivery      |
| `rcs.clicked`   | Short-link or button click         | Campaign / conversion |
| `rcs.failed`    | Failure (number without RCS, etc.) | SMS fallback or alert |
| `rcs.cancelled` | Schedule cancelled before send     | Update queue          |

***

## Payload per event

<AccordionGroup>
  <Accordion title="rcs.sent">
    ```json theme={null}
    {
      "event": "rcs.sent",
      "workspaceId": "clxx123...",
      "instanceId": "",
      "timestamp": "2025-02-10T14:29:00.000Z",
      "data": {
        "rcsId": "clxx456...",
        "to": "5511999999999",
        "status": "SENT",
        "sentAt": "2025-02-10T14:29:00.000Z",
        "messageType": "BASIC"
      }
    }
    ```
  </Accordion>

  <Accordion title="rcs.delivered">
    ```json theme={null}
    {
      "event": "rcs.delivered",
      "workspaceId": "clxx123...",
      "instanceId": "",
      "timestamp": "2025-02-10T14:30:00.000Z",
      "data": {
        "rcsId": "clxx456...",
        "to": "5511999999999",
        "status": "DELIVERED",
        "deliveredAt": "2025-02-10T14:30:05.000Z"
      }
    }
    ```
  </Accordion>

  <Accordion title="rcs.clicked">
    Fires on the **first** tracked short-link or button click for this send.

    ```json theme={null}
    {
      "event": "rcs.clicked",
      "workspaceId": "clxx123...",
      "instanceId": "",
      "timestamp": "2025-02-10T14:35:00.000Z",
      "data": {
        "rcsId": "clxx456...",
        "to": "5511999999999",
        "status": "CLICKED",
        "clickedAt": "2025-02-10T14:35:00.000Z"
      }
    }
    ```
  </Accordion>

  <Accordion title="rcs.failed">
    Best practice: trigger fallback (SMS, email) when the number does not support RCS.

    ```json theme={null}
    {
      "event": "rcs.failed",
      "workspaceId": "clxx123...",
      "instanceId": "",
      "timestamp": "2025-02-10T14:29:30.000Z",
      "data": {
        "rcsId": "clxx456...",
        "to": "5511999999999",
        "status": "FAILED",
        "failedAt": "2025-02-10T14:29:30.000Z",
        "errorMessage": "rcs_not_supported"
      }
    }
    ```
  </Accordion>

  <Accordion title="rcs.cancelled">
    ```json theme={null}
    {
      "event": "rcs.cancelled",
      "workspaceId": "clxx123...",
      "instanceId": "",
      "timestamp": "2025-02-10T12:00:00.000Z",
      "data": {
        "rcsId": "clxx456...",
        "to": "5511999999999",
        "status": "CANCELLED"
      }
    }
    ```
  </Accordion>
</AccordionGroup>

***

## Next steps

* [Quick Start](/en/rcs-api/como-funciona/quick-start): first send
* [Introduction](/en/rcs-api/como-funciona/introducao): status lifecycle
* [Scopes](/en/rcs-api/como-funciona/escopos-da-api-key): key permissions
* [Webhooks (general guide)](/en/guides/webhooks/index)
