---
title: "Webhooks"
description: "The webhooks endpoints of the HTTP API."
---

> Documentation Index
> Fetch the complete documentation index at: https://slashobserve.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Webhooks

## GET /webhooks

List the webhooks.

Only Admins can call this endpoint, and an Admin service-account key can too. Webhooks are sorted by creation time; a response never carries a signing secret.

### Responses

| Status | Description | Body |
| --- | --- | --- |
| `200` | The webhooks. | [`WebhookList`](/docs/reference/api/schemas/#webhooklist) |
| `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) |
| `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) |
| `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) |
| `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) |

## POST /webhooks

Send workspace activity to an https address.

Only Admins can call this endpoint. The server then POSTs every activity event of the chosen types that the caller can read to the address, signed and retried in order; see the webhooks page of the guide for the payload and the signature. Only events that happen after the webhook is created are sent. The caller becomes the webhook's owner, and the webhook delivers only what its owner can read at the time of sending. The address must be https on port 443 with a domain name on the outbound allowlist; a webhook never adds its domain to the allowlist. The signing secret is returned once, here, and is stored encrypted with a key derived from `SLASHOBSERVE_SECRET_KEY`. At most 20 webhooks can exist.

### Request body

`application/json`, required.

A [`CreateWebhookRequest`](/docs/reference/api/schemas/#createwebhookrequest) object.

### Responses

| Status | Description | Body |
| --- | --- | --- |
| `201` | The webhook is created. | [`WebhookWithSecret`](/docs/reference/api/schemas/#webhookwithsecret) |
| `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) |
| `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) |
| `403` | The role is too low (`forbidden_role`), or the address's host is not on the outbound allowlist (`outbound_domain_not_allowed`). | [`Error`](/docs/reference/api/schemas/#error) |
| `409` | `SLASHOBSERVE_SECRET_KEY` is not set (`secret_key_missing`). | [`Error`](/docs/reference/api/schemas/#error) |
| `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) |
| `422` | 20 webhooks already exist (`too_many_webhooks`). | [`Error`](/docs/reference/api/schemas/#error) |
| `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) |

## PATCH /webhooks/{id}

Change a webhook's name, address, format, event types or state.

Only Admins can call this endpoint. The owner stays as it is. `owner: "me"` makes the caller the owner on purpose, so the webhook then delivers only what the caller can read, including the caller's personal folder. A webhook disabled with reason `owner` moves to the caller when `enabled: true` turns it on. A new address is checked against the outbound allowlist and resets the failure count. `enabled: true` clears the disable reason and the failure count and resumes delivery from the webhook's position in the log, still limited to events of the last 24 hours; `enabled: false` disables it with reason `manual`.

### Parameters

| Name | In | Type | Description |
| --- | --- | --- | --- |
| `id` (required) | path | `string` (uuid) |   |

### Request body

`application/json`, required.

A [`UpdateWebhookRequest`](/docs/reference/api/schemas/#updatewebhookrequest) object.

### Responses

| Status | Description | Body |
| --- | --- | --- |
| `200` | The changed webhook. | [`Webhook`](/docs/reference/api/schemas/#webhook) |
| `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) |
| `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) |
| `403` | The role is too low (`forbidden_role`), or the new address's host is not on the outbound allowlist (`outbound_domain_not_allowed`). | [`Error`](/docs/reference/api/schemas/#error) |
| `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) |
| `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) |
| `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) |

## DELETE /webhooks/{id}

Delete a webhook and its delivery attempts.

Only Admins can call this endpoint. A delivery in flight may still reach the receiver once.

### Parameters

| Name | In | Type | Description |
| --- | --- | --- | --- |
| `id` (required) | path | `string` (uuid) |   |

### Responses

| Status | Description | Body |
| --- | --- | --- |
| `204` | The webhook is deleted. |   |
| `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) |
| `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) |
| `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) |
| `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) |
| `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) |

