Setting up webhooks
Prerequisites
Section titled “Prerequisites”- A KingMinos account with a workspace (
https://app.kingminos.com). - Webhooks enabled on the workspace — ask an OutboundSync admin. Without it,
/v1/webhooks*and/v1/eventsreturn403 webhooks_not_enabled. - A workspace-bound credential: a signed-in session, or a personal
km_token. Mutations (create, update, delete, rotate, test, replay) need the workspace owner.
Register an endpoint
Section titled “Register an endpoint”You can register through the API (the app UI follows). Webhook calls need an API token that carries the webhooks scope: in the app, go to API tokens → Create token and check Can manage webhooks (API: scopes: ["capability:*", "webhooks"]). Default tokens don’t include it, so an integration key can’t change your webhooks unless you grant it. Without the scope, every webhook route returns 403 webhook_scope_required.
POST /v1/webhookswith your HTTPSurl, optionaldescription, and optionalenabled_events.- Store the returned
secret(kmwhsec_…) — it is shown once and never again. POST /v1/webhooks/{id}/testand confirm the deliverysucceeded.
KINGMINOS_API_KEY=… # owner key with the webhooks scopecurl -sS https://api.kingminos.com/v1/webhooks \ -H "Authorization: Bearer $KINGMINOS_API_KEY" \ -H "content-type: application/json" \ -d '{"url":"https://hooks.example.com/kingminos","enabled_events":["run.failed","run.recovered"]}'URL rules and limits
Section titled “URL rules and limits”- HTTPS only. Private, loopback, and link-local targets are rejected — including hostnames that resolve to those ranges over DNS. The check runs at create and again on every delivery attempt.
- Redirects are not followed. Register the final URL; a
3xxresponse counts as a failed attempt. - An empty (or omitted)
enabled_eventsreceives all active event types. Reserved names return400 invalid_webhook_eventswith the available list. - A workspace may register at most 20 endpoints.
DELETE /v1/webhooks/{id}soft-deletes an endpoint.
Next steps
Section titled “Next steps”- Verify signatures on your endpoint — Payloads and signatures.
- Send a
test.pingbefore relying on production alerts — Testing and troubleshooting. - Review the event catalog so you subscribe only to what you handle.