Elizon Docs
API Reference

Cancel team run

DELETE /api/v1/teams/:teamId/runs/:runId — cancel an in-progress synchronous or streaming team run.

Cancels a team run that is still in progress, by the runId a /run-sync response or a /run-stream RunStarted event carried. Use it from another request — for example when your user abandons a long answer. Closing a stream's connection cancels its run on its own, so a stream needs no separate call.

For a run started with /run-async, cancel the job instead: Cancel team job.

DELETE /api/v1/teams/{teamId}/runs/{runId}

Path parameters

ParameterTypeDescription
teamIdstring (UUID)The team the run belongs to.
runIdstringThe run to cancel.

Response

200 OK whether or not the run was still going:

{ "cancelled": true, "runId": "b7e1..." }
{ "cancelled": false, "runId": "b7e1...", "message": "Run already completed." }

Cancelling a run that has already finished is not an error.

Errors

StatuserrorWhen
403forbiddenThe team belongs to a different project than your project-scoped key.
404team_not_foundNo team with that ID exists in your organization.
404run_not_foundNo run with that ID is known to the team runtime.
502bad_gatewayThe team runtime is unreachable.

Example

curl -X DELETE https://api.elizon.ai/api/v1/teams/{teamId}/runs/{runId} \
  -H "X-API-Key: elz_your_key_here"