callback_url per run.
Webhooks vs callback_url
Both deliver the same
run.completed / run.failed / run.cancelled payload shape documented under Callbacks. Pick callback_url if you don’t need history; pick webhooks if you do.
Endpoints
Every endpoint is
Authorization: Bearer $RUNFLOW_API_KEY. The X-Organization-Id header is optional and defaults to the key’s org.
Create a webhook
POST /v1/webhooks takes three required fields plus an optional list of event subscriptions:
Subscribing to zero events creates a webhook that never fires. Subscribe to at least one event type from
GET /v1/webhooks/event-types.
Event types
GET /v1/webhooks/event-types returns every code Runflow can emit, with the schema each event carries. Common ones today:
Event names use UK spelling (
cancelled, two ls); the run’s status_code field uses US spelling (canceled). Both literals are stable.
Deliveries and attempts
Every event that matches a webhook produces a delivery. Each delivery has one or more attempts (retries on 5xx, timeouts, or network errors).status_code, response_time_ms, response_body, succeeded, and next_retry_at. Use them to debug 5xx storms or a misconfigured receiver.
Verify the signature
Runflow signs every webhook delivery with HMAC-SHA256 of the raw body using your webhook’s secret. The signature ships in theRunflow-Signature header alongside Runflow-Request-Id for log correlation. The verification code is the same as for per-run callbacks - see Verify callback signatures.
Receiver checklist
- Return
2xxwithin a few seconds. Runflow treats non-2xx, timeouts, and network errors as failures and retries on an exponential backoff. - Verify
Runflow-Signaturebefore trusting the body. - Be idempotent on
delivery.idandrun_id. Retries can deliver the same event more than once. - Log
Runflow-Request-Id. It is the join key againstGET /v1/webhooks/{webhook_id}/deliveries. - Use
/v1/webhooks/any/deliveriesto triage when you’re not sure which webhook fired.
Related
Callbacks (per run)
Use
callback_url for one-off runs.Verify signatures
HMAC verification in Node and Python.
Errors
Status codes and the error envelope.
API reference
Full endpoint reference.