Idempotency-Key
A request that times out may still have started a job. Send anIdempotency-Key header with POST /jobs (or POST /jobs/{id}/rerun), and sending the same request again never starts a second, billed machine.
- A key is unique per environment for 24 hours. Use any string up to 255 visible characters, such as a UUID per logical request.
- The same key with the same body answers the original job (or group) as it is now, with
200and the headerIdempotent-Replayed: true. - The same key with a different body is a
409withdetails.reason: "idempotency_conflict". - A request still being handled answers
409withdetails.reason: "idempotency_in_progress": retry a few seconds later. - A request that was refused before any job was created (a validation error, the budget) does not use up its key.
idempotency_key in the body. The MCP server does this for you: run_job and rerun_job derive a key from each tool call and its session, so a call the agent’s client retries is not run twice, while the same call in a new session starts a new job.
Per-job callbacks
Give a job awebhook_url and Runcrate POSTs to it when the job finishes, without setting up a workspace webhook.
webhook_eventsisstarted,finishedor both (default["finished"]). A retried job getsstartedonce per attempt andfinishedonce.- The body is the same event as the workspace’s
job.startedandjob.finished, with the same retries (up to 8 attempts over about 4 hours). - It is signed with the
Runcrate-Signatureheader the same way as workspace webhooks. When the workspace has a webhook endpoint, its secret signs the callback. Otherwise the job gets a secret of its own, returned once aswebhook_secretin the answer to the request that created it: keep it then. - The URL must use https and point to a public address. The job shows it as its host and the end of its path.
- Deliveries to a job’s callback are not in the workspace’s webhook delivery log.