## POST /webhooks/{id}/secret

Replace a webhook's signing secret.

Only Admins can call this endpoint. The old secret stops working at once and the new one is returned once. The owner stays as it is. A webhook disabled with reason `secret_unreadable` still needs `enabled: true` through `updateWebhook` afterwards.

### Parameters

| Name | In | Type | Description |
| --- | --- | --- | --- |
| `id` (required) | path | `string` (uuid) |   |

### Responses

| Status | Description | Body |
| --- | --- | --- |
| `200` | The webhook and its new secret. | [`WebhookWithSecret`](/docs/reference/api/schemas/#webhookwithsecret) |
| `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) |
| `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) |
| `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) |
| `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) |
| `409` | `SLASHOBSERVE_SECRET_KEY` is not set (`secret_key_missing`). | [`Error`](/docs/reference/api/schemas/#error) |
| `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) |

## POST /webhooks/{id}/test

Send one test event to a webhook.

Only Admins can call this endpoint. The server sends a signed `webhook.test` event with no `event` and waits for the answer, up to 10 seconds. It works on a disabled webhook, records the attempt in the delivery history and changes nothing else. A receiver that cannot be reached or answers with an error still gives 200, with `outcome` `failed` and its `error_code`.

### Parameters

| Name | In | Type | Description |
| --- | --- | --- | --- |
| `id` (required) | path | `string` (uuid) |   |

### Responses

| Status | Description | Body |
| --- | --- | --- |
| `200` | The recorded attempt. | [`WebhookTestResult`](/docs/reference/api/schemas/#webhooktestresult) |
| `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) |
| `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) |
| `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) |
| `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) |
| `409` | `SLASHOBSERVE_SECRET_KEY` is not set (`secret_key_missing`), or the stored secret cannot be read with it (`secret_unreadable`). | [`Error`](/docs/reference/api/schemas/#error) |
| `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) |

## POST /webhooks/{id}/skip

Pass over the oldest event a failing webhook is stuck on.

Only Admins can call this endpoint. A webhook delivers in order, so one event the receiver keeps refusing holds back every event behind it. This moves the webhook's position past the oldest event it still has to send, records that event as a `skipped` attempt with the error `skipped_by_admin`, clears the failure count and makes the webhook send the next event at once. The skipped event is never sent to this receiver. It answers 409 `nothing_to_skip` when the webhook is not retrying or has no event left to send, and 409 `webhook_busy` while a server is delivering for it; try again after a few seconds.

### Parameters

| Name | In | Type | Description |
| --- | --- | --- | --- |
| `id` (required) | path | `string` (uuid) |   |

### Responses

| Status | Description | Body |
| --- | --- | --- |
| `200` | The webhook after the skip and the attempt that records it. | [`WebhookSkipResult`](/docs/reference/api/schemas/#webhookskipresult) |
| `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) |
| `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) |
| `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) |
| `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) |
| `409` | The webhook has no failing event to skip (`nothing_to_skip`), or is delivering right now (`webhook_busy`). | [`Error`](/docs/reference/api/schemas/#error) |
| `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) |

## GET /webhooks/{id}/deliveries

List a webhook's recent delivery attempts, newest first.

Only Admins can call this endpoint. Attempts are kept for 7 days. A row records the outcome, the receiver's status code, an error code and the duration, never a response body, a header or the address.

### Parameters

| Name | In | Type | Description |
| --- | --- | --- | --- |
| `id` (required) | path | `string` (uuid) |   |
| `cursor` | query | `string` | The `next_cursor` of the previous page. |
| `limit` | query | `integer` | Between 1 and 100. Default `50`. |

### Responses

| Status | Description | Body |
| --- | --- | --- |
| `200` | One page of attempts. | [`WebhookDeliveryList`](/docs/reference/api/schemas/#webhookdeliverylist) |
| `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) |
| `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) |
| `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) |
| `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) |
| `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) |

Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new).
