ScalixScalix Docs
Sign up

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

plaintext
GET /api/v1/tenants/{tenant_id}/webhooks

Returns the registered webhook endpoints for a tenant.

Auth: Bearer API key

Parameters

NameInTypeRequiredDescription
tenant_idpathstringYesTenant id (UUID)

Responses

StatusDescription
200Webhook list
401Missing or invalid API key
500Internal error

operationId: listWebhooks

Register a webhook

plaintext
POST /api/v1/tenants/{tenant_id}/webhooks

Registers a webhook endpoint for a set of event types.

Auth: Bearer API key

Parameters

NameInTypeRequiredDescription
tenant_idpathstringYesTenant 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.

FieldTypeRequiredDescription
urlstring (uri)YesPublic http/https delivery URL (SSRF-guarded at registration and at every delivery).
eventsarray<WebhookEventName enum: Insert, Update, Delete, SchemaChange, TokenCreated, TokenRevoked, SandboxCreated, SandboxDestroyed, ApiKeyExpiringSoon, ApprovalRequired, ApprovalGranted, ApprovalRejected>YesEvent types to deliver — case-sensitive PascalCase.
secretstring | nullNoOptional HMAC signing secret; auto-generated and shown once if omitted.

Responses

StatusDescription
201Webhook registered — the generated/accepted secret is returned ONCE in this body
400Invalid body (unknown field, bad URL, or an event name outside the enum)
401Missing or invalid API key
500Internal error

operationId: registerWebhook

Unregister a webhook

plaintext
DELETE /api/v1/tenants/{tenant_id}/webhooks/{id}

Deletes a registered webhook; event delivery to its endpoint stops.

Auth: Bearer API key

Parameters

NameInTypeRequiredDescription
tenant_idpathstringYesTenant id (UUID)
idpathstringYesWebhook id (UUID)

Responses

StatusDescription
204Webhook unregistered
401Missing or invalid API key
404Webhook not found
500Internal error

operationId: unregisterWebhook

Get a webhook

plaintext
GET /api/v1/tenants/{tenant_id}/webhooks/{id}

Returns one registered webhook by id.

Auth: Bearer API key

Parameters

NameInTypeRequiredDescription
tenant_idpathstringYesTenant id (UUID)
idpathstringYesWebhook id (UUID)

Responses

StatusDescription
200The webhook
401Missing or invalid API key
404Webhook not found
500Internal error

operationId: getWebhook

Update a webhook

plaintext
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

NameInTypeRequiredDescription
tenant_idpathstringYesTenant id (UUID)
idpathstringYesWebhook 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.

FieldTypeRequiredDescription
urlstring | null (uri)No
eventsarray<WebhookEventName enum: Insert, Update, Delete, SchemaChange, TokenCreated, TokenRevoked, SandboxCreated, SandboxDestroyed, ApiKeyExpiringSoon, ApprovalRequired, ApprovalGranted, ApprovalRejected>No
secretstring | nullNo
activeboolean | nullNoPause (false) / resume (true) deliveries.

Responses

StatusDescription
200Webhook updated
400Invalid request
401Missing or invalid API key
404Webhook not found
500Internal error

operationId: updateWebhook

List a webhook's deliveries

plaintext
GET /api/v1/tenants/{tenant_id}/webhooks/{id}/deliveries

Returns 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

NameInTypeRequiredDescription
tenant_idpathstringYesTenant id (UUID)
idpathstringYesWebhook id (UUID)

Responses

StatusDescription
200Recent delivery attempts
401Missing or invalid API key
404Webhook not found
500Internal error

operationId: listWebhookDeliveries

Test a webhook

plaintext
POST /api/v1/tenants/{tenant_id}/webhooks/{id}/test

Sends a test event to the webhook's endpoint and reports the delivery result without waiting for a real event.

Auth: Bearer API key

Parameters

NameInTypeRequiredDescription
tenant_idpathstringYesTenant id (UUID)
idpathstringYesWebhook 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.

FieldTypeRequiredDescription
eventWebhookEventName enum: Insert, Update, Delete, SchemaChange, TokenCreated, TokenRevoked, SandboxCreated, SandboxDestroyed, ApiKeyExpiringSoon, ApprovalRequired, ApprovalGranted, ApprovalRejectedYesEvent to deliver — same case-sensitive enum as registration events.
payloadobjectYesJSON body delivered to the endpoint as the event payload.

Responses

StatusDescription
200Test event sent; delivery result
401Missing or invalid API key
404Webhook not found
415Invalid body — both event (WebhookEventName) and payload (JSON object) are required; unknown fields rejected
500Internal error

operationId: testWebhook