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
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.
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.secret.
Delete a webhook
Remove a webhook by ID.string
required
Webhook ID.
204 No Content on success and 404 if the ID does not exist.
Event payload
Each delivery is aPOST 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.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
Related
Webhooks concepts
Delivery model and use cases.
Workflows
State changes that send
transition events.