Skip to main content
GET
Retrieve a workflow

Authorizations

Authorization
string
header
required

A project API key, created in the dashboard.

Path Parameters

workflow
string
required

ID of the workflow.

Query Parameters

version
enum<string>
default:published

published (the default) or draft.

Available options:
published,
draft

Response

The workflow.

object
any
required
id
string
required
Example:

"3f2b8c1e-5d4a-4e7b-9c6f-1a2b3c4d5e6f"

agent
object
required

The agent this belongs to.

name
string
required
Example:

"Welcome new conversations"

description
string | null
required
state
enum<string>
required

draft: never turned on. active: runs when its trigger events happen. paused: published but turned off. archived: turned off and archived in the dashboard.

Available options:
draft,
active,
paused,
archived
triggers
object[]
required

The events that start the workflow, from the published version, or from the draft if it was never published.

published_version
object | null
required

The version that runs while the workflow is active. null if it was never published.

has_unpublished_changes
boolean
required

Whether the draft in the builder differs from the published version.

last_run_status
enum<string> | null
required

How the latest run went. null if it hasn't run.

Available options:
pending,
running,
waiting,
succeeded,
partially_succeeded,
failed,
cancelled,
null
dashboard_url
string<uri>
required

Where to open the workflow in the dashboard's builder.

Example:

"https://app.chatling.ai/projects/a1b2c3d4e5/chatbots/f6g7h8i9j0/workflows/3f2b8c1e-5d4a-4e7b-9c6f-1a2b3c4d5e6f"

created_at
string<date-time> | null
required
updated_at
string<date-time> | null
required
definition
object | null

Only in Retrieve a workflow: the published version's, or the draft's with version=draft. null if the workflow was never published.

draft
object | null

Only with version=draft. Changes to the draft send revision, and are refused if it changed since.

validation
object

Only with version=draft: what's left before the draft can be published.