Workflow Generation
Cancel a Run
Stop an in-progress generation run
POST
Stop an in-progress generation run. This stops the AI agents from doing any further work on the run.
Requires the Workflow: Full permission in the workflow’s workspace.
Work already applied to the workflow is kept. Cancelling stops future work — it doesn’t roll anything back.
Path Parameters
string
required
The ID of the workflow whose run you want to cancel. This is the
workflowId returned from Generate a Workflow.Body Parameters
string
The specific run to cancel. Defaults to the workflow’s active run.
Response
boolean
required
Whether the run was successfully cancelled.
string
required
The ID of the cancelled run.
string
required
The workflow ID.
Errors
Bad Request
workflowId is not a valid UUID, or runId is present but malformed.Unauthorized
Missing, invalid, or expired API key, or the key’s user is no longer a member of the organization.
Forbidden
The user does not have access to this workflow, or lacks the Workflow: Full permission in its workspace.
Not Found
No active room or run for this workflow.