Start a run
const url = 'https://example.com/v1/runs';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"agent":"example","agentVersion":"example","projectId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","input":"example","options":{"dryRun":true,"wait":true}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/v1/runs \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "agent": "example", "agentVersion": "example", "projectId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "input": "example", "options": { "dryRun": true, "wait": true } }'One primitive, discriminated subject (agent XOR flow). When the deployment issues public run tokens, the response carries publicAccessToken: a read-only token for this run (15 minutes by default) to hand to a browser, which follows the run with it on GET /v1/runs/{runId}/progress and its stream.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Caller-supplied idempotency key. Retries with the same key return the original response byte-identical (per docs/API-ROUTE-CONVENTIONS.md §3.1).
Request Bodyrequired
Section titled “Request Bodyrequired”object
AgentId.
Semver; omit → latest.
Project to run under; omit → the tenant’s Default project.
Opaque payload forwarded to the agent binding.
object
When true, the run executes with side-effects mocked; the row is marked dryRun: true.
When false, respond 202 as soon as the run exists and finish it in the background; poll GET /v1/runs/{runId} for its status and output. Default true: respond 201 once the run completes, fails or suspends.
object
FlowId.
Semver; omit → latest.
Project to run under; omit → the tenant’s Default project.
Opaque payload forwarded to the flow runtime.
object
When true, the run executes with side-effects mocked; the row is marked dryRun: true.
When false, respond 202 as soon as the run exists and finish it in the background; poll GET /v1/runs/{runId} for its status and output. Default true: respond 201 once the run completes, fails or suspends.
Examplegenerated
{ "agent": "example", "agentVersion": "example", "projectId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "input": "example", "options": { "dryRun": true, "wait": true }}Responses
Section titled “Responses”Run finished, failed or suspended.
object
RunId.
Semver.
The run’s output once it completed. Present on single-run responses; on lists only with ?include=output.
Set on a child run (a sub-flow run, or the agent turn an agent step started): the run that started it.
Set on a child run: the node in the parent run that started it.
Only in the response to POST /v1/runs, when the deployment issues public run tokens: a read-only token for this run (and its descendants) to hand to a browser, for GET /v1/runs/{runId}/progress and its stream.
When publicAccessToken stops working.
Example
{ "status": "pending"}Run started (options.wait: false); poll GET /v1/runs/{runId}.
object
RunId.
Semver.
The run’s output once it completed. Present on single-run responses; on lists only with ?include=output.
Set on a child run (a sub-flow run, or the agent turn an agent step started): the run that started it.
Set on a child run: the node in the parent run that started it.
Only in the response to POST /v1/runs, when the deployment issues public run tokens: a read-only token for this run (and its descendants) to hand to a browser, for GET /v1/runs/{runId}/progress and its stream.
When publicAccessToken stops working.
Example
{ "status": "pending"}Malformed request body.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Missing / malformed / expired / revoked bearer token.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Agent or flow not found.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Idempotency-Key was reused with a different body, or resource-state conflict.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Guardrail violation or budget exceeded.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Server error (unmapped domain code or framework crash).
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}