# Webhooks — Dizo API

`POST https://api.dizo.ai/v1/webhooks`

Register an endpoint once and receive signed events for finished jobs, job changes, monitor results and billing alerts.

Every delivery has a `Dizo-Signature` header (`t=<unix>,v1=HMAC_SHA256(secret, t + "." + body)`) and is retried with backoff for 24 hours. The signing secret is shown once; rotate it with `POST /v1/webhooks/{id}/rotate`.

**Cost:** Free. Charged: never.

## Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| `url` | string | yes | HTTPS endpoint. |
| `events` | string[] |  | batch.completed, list.completed, monitor.new_results, signal.job_change, billing.refilled, billing.cap_warning, billing.cap_reached, billing.low_balance. Default all. |
| `description` | string |  | Label. |

## Example request
```json
{
  "url": "https://example.com/hooks/dizo",
  "events": [
    "batch.completed",
    "signal.job_change",
    "billing.cap_warning"
  ]
}
```

## Example response
```json
{
  "id": "wh_4Ks0",
  "url": "https://example.com/hooks/dizo",
  "events": [
    "batch.completed",
    "signal.job_change",
    "billing.cap_warning"
  ],
  "secret": "whsec_…shown once…"
}
```

## cURL
```bash
curl -X POST https://api.dizo.ai/v1/webhooks \
  -H "Authorization: Bearer $DIZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com/hooks/dizo","events":["batch.completed","signal.job_change","billing.cap_warning"]}'
```
