RAZIEL.docs
API Explorer

Webhooks

Event-driven notifications for session lifecycle events

List webhooks

Returns all webhooks for the current scope. The signing secret is never returned after creation.

GET
/api/webhooks/raziel
AuthorizationBearer <token>

Clerk session token. Automatically set as a cookie in the browser; pass as Authorization: Bearer for server-side calls.

In: header

Response Body

curl -X GET "https://app.raziel.fun/api/webhooks/raziel"
{
  "webhooks": [
    {
      "id": "string",
      "name": "CI notifier",
      "url": "https://example.com/hooks/raziel",
      "events": [
        "session.completed"
      ],
      "enabled": true,
      "lastPingAt": "2019-08-24T14:15:22Z",
      "lastPingOk": true,
      "createdAt": "2019-08-24T14:15:22Z"
    }
  ]
}
{
  "error": "Unauthorized"
}

Create a webhook

Creates a webhook and returns the signing secret in the response body. The secret is shown only once — store it immediately.

POST
/api/webhooks/raziel
AuthorizationBearer <token>

Clerk session token. Automatically set as a cookie in the browser; pass as Authorization: Bearer for server-side calls.

In: header

namestring
urlstring
events?array<string>
Default["session.completed"]

Response Body

curl -X POST "https://app.raziel.fun/api/webhooks/raziel" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "CI notifier",
    "url": "https://example.com/hooks/raziel"
  }'
{
  "webhook": {
    "id": "string",
    "name": "CI notifier",
    "url": "https://example.com/hooks/raziel",
    "events": [
      "session.completed"
    ],
    "enabled": true,
    "lastPingAt": "2019-08-24T14:15:22Z",
    "lastPingOk": true,
    "createdAt": "2019-08-24T14:15:22Z",
    "secret": "string"
  }
}
{
  "error": "Not found"
}
{
  "error": "Unauthorized"
}

Update a webhook

PATCH
/api/webhooks/raziel/{id}
AuthorizationBearer <token>

Clerk session token. Automatically set as a cookie in the browser; pass as Authorization: Bearer for server-side calls.

In: header

Path Parameters

idstring
name?string
url?string
enabled?boolean
events?array<string>

Response Body

curl -X PATCH "https://app.raziel.fun/api/webhooks/raziel/string" \
  -H "Content-Type: application/json" \
  -d '{}'
{
  "webhook": {
    "id": "string",
    "name": "CI notifier",
    "url": "https://example.com/hooks/raziel",
    "events": [
      "session.completed"
    ],
    "enabled": true,
    "lastPingAt": "2019-08-24T14:15:22Z",
    "lastPingOk": true,
    "createdAt": "2019-08-24T14:15:22Z"
  }
}
{
  "error": "Not found"
}
{
  "error": "Unauthorized"
}
{
  "error": "Not found"
}

Delete a webhook

DELETE
/api/webhooks/raziel/{id}
AuthorizationBearer <token>

Clerk session token. Automatically set as a cookie in the browser; pass as Authorization: Bearer for server-side calls.

In: header

Path Parameters

idstring

Response Body

curl -X DELETE "https://app.raziel.fun/api/webhooks/raziel/string"
{
  "ok": true
}
{
  "error": "Unauthorized"
}
{
  "error": "Not found"
}

Send a test ping

Sends a signed ping event to the webhook URL and records the result in lastPingAt / lastPingOk.

POST
/api/webhooks/raziel/{id}/test
AuthorizationBearer <token>

Clerk session token. Automatically set as a cookie in the browser; pass as Authorization: Bearer for server-side calls.

In: header

Path Parameters

idstring

Response Body

curl -X POST "https://app.raziel.fun/api/webhooks/raziel/string/test"
{
  "ok": true,
  "statusCode": 0
}
{
  "error": "Unauthorized"
}
{
  "error": "Not found"
}