Webhooks

A run started with an API key finished a turn

Sent to the webhook_url set on the API key that started the run (PATCH /o/{org}/api-keys/{key}), within about 30 seconds of a turn finishing: one per turn of a resumable run. Signed per Standard Webhooks with the key's whsec_ secret. Any 2xx within 5 seconds acknowledges it; anything else is retried 2, 4 and 6 minutes after the first attempt with the same webhook-id, then dropped. Revoking the key or clearing its webhook drops pending retries.

postWebhookrunFinished

Headers

webhook-idstring required

Stable across retries: webhook:{execution_id}:{completed_at ms}.

webhook-timestampstring required

Unix seconds of this attempt.

webhook-signaturestring required

v1,<base64 HMAC-SHA256 of "{webhook-id}.{webhook-timestamp}.{body}", keyed by the base64 bytes after whsec_>.

Payload

type'run.completed' | 'run.failed' | 'run.cancelled' required
timestampstring date-time required

When the turn finished.

Response

Any 2xx acknowledges the delivery.

Changes

Webhooks have no change history: a webhook is keyed by its event name rather than a path and method, so no recorded change can name it.