Skip to main content
Komos can push run lifecycle events to your infrastructure so you do not need to poll the public API. Configure webhook endpoints from Settings → API & Webhooks in the dashboard, then use the API key issued to your organization to manage runs.

Supported events

Each endpoint can subscribe to one or more event types:
  • task-run.started — Emitted when a run transitions from PENDING to RUNNING.
  • task-run.completed — Sent after successful completion; payload mirrors the run resource.
  • task-run.failed — Delivered when a run exits with FAILED status and includes error context.
  • task-run.cancelled — Triggered after a run is cancelled (manual API call or dashboard action).
  • task-run.log — Streams batches of new log entries while the run executes.
If you do not choose specific events, Komos defaults to all of the above.

Payloads

task-run.* events reuse the run resource. A typical task-run.completed payload looks like this:
task-run.log delivers batches of new log entries:
When logs originate from a nested child run, a childRunId field is included alongside id (which always refers to the root run).

Request headers

Every webhook delivery includes the following headers:
  • x-komos-event — Event type string (for example task-run.completed).
  • x-komos-signature — Verification metadata formatted as t=<ISO timestamp>,v1=<hex signature>.
  • x-komos-endpoint-id — UUID of the endpoint that received the event.
  • x-komos-run-id (optional) — Present for run-related events.
  • x-komos-task-id (optional) — Present when the endpoint is scoped to a single task.
  • content-type: application/json

Signature verification

Webhook signatures help confirm Komos sent the request. Use the signing secret shown when you create an endpoint (format wh_<prefix>_<secret>). The verification process matches the server-side logic:
  1. Split the secret on underscores (format wh_{prefix}_{secret}). The portion after the second underscore is the raw secret.
  2. Derive the signing key with HMAC-SHA256(key=WEBHOOK_SIGNING_PEPPER, message=raw_secret). Komos uses the default pepper komos-webhook-pepper unless your organization overrides it.
  3. Parse x-komos-signature into the timestamp (t) and signature (v1).
  4. Build the payload string <timestamp>.<raw_request_body>.
  5. Compute HMAC-SHA256(key=derived_signing_key, message=payload_string) and compare the hex digest with v1 using a constant-time comparison.

Python example

Rotate the signing secret from the dashboard if verification fails or credentials leak. Whenever you generate a new secret, reconfigure your integration with the updated value.

Retry policy

  • Komos retries failed deliveries up to 6 times.
  • The initial retry waits 60 seconds, doubling each attempt with up to ±30 seconds of jitter.
  • Backoff is capped at 30 minutes. After the final attempt the event is marked dead_lettered and surfaces in the dashboard along with the last error.
To re-enqueue dead-lettered events, toggle the endpoint back to active after resolving the issue or contact support to trigger a replay.