/ v1/ workflows/ {id}/ commandExecute a workflow command
Sends a control command to a workflow. The command field determines the action:
start — Creates a new run. Pass inputs to provide the trigger payload; step arguments can reference these values via {{input.<field>}}. Returns the new run object with status: "pending" or status: "running". Execution continues asynchronously — subscribe to the WebSocket stream to follow progress.
pause — Halts dispatching of new steps for the specified run_id. In-flight steps complete normally. The run moves to status: "paused".
resume — Re-evaluates the graph from the current state and resumes dispatching ready steps. The run moves back to status: "running".
cancel — Terminates all in-flight steps and moves the run to status: "cancelled". This action is irreversible.
> Tip: Subscribe to GET /workflows/{id}/stream before sending start to capture > all events from the beginning of the run.
Server
API key obtained from the AgentRuntime dashboard. Pass as Authorization: Bearer <key> on every request.
Stored only in this page session. It is not saved to local storage.
Runs from your browser. Non-GET requests require explicit confirmation and tokens are sent only when you click Send.
Enter a bearer token and confirm the non-GET request to enable testing.
curl -sS -X POST \
'https://api.agentruntime.io/v1/workflows/{id}/command' \
-H 'Authorization: Bearer <token>'Request body
application/json
commandrequiredstringenum: start | pause | resume | cancel
The action to perform.
Example:
"start"inputscontextrun_idstring
Required for
pause,resume, andcancelcommands — identifies the specific run to act on.Example:
"run_01hw3k9x4v8m"
Responses
- 200Command accepted. Returns current run state.
application/json
idstring
Unique run identifier.
Example:
"run_01hw3k9x4v8m"workflow_idstring
Example:
"wf_01hw3k9x4v8m"statusstringenum: pending | running | paused | completed | failed | cancelled
pending: accepted but not yet dispatchedrunning: actively executing stepspaused: execution halted (manual pause or awaiting human task)completed: all steps finished successfullyfailed: one or more steps failed with no remaining retriescancelled: stopped via a cancel command
Example:
"running"started_atstring
Example:
"2026-04-10T11:00:00Z"completed_atstring
Example:
nullinputsoutputs
Example response
{ "id": "run_01hw3k9x4v8m", "workflow_id": "wf_01hw3k9x4v8m", "status": "running", "started_at": "2026-04-10T11:00:00Z", "completed_at": null, "inputs": { "message": "I need help cancelling my subscription", "customer_id": "cust_8821" } } - 401Missing or invalid Bearer token.
application/json
errorrequiredstring
Human-readable description of what went wrong.
Example:
"workflow not found"codestring
Machine-readable error code for programmatic handling.
Example:
"NOT_FOUND"
Example response
{ "error": "unauthorized", "code": "UNAUTHORIZED" } - 404The requested resource does not exist.
application/json
errorrequiredstring
Human-readable description of what went wrong.
Example:
"workflow not found"codestring
Machine-readable error code for programmatic handling.
Example:
"NOT_FOUND"
Example response
{ "error": "workflow not found", "code": "NOT_FOUND" } - 422The request body is valid JSON but fails business validation.
application/json
errorrequiredstring
Human-readable description of what went wrong.
Example:
"workflow not found"codestring
Machine-readable error code for programmatic handling.
Example:
"NOT_FOUND"
Example response
{ "error": "workflow definition is missing required field: steps", "code": "VALIDATION_ERROR" } - 500Unexpected server error.
application/json
errorrequiredstring
Human-readable description of what went wrong.
Example:
"workflow not found"codestring
Machine-readable error code for programmatic handling.
Example:
"NOT_FOUND"
Example response
{ "error": "internal server error", "code": "INTERNAL_ERROR" }