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

# Webhooks

> Register URLs, receive real-time events, and inspect deliveries — via API or dashboard.

<Tip>
  A webhook is the **doorbell on your server**: when something changes at Notifique, the API rings with a JSON POST to your URL.
</Tip>

## What is it?

An **HTTPS URL** on your system that receives automatic notifications: message sent, delivered, customer reply, instance disconnected, short link click…

With Platform API you **create, edit, and audit** webhooks via `/v1/webhooks` and `/v1/webhooks/deliveries`.

## When to use?

| Situation                                    | Webhook?   |
| -------------------------------------------- | ---------- |
| React **immediately** when something changes | **Yes**    |
| Automate bot, ERP, or AI agent               | **Yes**    |
| Only check the dashboard occasionally        | Not needed |

## Register via API

Scopes: `webhooks:read` and `webhooks:manage`.

```bash theme={null}
curl -X POST https://api.notifique.dev/v1/webhooks \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My webhook",
    "url": "https://api.yourdomain.com/receive",
    "events": ["message.sent", "message.delivered", "sms.sent"],
    "instanceIds": []
  }'
```

**Save the `secret`** from the response to validate `X-Notifique-Signature`.

## Validate signature

Each POST includes `X-Notifique-Signature` and `X-Notifique-Timestamp`. Compute HMAC-SHA256 of the secret with `{timestamp}.{raw body}` and reject timestamps outside **5 minutes**.

## Deliveries and resend

| Method | Route                                         | Use                               |
| ------ | --------------------------------------------- | --------------------------------- |
| GET    | `/v1/webhooks/deliveries`                     | POST attempt history              |
| GET    | `/v1/webhooks/deliveries/{deliveryId}`        | Payload, HTTP response, attempts  |
| POST   | `/v1/webhooks/deliveries/{deliveryId}/resend` | Re-queue delivery                 |
| POST   | `/v1/webhooks/{id}/rotate-secret`             | New signing `secret` (shown once) |

List filters: `success`, `event`, `webhook_id`, `message_id`, `search`.

Full guide and event list: [Webhooks (full guide)](/en/guides/webhooks/index).

## Next steps

* [API logs](/en/platform-api/como-funciona/logs)
* [Scopes](/en/platform-api/como-funciona/escopos-api-key)
