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

# Webhooks

> Read webhook subscriptions and the event types they deliver.

Read webhook subscriptions and the event types they deliver.

## The Webhook object

| Field | Type | Description |
| - | - | - |
| `id` | string | Unique identifier for the webhook subscription |
| `target_url` | string | URL where webhook events will be sent |
| `subscribed_events` | array | List of event types this subscription receives |
| `is_active` | boolean | Whether this subscription is currently active |
| `created_at` | string | When the subscription was created |
| `updated_at` | string | When the subscription was last updated |

## Example

`GET /v1/webhook-subscriptions` for an agent with no subscriptions returns HTTP `200`:

```json theme={null}
{
  "subscriptions": []
}
```

## Operations

| Method | Path | What it does |
| - | - | - |
| `GET` | [`/v1/webhook-events`](https://docs.staging.relayapp.im/api-reference/webhooks/list-available-webhook-event-types) | List available webhook event types |
| `POST` | [`/v1/webhook-subscriptions`](https://docs.staging.relayapp.im/api-reference/webhooks/create-a-new-webhook-subscription) | Create a new webhook subscription |
| `GET` | [`/v1/webhook-subscriptions`](https://docs.staging.relayapp.im/api-reference/webhooks/list-all-webhook-subscriptions) | List all webhook subscriptions |
| `GET` | [`/v1/webhook-subscriptions/{subscriptionId}`](https://docs.staging.relayapp.im/api-reference/webhooks/get-a-webhook-subscription-by-id) | Get a webhook subscription by ID |
| `PUT` | [`/v1/webhook-subscriptions/{subscriptionId}`](https://docs.staging.relayapp.im/api-reference/webhooks/update-a-webhook-subscription) | Update a webhook subscription |
| `DELETE` | [`/v1/webhook-subscriptions/{subscriptionId}`](https://docs.staging.relayapp.im/api-reference/webhooks/delete-a-webhook-subscription) | Delete a webhook subscription |

## Errors

Common authentication, validation, and server errors apply alongside resource errors. Read `error.message` for the rejected condition.

[1005](https://docs.staging.relayapp.im/api-reference/errors.md#1005), [2001](https://docs.staging.relayapp.im/api-reference/errors.md#2001), [2003](https://docs.staging.relayapp.im/api-reference/errors.md#2003), [2004](https://docs.staging.relayapp.im/api-reference/errors.md#2004), [2006](https://docs.staging.relayapp.im/api-reference/errors.md#2006), [3006](https://docs.staging.relayapp.im/api-reference/errors.md#3006).

## Next steps

* [API overview](https://docs.staging.relayapp.im/api-reference/overview.md)
* [Error codes](https://docs.staging.relayapp.im/api-reference/errors.md)
* [Receive events](https://docs.staging.relayapp.im/events.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.