Webhooks

Create a webhook subscription

Creates a webhook subscription. Secrets are write-only and are never returned.

url must include an endpoint path (https://api.example.com/webhooks/events); a bare origin is rejected with 422 because no route on your server would receive the delivery.

cluster_id must name a cluster in your workspace, and realm_id a realm on that cluster; either one unknown returns 404. A realm_id sent without a cluster_id must be a realm on one of your workspace's clusters. Omit both to subscribe to every cluster in the workspace.

Required scope: webhooks:write

post/webhooks

Request

  • Base URL: http://localhost:8000
  • URL: http://localhost:8000/webhooks
  • Auth: API key in header API-Key

Request body

namestring required
urlstring uri required

Delivery endpoint. Must be an http or https URL that includes an endpoint path, for example https://api.example.com/webhooks/events. A bare origin with no path (or a path of just /) is rejected.

source'keycloak' | 'platform' required
event_typesstring[] required
signing_secretstring password required
enabledboolean
cluster_idstring uuid
realm_idstring uuid

Keycloak realm ID. This is a UUID generated by Keycloak.

authorization_headerstring password

Example request

{
  "realm_id": "123e4567-e89b-12d3-a456-426614174000"
}

Response

The request has succeeded and a new resource has been created as a result.

idstring uuid required
namestring required
urlstring required
enabledboolean required
source'keycloak' | 'platform' required
event_typesstring[] required
cluster_idstring uuid
realm_idstring
has_authorization_headerboolean required
has_signing_secretboolean required
created_atstring date-time required
updated_atstring date-time required

Changes

No recorded changes to this operation across all 1 revision of this API.