Reference
Webhooks
The webhooks endpoints of the HTTP API.
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 |
400 |
The request is malformed or fails validation. | Error |
401 |
Authentication is missing or invalid. | Error |
403 |
The caller is not allowed to perform the request; a role that is too low is code forbidden_role. |
Error |
500 |
The server failed to handle the request. | 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 object.
Responses
| Status | Description | Body |
|---|---|---|
201 |
The webhook is created. | WebhookWithSecret |
400 |
The request is malformed or fails validation. | Error |
401 |
Authentication is missing or invalid. | 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 |
409 |
SLASHOBSERVE_SECRET_KEY is not set (secret_key_missing). |
Error |
413 |
The request body exceeds the size limit. | Error |
422 |
20 webhooks already exist (too_many_webhooks). |
Error |
500 |
The server failed to handle the request. | 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 object.
Responses
| Status | Description | Body |
|---|---|---|
200 |
The changed webhook. | Webhook |
400 |
The request is malformed or fails validation. | Error |
401 |
Authentication is missing or invalid. | 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 |
404 |
The resource does not exist, or the caller cannot see it; the two are never told apart. | Error |
413 |
The request body exceeds the size limit. | Error |
500 |
The server failed to handle the request. | 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 |
401 |
Authentication is missing or invalid. | Error |
403 |
The caller is not allowed to perform the request; a role that is too low is code forbidden_role. |
Error |
404 |
The resource does not exist, or the caller cannot see it; the two are never told apart. | Error |
500 |
The server failed to handle the request. | 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 |
400 |
The request is malformed or fails validation. | Error |
401 |
Authentication is missing or invalid. | Error |
403 |
The caller is not allowed to perform the request; a role that is too low is code forbidden_role. |
Error |
404 |
The resource does not exist, or the caller cannot see it; the two are never told apart. | Error |
409 |
SLASHOBSERVE_SECRET_KEY is not set (secret_key_missing). |
Error |
500 |
The server failed to handle the request. | 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 |
400 |
The request is malformed or fails validation. | Error |
401 |
Authentication is missing or invalid. | Error |
403 |
The caller is not allowed to perform the request; a role that is too low is code forbidden_role. |
Error |
404 |
The resource does not exist, or the caller cannot see it; the two are never told apart. | Error |
409 |
SLASHOBSERVE_SECRET_KEY is not set (secret_key_missing), or the stored secret cannot be read with it (secret_unreadable). |
Error |
500 |
The server failed to handle the request. | 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 |
400 |
The request is malformed or fails validation. | Error |
401 |
Authentication is missing or invalid. | Error |
403 |
The caller is not allowed to perform the request; a role that is too low is code forbidden_role. |
Error |
404 |
The resource does not exist, or the caller cannot see it; the two are never told apart. | Error |
409 |
The webhook has no failing event to skip (nothing_to_skip), or is delivering right now (webhook_busy). |
Error |
500 |
The server failed to handle the request. | 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 |
400 |
The request is malformed or fails validation. | Error |
401 |
Authentication is missing or invalid. | Error |
403 |
The caller is not allowed to perform the request; a role that is too low is code forbidden_role. |
Error |
404 |
The resource does not exist, or the caller cannot see it; the two are never told apart. | Error |
500 |
The server failed to handle the request. | Error |
Generated from api/openapi.yaml at c770e5e0. Report a problem.