Webhooks API
Webhooks API to register endpoint URLs for tenant event types and list registered webhooks in Scalix Cloud for outbound event delivery.
REST API endpoints for Webhooks. 7 operations.
List webhooks
GET /api/v1/tenants/{tenant_id}/webhooksReturns the registered webhook endpoints for a tenant.
Auth: Bearer API key
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenant_id | path | string | Yes | Tenant id (UUID) |
Responses
| Status | Description |
|---|---|
200 | Webhook list |
401 | Missing or invalid API key |
500 | Internal error |
operationId: listWebhooks
Register a webhook
POST /api/v1/tenants/{tenant_id}/webhooksRegisters a webhook endpoint for a set of event types.
Auth: Bearer API key
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenant_id | path | string | Yes | Tenant id (UUID) |
Request body
application/json (required) — schema WebhookCreateRequest.
Register a webhook endpoint (POST). Unknown fields are rejected; active is PUT-only. secret is optional — auto-generated (32-byte hex) when omitted and returned ONCE in the 201 body. Deliveries carry X-Webhook-Signature (hex HMAC-SHA256 of the raw body) and X-Webhook-Event; the endpoint auto-disables after 10 consecutive delivery failures.
| Field | Type | Required | Description |
|---|---|---|---|
url | string (uri) | Yes | Public http/https delivery URL (SSRF-guarded at registration and at every delivery). |
events | array<WebhookEventName enum: Insert, Update, Delete, SchemaChange, TokenCreated, TokenRevoked, SandboxCreated, SandboxDestroyed, ApiKeyExpiringSoon, ApprovalRequired, ApprovalGranted, ApprovalRejected> | Yes | Event types to deliver — case-sensitive PascalCase. |
secret | string | null | No | Optional HMAC signing secret; auto-generated and shown once if omitted. |
Responses
| Status | Description |
|---|---|
201 | Webhook registered — the generated/accepted secret is returned ONCE in this body |
400 | Invalid body (unknown field, bad URL, or an event name outside the enum) |
401 | Missing or invalid API key |
500 | Internal error |
operationId: registerWebhook
Unregister a webhook
DELETE /api/v1/tenants/{tenant_id}/webhooks/{id}Deletes a registered webhook; event delivery to its endpoint stops.
Auth: Bearer API key
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenant_id | path | string | Yes | Tenant id (UUID) |
id | path | string | Yes | Webhook id (UUID) |
Responses
| Status | Description |
|---|---|
204 | Webhook unregistered |
401 | Missing or invalid API key |
404 | Webhook not found |
500 | Internal error |
operationId: unregisterWebhook
Get a webhook
GET /api/v1/tenants/{tenant_id}/webhooks/{id}Returns one registered webhook by id.
Auth: Bearer API key
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenant_id | path | string | Yes | Tenant id (UUID) |
id | path | string | Yes | Webhook id (UUID) |
Responses
| Status | Description |
|---|---|
200 | The webhook |
401 | Missing or invalid API key |
404 | Webhook not found |
500 | Internal error |
operationId: getWebhook
Update a webhook
PUT /api/v1/tenants/{tenant_id}/webhooks/{id}Replaces the endpoint URL, event types, secret, and active flag of a registered webhook.
Auth: Bearer API key
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenant_id | path | string | Yes | Tenant id (UUID) |
id | path | string | Yes | Webhook id (UUID) |
Request body
application/json (required) — schema WebhookUpdateRequest.
Update a registered webhook (PUT). Every field is optional — supplied fields replace; this is the only surface that accepts active.
| Field | Type | Required | Description |
|---|---|---|---|
url | string | null (uri) | No | |
events | array<WebhookEventName enum: Insert, Update, Delete, SchemaChange, TokenCreated, TokenRevoked, SandboxCreated, SandboxDestroyed, ApiKeyExpiringSoon, ApprovalRequired, ApprovalGranted, ApprovalRejected> | No | |
secret | string | null | No | |
active | boolean | null | No | Pause (false) / resume (true) deliveries. |
Responses
| Status | Description |
|---|---|
200 | Webhook updated |
400 | Invalid request |
401 | Missing or invalid API key |
404 | Webhook not found |
500 | Internal error |
operationId: updateWebhook
List a webhook's deliveries
GET /api/v1/tenants/{tenant_id}/webhooks/{id}/deliveriesReturns recent delivery attempts for a webhook with their outcomes, so a missed event can be traced to a failed delivery.
Auth: Bearer API key
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenant_id | path | string | Yes | Tenant id (UUID) |
id | path | string | Yes | Webhook id (UUID) |
Responses
| Status | Description |
|---|---|
200 | Recent delivery attempts |
401 | Missing or invalid API key |
404 | Webhook not found |
500 | Internal error |
operationId: listWebhookDeliveries
Test a webhook
POST /api/v1/tenants/{tenant_id}/webhooks/{id}/testSends a test event to the webhook's endpoint and reports the delivery result without waiting for a real event.
Auth: Bearer API key
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenant_id | path | string | Yes | Tenant id (UUID) |
id | path | string | Yes | Webhook id (UUID) |
Request body
application/json (required) — schema WebhookTestRequest.
Fire a test delivery at a registered webhook (POST .../webhooks/{id}/test). BOTH fields are required and unknown fields are rejected — mirrors the gateway's runtime TestWebhookBody (deny_unknown_fields). The re-audit 2026-10-23 got 415 on every guessed body because this operation published no requestBody at all. The response reports how many webhooks were triggered ({"triggered_webhooks": n}); delivery outcome lands in the webhook's deliveries list, not in this response.
| Field | Type | Required | Description |
|---|---|---|---|
event | WebhookEventName enum: Insert, Update, Delete, SchemaChange, TokenCreated, TokenRevoked, SandboxCreated, SandboxDestroyed, ApiKeyExpiringSoon, ApprovalRequired, ApprovalGranted, ApprovalRejected | Yes | Event to deliver — same case-sensitive enum as registration events. |
payload | object | Yes | JSON body delivered to the endpoint as the event payload. |
Responses
| Status | Description |
|---|---|
200 | Test event sent; delivery result |
401 | Missing or invalid API key |
404 | Webhook not found |
415 | Invalid body — both event (WebhookEventName) and payload (JSON object) are required; unknown fields rejected |
500 | Internal error |
operationId: testWebhook