POST /flows/definitions and run them with POST /flows/definitions/{id}/trigger — see how GetDialed works for the big picture.
Top-level structure
Expression syntax is validated when you create or update a definition — a malformed expression returns
422 with the offending step, task, and field.
Inputs
Inputs declare the data a caller provides ininput_data when triggering. Each input has:
Variables
Variables are definition-level values — thresholds, list names, feature switches — referenced as{{var.name}}. Each has a name, a type (same set as inputs), and a value. Changing a variable means updating the definition, so use them for values that change per version, and use inputs for values that change per trigger.
Steps and tasks
Steps run sequentially; the tasks inside a step run concurrently. Each step has astep_id (unique within the definition), an optional name, a list of tasks, and optional exit_conditions.
Every task requires five identifying fields:
And supports these optional fields:
task_id values must be unique across the entire definition — not just within their step — and step_id values must be unique too. Duplicates are rejected at creation time.Success and failure policies
on_failure: abort_step(default) — the task’s error fails the execution.on_failure: log_and_continue— the task records a failed result and the flow proceeds.on_success: skip_step— a successful result skips the remaining tasks in the current step.on_success: abort_execution/on_failure: abort_execution— stop the whole execution.
Exit conditions
Exit conditions run after all tasks in a step finish. Each pairs a boolean expression with an action:Complete example
A two-step definition: fetch Five9 contact lists, then add a record to one of them during business hours.Deleting a definition
DELETE /flows/definitions/{id} removes a definition. If any schedules still reference it, the delete is refused with 409 so a live schedule is never left firing into a definition that no longer exists. The response body lists the blocking schedules:
DELETE /flows/schedules/{id}, then retry the definition delete. Batches and executions the definition already produced are unaffected.