Skip to main content
POST
JavaScript

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Input for creating a customer flow

title
string
required
Minimum string length: 1
Example:

"Reschedule an appointment"

mode
enum<string>
required

SCRIPTED follows a step graph you author; UNSCRIPTED gives the simulated customer a brief and lets it improvise.

Available options:
UNSCRIPTED,
SCRIPTED
agentIds
string<uuid>[]
required

Agents this flow exercises. At least one is required.

Minimum array length: 1
description
string | null
scriptedBranchingMode
enum<string>

Scripted flows only. DETERMINISTIC runs one variant per path through the graph; ADAPTIVE collapses the paths into one call the customer adapts across.

Available options:
DETERMINISTIC,
ADAPTIVE
agentExpectations
object[]
steps
object[]

Required for SCRIPTED flows. At most 100 steps across at most 25 paths.

variants
object[]

Required for UNSCRIPTED flows: the briefs to run. Scripted flows get one variant per path from the graph instead.

Response

The created customer flow

data
object
required

A customer flow: the conversation a simulated customer has with the agent under test. Flows with source SYSTEM are curated by Roark, shared across projects, and read-only.