POST
/
apps
/
{app_id}
/
workflows
/
{workflow_id}
/
runs
{
  "id": "<string>",
  "result": "<any>",
  "input": {},
  "output": {},
  "status": "RUNNING",
  "origin": "WORKFLOW",
  "error": "<string>",
  "started_at": "2023-12-25",
  "ended_at": "2023-12-25",
  "app_id": "<string>",
  "workflow_app_id": "<string>",
  "workflow_id": "<string>",
  "workflow_version_draft": {
    "key": "<string>",
    "input": {},
    "input_default": {},
    "input_options": {
      "display": {
        "field": "inline",
        "container": "grid",
        "hidden": true
      }
    },
    "steps": [
      {
        "type": "note",
        "key": "<string>",
        "display": "expanded",
        "conditional": "<string>",
        "loop": "<string>",
        "throw_on_error": true,
        "input_connected": true,
        "destinations": [
          "<string>"
        ],
        "position": [
          123
        ],
        "size": [
          101
        ],
        "auto": {
          "provider": "<string>",
          "model": "<string>",
          "temperature": 1
        },
        "note": "<string>"
      }
    ]
  },
  "workflow_version": {
    "id": "<string>",
    "app_id": "<string>",
    "workflow_id": "<string>",
    "description": "<string>",
    "version": 123,
    "rollback_version": 123,
    "notes": "<string>",
    "created_by": {
      "id": "<string>",
      "name": "<string>"
    },
    "created_at": "2023-12-25",
    "key": "<string>",
    "input": {},
    "input_default": {},
    "input_options": {
      "display": {
        "field": "inline",
        "container": "grid",
        "hidden": true
      }
    },
    "steps": [
      {
        "type": "note",
        "key": "<string>",
        "display": "expanded",
        "conditional": "<string>",
        "loop": "<string>",
        "throw_on_error": true,
        "input_connected": true,
        "destinations": [
          "<string>"
        ],
        "position": [
          123
        ],
        "size": [
          101
        ],
        "auto": {
          "provider": "<string>",
          "model": "<string>",
          "temperature": 1
        },
        "note": "<string>"
      }
    ]
  },
  "collection_id": "<string>",
  "record_id": "<string>",
  "version": 123,
  "usage": {
    "total": 123,
    "calls": [
      {
        "id": "<string>",
        "total": 123,
        "calls": [
          {}
        ]
      }
    ],
    "steps": {}
  },
  "retention": {
    "max_age_in_seconds": 3600,
    "preserve_on_failure": true
  },
  "retention_due_at": "2023-12-25",
  "created_at": "2023-12-25",
  "updated_at": "2023-12-25"
}

Path Parameters

app_id
string
required

The ID of the app

workflow_id
string
required

The ID of the workflow

Query Parameters

verbose
enum<string>[]

Body

Data to create a new run

input
object | null

Default config input values of the workflow Input values for the run

stream
boolean

Indicates if the run should stream output to the client as it becomes available via SSE (Server-Sent Events)

background
boolean

Indicates if the run should be executed in the background and return the run information immediately

retention

Data retention policy for the run

workflow_version_id

ID of the workflow version. Also you can use "latest", "draft" or "version number" to use a specific version

Available options:
draft,
latest
Example:

"latest"

from_step_key
string | null

Step key to start the run from

identifier
string

Temporary WebSocket identifier used to track run status before creation completes

Maximum length: 256

Response

200 - application/json
id
string
required

Unique identifier for the run

input
object | null
required

Default config input values of the workflow Input values used for the run

output
object
required

Output of the run

status
enum<string>
required

Status of the run

Available options:
PENDING,
RUNNING,
CANCELLED,
COMPLETED,
SKIPPED,
FAILED
Example:

"RUNNING"

origin
enum<string>
required

Origin of the run

Available options:
WORKFLOW,
TRIGGER,
RECORD,
TEST,
ENDPOINT,
WEBHOOK
Example:

"WORKFLOW"

started_at
string | null
required

Timestamp of when the run started

ended_at
string | null
required

Timestamp of when the run ended

app_id
string
required

ID of the associated app where the run was triggered from

workflow_app_id
string
required

ID of the associated app where the workflow belongs to

workflow_id
string
required

ID of the associated workflow

workflow_version_draft
object | null
required

Draft version of the workflow

workflow_version
object | null
required

Details of the workflow version used for the run

created_at
string | null
required

Timestamp of when the run was created

updated_at
string | null
required

Timestamp of when the run was last updated

result
any

Result of the workflow step run Result of the run

error
string

Error message if the run failed

collection_id
string

ID of the associated collection

record_id
string

ID of the associated record

version
number

Version number of the workflow

usage
object

Credits usage of the step run Credits usage of the run

retention
object | null

Configuration for how long run data is preserved in the system

Example:
{
"max_age_in_seconds": 3600,
"preserve_on_failure": true
}
retention_due_at
string | null

Timestamp of when the run data retention policy will be applied