Skip to content

Start a run

POST
/v1/runs
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.

Idempotency-Key
string
>= 1 characters

Caller-supplied idempotency key. Retries with the same key return the original response byte-identical (per docs/API-ROUTE-CONVENTIONS.md §3.1).

Media typeapplication/json
One of:
object
agent
required

AgentId.

string
agentVersion

Semver; omit → latest.

string
projectId

Project to run under; omit → the tenant’s Default project.

string format: uuid
input
required

Opaque payload forwarded to the agent binding.

options
object
dryRun

When true, the run executes with side-effects mocked; the row is marked dryRun: true.

boolean
wait

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.

boolean
Examplegenerated
{
"agent": "example",
"agentVersion": "example",
"projectId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"input": "example",
"options": {
"dryRun": true,
"wait": true
}
}

Run finished, failed or suspended.

Media typeapplication/json
object
id
required

RunId.

string format: uuid
tenantId
required
string format: uuid
projectId
string format: uuid
flowId
required
string
flowVersion
required

Semver.

string
status
required
string
Allowed values: pending running suspended completed failed cancelled
dryRun
required
boolean
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
completedAt
string format: date-time
failureMessage
string
output

The run’s output once it completed. Present on single-run responses; on lists only with ?include=output.

parentRunId

Set on a child run (a sub-flow run, or the agent turn an agent step started): the run that started it.

string format: uuid
parentNodeId

Set on a child run: the node in the parent run that started it.

string
publicAccessToken

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.

string
publicAccessTokenExpiresAt

When publicAccessToken stops working.

string format: date-time
Example
{
"status": "pending"
}

Run started (options.wait: false); poll GET /v1/runs/{runId}.

Media typeapplication/json
object
id
required

RunId.

string format: uuid
tenantId
required
string format: uuid
projectId
string format: uuid
flowId
required
string
flowVersion
required

Semver.

string
status
required
string
Allowed values: pending running suspended completed failed cancelled
dryRun
required
boolean
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
completedAt
string format: date-time
failureMessage
string
output

The run’s output once it completed. Present on single-run responses; on lists only with ?include=output.

parentRunId

Set on a child run (a sub-flow run, or the agent turn an agent step started): the run that started it.

string format: uuid
parentNodeId

Set on a child run: the node in the parent run that started it.

string
publicAccessToken

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.

string
publicAccessTokenExpiresAt

When publicAccessToken stops working.

string format: date-time
Example
{
"status": "pending"
}

Malformed request body.

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).

string
message
required
string
details

Optional, kind-specific.

object
key
additional properties
any
requestId
required

Server-assigned request id; also echoed via X-Request-Id header.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": {},
"requestId": "example"
}
}

Missing / malformed / expired / revoked bearer token.

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).

string
message
required
string
details

Optional, kind-specific.

object
key
additional properties
any
requestId
required

Server-assigned request id; also echoed via X-Request-Id header.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": {},
"requestId": "example"
}
}

Agent or flow not found.

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).

string
message
required
string
details

Optional, kind-specific.

object
key
additional properties
any
requestId
required

Server-assigned request id; also echoed via X-Request-Id header.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": {},
"requestId": "example"
}
}

Idempotency-Key was reused with a different body, or resource-state conflict.

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).

string
message
required
string
details

Optional, kind-specific.

object
key
additional properties
any
requestId
required

Server-assigned request id; also echoed via X-Request-Id header.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": {},
"requestId": "example"
}
}

Guardrail violation or budget exceeded.

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).

string
message
required
string
details

Optional, kind-specific.

object
key
additional properties
any
requestId
required

Server-assigned request id; also echoed via X-Request-Id header.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": {},
"requestId": "example"
}
}

Server error (unmapped domain code or framework crash).

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).

string
message
required
string
details

Optional, kind-specific.

object
key
additional properties
any
requestId
required

Server-assigned request id; also echoed via X-Request-Id header.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": {},
"requestId": "example"
}
}