> ## Documentation Index
> Fetch the complete documentation index at: https://docs.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`](/api-reference/webhooks/list-available-webhook-event-types)                       | List available webhook event types |
| `POST`   | [`/v1/webhook-subscriptions`](/api-reference/webhooks/create-a-new-webhook-subscription)                 | Create a new webhook subscription  |
| `GET`    | [`/v1/webhook-subscriptions`](/api-reference/webhooks/list-all-webhook-subscriptions)                    | List all webhook subscriptions     |
| `GET`    | [`/v1/webhook-subscriptions/{subscriptionId}`](/api-reference/webhooks/get-a-webhook-subscription-by-id) | Get a webhook subscription by ID   |
| `PUT`    | [`/v1/webhook-subscriptions/{subscriptionId}`](/api-reference/webhooks/update-a-webhook-subscription)    | Update a webhook subscription      |
| `DELETE` | [`/v1/webhook-subscriptions/{subscriptionId}`](/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](/api-reference/errors#1005), [2001](/api-reference/errors#2001), [2003](/api-reference/errors#2003), [2004](/api-reference/errors#2004), [2006](/api-reference/errors#2006), [3006](/api-reference/errors#3006).

## Next steps

* [API overview](/api-reference/overview)
* [Error codes](/api-reference/errors)
* [Receive events](/events)
