# Webhooks

> widar marks AI output for the EU AI Act and California's AI Transparency Act: an invisible watermark and a signed C2PA credential on text, images, audio and video, in one API, by Bynn Intelligence.

Documentation index: https://widar.com/llms.txt

The examples in these docs use invented companies, such as Lumen Labs B.V., and invented values: none is a real check, mark, signature or certificate.

Section: API reference. URL: https://widar.com/docs/webhooks

widar sends events to your endpoint as they happen: a failed mark, a certificate issued or expiring, an install gone quiet, a check finished. Each delivery is signed with Widar-Signature and retried.

Updated December 3, 2026

- Each delivery is a POST with the event as JSON, signed in `Widar-Signature: t=<unix seconds>,v1=<HMAC-SHA256 of "<t>.<body>">` with the endpoint's secret. During a secret's roll a delivery carries two `v1` values.
- Answer `2xx` within 10 seconds. A delivery is tried 5 times over 15 minutes, and an endpoint failing for 72 hours is turned off; recover its deliveries once it works again.
- `Widar-Event-Id` is the same on every try: use it to skip a delivery you already handled.
- A delivery never goes to a private address. Test events go only to endpoints registered for test mode.
- There is no event per marked output; `marking.failed` always fires. The catalogue is on [Events](https://widar.com/docs/events).

**Verify a delivery**

Node.js:

```typescript
import { createHmac, timingSafeEqual } from "node:crypto";

// header: the Widar-Signature header; body: the raw request body, as received
export function verify(header: string, body: string, secret: string): boolean {
  const parts = Object.fromEntries(header.split(",").map((p) => p.split("=") as [string, string]));
  const t = Number(parts.t);
  if (!t || Math.abs(Date.now() / 1000 - t) > 300) return false; // older than five minutes
  const expected = createHmac("sha256", secret).update(`${t}.${body}`).digest("hex");
  return header
    .split(",")
    .filter((p) => p.startsWith("v1="))
    .some((p) => timingSafeEqual(Buffer.from(p.slice(3)), Buffer.from(expected)));
}
```

Python:

```python
import hmac, hashlib, time

def verify(header: str, body: bytes, secret: str) -> bool:
    parts = [p.split("=", 1) for p in header.split(",")]
    t = int(dict(parts).get("t", "0"))
    if abs(time.time() - t) > 300:  # older than five minutes
        return False
    expected = hmac.new(secret.encode(), f"{t}.".encode() + body, hashlib.sha256).hexdigest()
    return any(k == "v1" and hmac.compare_digest(v, expected) for k, v in parts)
```

**A delivery**

```
POST /widar/events HTTP/1.1
Content-Type: application/json
User-Agent: Widar-Webhooks/1.0
Widar-Signature: t=1764755011,v1=5b1d6c0e9a...
Widar-Event-Id: evt_6Kd2qLw8XsRb

{
  "id": "evt_6Kd2qLw8XsRb",
  "object": "event",
  "type": "marking.failed",
  "mode": "live",
  "created_at": "2026-12-03T08:30:11Z",
  "data": {
    "id": "mfl_9Ns2cPw5RtLm",
    "object": "marking_failure",
    "system_id": "sys_4kT9qWm2RbXe",
    "reason_code": "format_not_supported",
    "outcome": "held"
  }
}
```

## List webhook endpoints

Where the workspace receives events: each endpoint of a mode, newest first, with its state, its last delivery and its 24 hours' totals.

`GET /v1/webhook_endpoints`. Who may: Owner, Admin and Developer. CLI: `widar webhooks list [--mode <live|test>] [--limit <n>] [--cursor <whe_...>]`. MCP tool: `list_webhook_endpoints`.

**Parameters**
- `mode` (enum): The mode. One of `live`, `test`.
- `limit` (integer): The limit. At least 1, at most 200.
- `cursor` (id (whe_)): The cursor's id.

**Returns** list of webhook endpoints: The endpoints; next_cursor reads the page after.

API:

```bash
curl -X GET https://api.widar.com/v1/webhook_endpoints \
  -H "Authorization: Bearer $WIDAR_API_KEY"
```

CLI:

```bash
widar webhooks list
```

MCP tool `list_webhook_endpoints`:

```json
{
  "name": "list_webhook_endpoints",
  "arguments": {}
}
```

## List webhook endpoints with their health

Every endpoint of a mode, widar's own and the compatible ones, with its state, its last delivery and its requests, failures and times over 24 hours.

`GET /v1/webhook_endpoints/health`. Who may: Owner, Admin and Developer. CLI: `widar webhooks health [--mode <live|test>]`. MCP tool: `get_webhook_health`.

**Parameters**
- `mode` (enum): The mode. One of `live`, `test`.

**Returns** list of webhook endpoints: The endpoints with their health; never a secret, only its last four characters.

API:

```bash
curl -X GET https://api.widar.com/v1/webhook_endpoints/health \
  -H "Authorization: Bearer $WIDAR_API_KEY"
```

CLI:

```bash
widar webhooks health
```

MCP tool `get_webhook_health`:

```json
{
  "name": "get_webhook_health",
  "arguments": {}
}
```

## Read a webhook endpoint

One endpoint: its address, format, mode, events, state, health, the secret's last four characters and its retry rules.

`GET /v1/webhook_endpoints/{endpoint_id}`. Who may: Owner, Admin and Developer. CLI: `widar webhooks get <endpoint_id>`. MCP tool: `get_webhook_endpoint`.

**Parameters**
- `endpoint_id` (id (whe_), required): The endpoint's id. In the path.

**Returns** webhook endpoint: The endpoint, without its secret.

API:

```bash
curl -X GET https://api.widar.com/v1/webhook_endpoints/whe_7Kq2Xw9 \
  -H "Authorization: Bearer $WIDAR_API_KEY"
```

CLI:

```bash
widar webhooks get whe_7Kq2Xw9
```

MCP tool `get_webhook_endpoint`:

```json
{
  "name": "get_webhook_endpoint",
  "arguments": {
    "endpoint_id": "whe_7Kq2Xw9"
  }
}
```

## List webhook deliveries

One row per event per endpoint, newest first, with its state, attempts and last status; filter by endpoint, state, event type, one event's id or an object's id.

`GET /v1/webhook_deliveries`. Who may: Owner, Admin and Developer. CLI: `widar webhooks deliveries [--endpoint-id <whe_id>] [--state <delivered|pending|failed|skipped>] [--event <type>] [--event-id <evt_id>] [--object-id <object_id>] [--limit <n>] [--cursor <dlv_id>]`. MCP tool: `list_webhook_deliveries`.

**Parameters**
- `endpoint_id` (id (whe_)): The endpoint's id.
- `state` (enum): The state. One of `delivered`, `pending`, `failed`, `skipped`.
- `event` (string): The event.
- `event_id` (string): The event id.
- `object_id` (string): The object id.
- `limit` (integer): The limit. At least 1, at most 200.
- `cursor` (id (dlv_)): The cursor's id.

**Returns** list of webhook deliveries: The deliveries, newest first, test sends marked; next_cursor reads the page after.

API:

```bash
curl -X GET https://api.widar.com/v1/webhook_deliveries \
  -H "Authorization: Bearer $WIDAR_API_KEY"
```

CLI:

```bash
widar webhooks deliveries
```

MCP tool `list_webhook_deliveries`:

```json
{
  "name": "list_webhook_deliveries",
  "arguments": {}
}
```

## Read a webhook delivery

One delivery with every attempt: the request exactly as sent (address, method, headers with the signature, body) and the response (status, headers, body, time).

`GET /v1/webhook_deliveries/{delivery_id}`. Who may: Owner, Admin and Developer. CLI: `widar webhooks delivery <delivery_id>`. MCP tool: `get_webhook_delivery`.

**Parameters**
- `delivery_id` (id (dlv_), required): The delivery's id. In the path.

**Returns** webhook delivery: The delivery and each attempt's request and response.

API:

```bash
curl -X GET https://api.widar.com/v1/webhook_deliveries/dlv_7Kq2Xw9 \
  -H "Authorization: Bearer $WIDAR_API_KEY"
```

CLI:

```bash
widar webhooks delivery dlv_7Kq2Xw9
```

MCP tool `get_webhook_delivery`:

```json
{
  "name": "get_webhook_delivery",
  "arguments": {
    "delivery_id": "dlv_7Kq2Xw9"
  }
}
```

## List event types

The events an endpoint can receive, grouped by product, each with what it means and an example payload.

`GET /v1/event_types`. Who may: Owner, Admin and Developer. CLI: `widar events types [--format <widar>] [--limit <n>] [--cursor <type>]`. MCP tool: `list_event_types`.

**Parameters**
- `format` (enum): The format. One of `widar`, `compatible`.
- `limit` (integer): The limit. At least 1, at most 200.
- `cursor` (string): The cursor.

**Returns** list of event types: The catalogue of widar's events, with examples.

API:

```bash
curl -X GET https://api.widar.com/v1/event_types \
  -H "Authorization: Bearer $WIDAR_API_KEY"
```

CLI:

```bash
widar events types
```

MCP tool `list_event_types`:

```json
{
  "name": "list_event_types",
  "arguments": {}
}
```

## Read the test inbox

The workspace's widar-hosted test address and the last requests it received, each with its headers, body and whether its signature verifies.

`GET /v1/webhook_inbox`. Who may: Owner, Admin and Developer. CLI: `widar webhooks inbox [--limit <1-100>]`. MCP tool: `get_webhook_inbox`.

**Parameters**
- `limit` (integer): The limit. At least 1, at most 100.

**Returns** webhook inbox: The inbox's address and its newest requests of the last 7 days: limit of them, 1 to 100, all 100 it keeps when left out.

API:

```bash
curl -X GET https://api.widar.com/v1/webhook_inbox \
  -H "Authorization: Bearer $WIDAR_API_KEY"
```

CLI:

```bash
widar webhooks inbox
```

MCP tool `get_webhook_inbox`:

```json
{
  "name": "get_webhook_inbox",
  "arguments": {}
}
```

## Read the webhook public key

widar's RSA public key, published with no key so a receiver can fetch it on its own; at most 60 a minute from one address. A widar webhook is verified with its endpoint's secret, in the widar-Signature header.

`GET /v1/webhooks/public_key`. Who may: Anyone, with no account yet. CLI: `widar webhooks public-key`. MCP tool: `get_webhook_public_key`.

**Parameters**

**Returns** webhook public key: status ok, the algorithm RS256 and the public key as PEM. When the signing key cannot be read: 503 with the code signing_key_unavailable.

API:

```bash
curl -X GET https://api.widar.com/v1/webhooks/public_key
```

CLI:

```bash
widar webhooks public-key
```

MCP tool `get_webhook_public_key`:

```json
{
  "name": "get_webhook_public_key",
  "arguments": {}
}
```

## Add a webhook endpoint

Register an https address for widar's own events or for the compatible document events, live or test; its signing secret is shown once.

`POST /v1/webhook_endpoints`. Who may: Owner, Admin and Developer. CLI: `widar webhooks create --url <https://...> --events <type,type> [--format <widar>] [--mode <live|test>] [--description <text>] [--source <custom|zapier|make|n8n>] [--max-retries <0-65>] [--retry-frequency-minutes <1-1440>]`. MCP tool: `create_webhook_endpoint`.

**Parameters**
- `url` (string, required): The url. At most 2,048 characters.
- `events` (array of string, required): The events. At most 60 items.
- `format` (enum, default "widar"): The format. One of `widar`, `compatible`.
- `mode` (enum, default "live"): The mode. One of `live`, `test`.
- `description` (string): The description. At most 240 characters.
- `source` (enum, default "custom"): The source. One of `custom`, `zapier`, `make`, `n8n`.
- `max_retries` (integer): The max retries. At most 65.
- `retry_frequency_minutes` (integer): The retry frequency minutes. At least 1, at most 1,440.

**Returns** webhook endpoint, with its secret: The endpoint, and its signing secret shown this once.

API:

```bash
curl -X POST https://api.widar.com/v1/webhook_endpoints \
  -H "Authorization: Bearer $WIDAR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "<url>",
    "events": "<events>"
  }'
```

CLI:

```bash
widar webhooks create --url <url> --events <events>
```

MCP tool `create_webhook_endpoint`:

```json
{
  "name": "create_webhook_endpoint",
  "arguments": {
    "url": "<url>",
    "events": "<events>"
  }
}
```

## Change a webhook endpoint

Change an endpoint's address, events or description, or disable it and enable it again; the format and the mode stay as made.

`PATCH /v1/webhook_endpoints/{endpoint_id}`. Who may: Owner, Admin and Developer. CLI: `widar webhooks update <endpoint_id> [--url <https://...>] [--events <type,type>] [--description <text>] [--state <enabled|disabled>] [--max-retries <0-65>] [--retry-frequency-minutes <1-1440>]`. MCP tool: `update_webhook_endpoint`.

**Parameters**
- `endpoint_id` (id (whe_), required): The endpoint's id. In the path.
- `url` (string): The url. At most 2,048 characters.
- `events` (array of string): The events. At most 60 items.
- `description` (string): The description. At most 240 characters.
- `state` (enum): The state. One of `enabled`, `disabled`.
- `max_retries` (integer): The max retries. At most 65.
- `retry_frequency_minutes` (integer): The retry frequency minutes. At least 1, at most 1,440.

**Returns** webhook endpoint: The endpoint as it is now.

API:

```bash
curl -X PATCH https://api.widar.com/v1/webhook_endpoints/whe_7Kq2Xw9 \
  -H "Authorization: Bearer $WIDAR_API_KEY"
```

CLI:

```bash
widar webhooks update whe_7Kq2Xw9
```

MCP tool `update_webhook_endpoint`:

```json
{
  "name": "update_webhook_endpoint",
  "arguments": {
    "endpoint_id": "whe_7Kq2Xw9"
  }
}
```

## Delete a webhook endpoint

Stop sending to an endpoint and remove it; its delivery log is kept until its retention ends.

`DELETE /v1/webhook_endpoints/{endpoint_id}`. Who may: Owner, Admin and Developer. CLI: `widar webhooks delete <endpoint_id>`. MCP tool: `delete_webhook_endpoint`.

**Parameters**
- `endpoint_id` (id (whe_), required): The endpoint's id. In the path.

**Returns** deleted webhook endpoint: The endpoint's id, deleted.

API:

```bash
curl -X DELETE https://api.widar.com/v1/webhook_endpoints/whe_7Kq2Xw9 \
  -H "Authorization: Bearer $WIDAR_API_KEY"
```

CLI:

```bash
widar webhooks delete whe_7Kq2Xw9
```

MCP tool `delete_webhook_endpoint`:

```json
{
  "name": "delete_webhook_endpoint",
  "arguments": {
    "endpoint_id": "whe_7Kq2Xw9"
  }
}
```

## Roll a signing secret

Give a widar endpoint a new signing secret, shown once; the old one keeps verifying for the overlap chosen, none to 7 days. While an earlier secret still verifies, a roll is refused unless it ends that one now.

`POST /v1/webhook_endpoints/{endpoint_id}/roll_secret`. Who may: Owner, Admin and Developer. CLI: `widar webhooks roll-secret <endpoint_id> [--overlap <none|1h|24h|3d|7d>] [--end-previous]`. MCP tool: `roll_webhook_secret`.

**Parameters**
- `endpoint_id` (id (whe_), required): The endpoint's id. In the path.
- `overlap` (enum, default "24h"): The overlap. One of `none`, `1h`, `24h`, `3d`, `7d`.
- `end_previous` (boolean, default false): The end previous.

**Returns** webhook endpoint, with its new secret: The endpoint and its new secret, shown this once.

API:

```bash
curl -X POST https://api.widar.com/v1/webhook_endpoints/whe_7Kq2Xw9/roll_secret \
  -H "Authorization: Bearer $WIDAR_API_KEY"
```

CLI:

```bash
widar webhooks roll-secret whe_7Kq2Xw9
```

MCP tool `roll_webhook_secret`:

```json
{
  "name": "roll_webhook_secret",
  "arguments": {
    "endpoint_id": "whe_7Kq2Xw9"
  }
}
```

## Send a test event

Send a sample of any event type to an endpoint, live or test, or to the test inbox, as a real signed request; the answer is the attempt.

`POST /v1/webhook_endpoints/{endpoint_id}/test`. Who may: Owner, Admin and Developer. CLI: `widar webhooks test <endpoint_id> --type <event> [--payload <json>] [--target <endpoint|inbox>]`. MCP tool: `send_test_webhook`.

**Parameters**
- `endpoint_id` (id (whe_), required): The endpoint's id. In the path.
- `type` (string, required): The type.
- `payload` (record): The payload.
- `target` (enum, default "endpoint"): The target. One of `endpoint`, `inbox`.

**Returns** webhook delivery: The test send: the request as sent and the endpoint's answer, within 10 seconds.

API:

```bash
curl -X POST https://api.widar.com/v1/webhook_endpoints/whe_7Kq2Xw9/test \
  -H "Authorization: Bearer $WIDAR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "<type>"
  }'
```

CLI:

```bash
widar webhooks test whe_7Kq2Xw9 --type <type>
```

MCP tool `send_test_webhook`:

```json
{
  "name": "send_test_webhook",
  "arguments": {
    "endpoint_id": "whe_7Kq2Xw9",
    "type": "<type>"
  }
}
```

## Resend a delivery

Send one delivery again with the same event id and a fresh timestamp and signature; the real result is logged as a new attempt.

`POST /v1/webhook_deliveries/{delivery_id}/resend`. Who may: Owner, Admin and Developer. CLI: `widar webhooks resend <delivery_id>`. MCP tool: `resend_webhook_delivery`.

**Parameters**
- `delivery_id` (id (dlv_), required): The delivery's id. In the path.

**Returns** webhook delivery: The delivery with its new attempt.

API:

```bash
curl -X POST https://api.widar.com/v1/webhook_deliveries/dlv_7Kq2Xw9/resend \
  -H "Authorization: Bearer $WIDAR_API_KEY"
```

CLI:

```bash
widar webhooks resend dlv_7Kq2Xw9
```

MCP tool `resend_webhook_delivery`:

```json
{
  "name": "resend_webhook_delivery",
  "arguments": {
    "delivery_id": "dlv_7Kq2Xw9"
  }
}
```

## Recover failed deliveries

Send again every delivery of an endpoint that failed or was skipped since a date, and try now every one still waiting for its next retry. One recover an endpoint a minute.

`POST /v1/webhook_endpoints/{endpoint_id}/recover`. Who may: Owner, Admin and Developer. CLI: `widar webhooks recover <endpoint_id> --since <date>`. MCP tool: `recover_webhook_deliveries`.

**Parameters**
- `endpoint_id` (id (whe_), required): The endpoint's id. In the path.
- `since` (string, required): The since.

**Returns** recovered deliveries: How many were sent again, how many waiting retries were tried now, how many were tried in the last minute and keep their schedule with the earliest next try, and the deliveries.

API:

```bash
curl -X POST https://api.widar.com/v1/webhook_endpoints/whe_7Kq2Xw9/recover \
  -H "Authorization: Bearer $WIDAR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "since": "<since>"
  }'
```

CLI:

```bash
widar webhooks recover whe_7Kq2Xw9 --since <since>
```

MCP tool `recover_webhook_deliveries`:

```json
{
  "name": "recover_webhook_deliveries",
  "arguments": {
    "endpoint_id": "whe_7Kq2Xw9",
    "since": "<since>"
  }
}
```

## Clear the test inbox

Remove every request the test inbox holds; its address stays the same.

`DELETE /v1/webhook_inbox/requests`. Who may: Owner, Admin and Developer. CLI: `widar webhooks inbox-clear`. MCP tool: `clear_webhook_inbox`.

**Parameters**

**Returns** cleared webhook inbox: The inbox's id, its requests deleted, and how many went; its address stays.

API:

```bash
curl -X DELETE https://api.widar.com/v1/webhook_inbox/requests \
  -H "Authorization: Bearer $WIDAR_API_KEY"
```

CLI:

```bash
widar webhooks inbox-clear
```

MCP tool `clear_webhook_inbox`:

```json
{
  "name": "clear_webhook_inbox",
  "arguments": {}
}
```

## Trigger a sample event

Send a sample of one event type, with invented data, to every endpoint of this mode that takes it, or to one endpoint, each as a test delivery.

`POST /v1/test_triggers`. Who may: Owner, Admin and Developer. CLI: `widar webhooks trigger --type <event> [--endpoint-id <endpoint_id>]`. MCP tool: `trigger_sample_event`.

**Parameters**
- `type` (string, required): The type.
- `endpoint_id` (id (whe_)): The endpoint's id.

**Returns** test trigger: The sample, and the test delivery made to each endpoint it reached.

API:

```bash
curl -X POST https://api.widar.com/v1/test_triggers \
  -H "Authorization: Bearer $WIDAR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "<type>"
  }'
```

CLI:

```bash
widar webhooks trigger --type <type>
```

MCP tool `trigger_sample_event`:

```json
{
  "name": "trigger_sample_event",
  "arguments": {
    "type": "<type>"
  }
}
```
