API reference

Webhooks

Signed webhooks for job state changes.

GET/v1/ci/webhooks

List webhooks

Permission: ci:events.read

Parameters

NameTypeRequiredDescription
cursorquerystringOptional
limitquerystringOptional

Response200 OK

dataarray of anyRequired
has_morebooleanRequired
next_cursorstring or null
curl "$CIRESK_API/v1/ci/webhooks" \
  -H "Authorization: Bearer $CIRESK_KEY"
POST/v1/ci/webhooks

Create a webhook

Subscribe a signed webhook.

Permission: ci:events.writeCommand: send Idempotency-Key

Parameters

NameTypeRequiredDescription
Idempotency-KeyheaderstringRequired

Request body

eventsarray of stringsRequired
repostring or null
uuidv7 rendered as repo_<32 hex>
urlstringRequired

Response201 Created

eventsarray of stringsRequired
idstringRequired
uuidv7 rendered as whk_<32 hex>
secretstringRequired
urlstringRequired
curl -X POST "$CIRESK_API/v1/ci/webhooks" \
  -H "Authorization: Bearer $CIRESK_KEY" \
  -H "Idempotency-Key: 1a41c272-39d0-4e10-a0cc-fd75b621cf68" \
  -H "Content-Type: application/json" \
  -d '{
    "events": [
      "job.finished"
    ],
    "repo": "repo_0129354d7b6b4146ad16c315d960365b",
    "url": "https://hooks.acme.com/ciresk"
  }'
POST/v1/ci/webhooks/{id}/delete

Delete a webhook

Permission: ci:events.write

Parameters

NameTypeRequiredDescription
idpathstringRequiredThe webhook's ID.

Response200 OK

statestringRequired
curl -X POST "$CIRESK_API/v1/ci/webhooks/whk_01c24013536936e8782bc95cfee48218/delete" \
  -H "Authorization: Bearer $CIRESK_KEY"