Create Workflow

Creates an organization-scoped workflow draft. Send the complete graph using nodes, edges, and optional global_edges.
name
string
required
Workflow name (max 255 characters).
description
string
Optional workflow description.
nodes
array
required
Graph nodes, each with id, type, and data.
edges
array
required
Local graph edges.
global_edges
array
Conditional transitions considered before local edges.
variables_schema
object
Declared workflow variables.
ui_state
object
Canvas nodes, edges, and viewport for the dashboard.
compliance_plan
object
Workflow recording, consent, and retention configuration.
analysis_enabled
boolean
Enable post-call analysis.
analysis_profile_id
integer
Organization analysis profile ID.

Graph Reference

Nodes

Each node is { "id": string, "type": string, "data": object }. Node types endCall and data are accepted compatibility aliases; new API payloads should use end and task. Node data fields

Edges

Each edge is { "id": string, "source": string, "source_handle": string?, "target": string, "condition": object? }.
condition.variable
string
Session variable to evaluate.
condition.operator
string
Comparison operator: eq, neq, gt, gte, lt, lte, contains, exists.
condition.value
string
Value to compare against.
Logic evaluates outgoing edges in order — put specific conditions first and leave one unconditional edge as the fallback. Legacy payloads can nest the condition inside data.condition/data.conditions; the API normalizes these into condition.

Variables Schema

variables_schema maps variable names to their typed definitions.

Compliance Plan

Workflows accept the same compliance_plan structure as assistants, including audio_redaction. The plan is inert unless enabled is true. The published version snapshot controls runtime disclosure, consent, retention, redaction, and whether post-call artifacts can be emitted. Workflows accept the same compliance_plan structure as assistants: enabled, ai_disclosure, recording_consent (with max_attempts 1–3 and end_call_on_decline), transcript_retention, and sensitive_data (with up to 10 custom regex patterns). The plan is inert unless enabled is true.

Inheritance and overrides

The workflow global configuration establishes the default prompt, providers, compliance policy, and analysis selection. A Start node’s start_speaking_plan overrides the inherited speaking plan for the workflow session. Each Agent node can then override model, voice, and transcriber for its scoped handoff; Conversation nodes keep the active Agent configuration. Provider objects use the same canonical snake_case structures as Create Assistant.

Full graph payload

Errors