# Webhooks

> The Webhooks operations of the Hub REST API (4 operations).

URL: https://docs.synap.live/docs/reference/hub-api/webhooks · Generated from Synap-core/backend@c31e261ab (main)

Paths are relative to `/api/hub` on a pod.

## GET /webhooks

List webhook subscriptions

Returns all webhook subscriptions belonging to the authenticated agent user.

Responses:

- `200`: List of webhook subscriptions
- `500`: Internal error

## POST /webhooks

Create a webhook subscription

Registers a webhook URL to receive real-time event notifications for the specified event types.

Request body (`application/json`): object

| Field | Type | Required | Description |
|---|---|---|---|
| `url` | string | yes |  |
| `eventTypes` | array<string> | yes |  |
| `secret` | string |  |  |

Responses:

- `201`: Webhook subscription created
- `400`: Bad request
- `500`: Internal error

## DELETE /webhooks/{id}

Delete a webhook subscription

Permanently removes a webhook subscription by ID.

Parameters:

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `id` | path | string | yes |  |

Responses:

- `200`: Subscription deleted
- `404`: Subscription not found
- `500`: Internal error

## GET /webhooks/{id}/deliveries

List delivery log for a webhook subscription

Returns the delivery log (status, responseStatus, attempt, deliveredAt) for a subscription owned by the caller. Powers the Reactions Health tab + Replay.

Parameters:

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `id` | path | string | yes |  |
| `limit` | query | number |  |  |

Responses:

- `200`: Delivery log
- `403`: Forbidden
- `404`: Not found
- `500`: Internal error
