Skip to content
BrainyShorts Docs
Esc
navigateopen⌘Jpreview

Fail a run

Local runs authenticate with the run token (or an API key plus executor_id). Claimed queue runs send claim_token.

POST/api/agent/runs/{id}/fail
Authorization
AuthorizationBearer token (ba_run_...) · headerrequired

Per-run token returned by start, valid for 6 hours and bound to one run.

or
AuthorizationBearer token (ba_sk_...) · headerrequired

API key from /dashboard/api-keys. Keys expire after 365 days.

Path parameters
idstringrequired

Run id

Request body
requiredapplication/json
errorstringrequired
max length 1000
claim_tokenstring
executor_idstring
metadataobject
Responses
200

OK

runobject
401

Missing, invalid, expired, or revoked API key

errorstringrequired
codestring
409

RUN_NOT_ACTIVE or CLAIM_CONFLICT

errorstringrequired
codestring
Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST "https://www.brainyshorts.com/api/agent/runs/string/fail" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "error": "string",
  "claim_token": "string",
  "executor_id": "string",
  "metadata": {}
}'
Response
{
  "run": {}
}