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:{execution_id}:{ms the turn finished}.

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
9 fields
execution_idstringrequired
turn_idstringoptional

The turn this answers: the turn.id a follow-up returned, or the run's first turn. Absent when no turn ended with this finish; then read GET …/turns.

Format uuid
org_idstringrequired
project_idstringoptional

The Project the console ran the session in; absent for none.

Format uuid
statusstringrequired

completed, needs_review, failed or cancelled.

resultstringoptional

The turn's final answer; absent when there is none or it is over 16 KiB (GET session_url).

total_cost_usdnumberoptional
session_urlstringrequired

The session, with its full answer and artifacts.

Format uri
events_urlstringrequired
Format uri

Your response

200Any 2xx acknowledges the delivery.

Used in