Skip to main content
A webhook sends a signed JSON POST to your URL whenever a file matching its path pattern changes. Use webhooks to trigger CI, sync to another system, or notify a chat channel. For in-process consumers, the SSE event stream is simpler. Webhooks are off by default. Turn them on in config:
.kiwi/config.toml
When webhooks are off, every endpoint on this page returns 503 with webhooks not enabled. See Webhooks for delivery details.

Register a webhook

Create a webhook and return its signing secret. The secret is only returned here, so store it.
string
required
Endpoint that receives POST requests.
string
required
Which paths trigger the webhook. ** matches everything, concepts/** matches everything under concepts/, and other patterns use shell glob rules against the path without a leading slash (for example runbooks/*.md).
string[]
Only fire for these event types. Omit to receive all. See Event payload.
Returns 201 on success and 400 if url or path_glob is missing.
string
Webhook ID, prefixed wh_.
string
Registered endpoint.
string
Path pattern.
string
Signing secret, prefixed whsec_. Only returned at creation.
string
Creation time (RFC 3339).
boolean
Whether the webhook fires.
string[]
Event filter. Omitted when the webhook receives every type.

List webhooks

Return every registered webhook, without secrets.
Returns a JSON array with the fields from Register a webhook, minus secret.

Delete a webhook

Remove a webhook by ID.
string
required
Webhook ID.
Returns 204 No Content on success and 404 if the ID does not exist.

Event payload

Each delivery is a POST with a JSON body. A change that touches several files sends one delivery per file.
string
write, delete, bulk, rollback, or transition (a workflow state change).
string
Changed file.
string
Who made the change.
string
Event time (RFC 3339).
string
For transition: the frontmatter field that changed.
string
For transition: previous value.
string
For transition: new value.
Failed deliveries (network errors or non-2xx responses) are retried after 5 seconds, 30 seconds, 2 minutes, 15 minutes, and 1 hour, up to max_retries.

Verify signatures

Every delivery carries Standard Webhooks headers (webhook-id, webhook-timestamp, webhook-signature) and a simpler X-Kiwi-Signature-256 header. For the simple header, compute an HMAC-SHA256 of the raw request body with the full secret string as the key, and compare:
verify.py

Webhooks concepts

Delivery model and use cases.

Workflows

State changes that send transition events.
Last modified on October 19, 2026