Cancel a run
Durably requests cancellation of a run. The response remains cancelling until the owning worker acknowledges the signal or its execution lease expires. Repeating the request is idempotent. Closing a client connection does not cancel a run, and cancellation does not roll back external effects that already completed. Only the API key that started the run may cancel it.
Authorizations
Workspace API key created in Erstan Settings. Keys carry scopes (agents:list, agents:read, agents:write, agents:run, runs:read, tasks:execute, documents:read, documents:write, files:read, files:write). Agent access follows the key creator's current workspace, team, and agent permissions. Agent draft creation requires agents:write; update, validation, and publishing require both agents:read and agents:write; draft testing also requires agents:run. Keys with tasks:execute must include at least one allowed project or team (allowedProjectIds / allowedTeamIds); keys with document or file scopes must include at least one allowed team. Empty allowlists mean no access — the API fails closed.
Path Parameters
Run ID returned by POST /v1/public/agents/{agentId}/runs.
Response
Cancellation state, including idempotency and acknowledgement timestamps.