A run started with an API key finished a turn

POSTyour webhook URLRush sends this
View .md

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.

Headers

webhook-idstringrequired

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

webhook-timestampstringrequired

Unix seconds of this attempt.

webhook-signaturestringrequired

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

Payload

typestringrequired
One ofrun.completedrun.failedrun.cancelled
timestampstringrequired

When the turn finished.

Format date-time
dataobjectrequired
8 fields
run_idstringrequired
project_idstring | nullrequired
Format uuid
statusstringrequired

completed, needs_review, failed or cancelled.

resultobject | nullrequired

The turn's answer, as GET …/sessions/{session}/result returns it; null when there is none or it is over 16 KiB (read result_url).

3 fields
textstring | nulloptional
structuredanyoptional

The object output_schema asked for, when one was given.

schema_validboolean | nulloptional
total_cost_usdnumber | nullrequired
result_urlstringrequired
Format uri
events_urlstringrequired
Format uri
artifacts_urlstringrequired
Format uri

Your response

200Any 2xx acknowledges the delivery.