Skip to main content
PUT
JavaScript

Authorizations

Authorization
string
header
required

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

Path Parameters

flowId
string<uuid>
required

Body

application/json
graph
object[]
required

The complete graph. This replaces the flow's existing steps rather than merging into them.

Minimum array length: 1

One step in a scripted flow's conversation.

nodeId is the identity contract: include it to update the existing step, omit it to create a new one. A step continues into steps (more than one child is a branch point) and/or mergeIntoNodeIds, which names steps elsewhere in the same request that this step rejoins. Branches that come back together are represented that way rather than by repeating the shared step, so reading a flow, editing it and writing it back preserves it exactly.

A merge target is named by its nodeId when it already exists, or by ref when it is being created in the same request. ref is a label you choose, it is request-local, and it is never stored or returned. Put the shared step inline under the first branch that reaches it and point the others at it: a top-level step is a root wired straight from the start of the flow, so a merge target parked there would also be reachable directly.

A CUSTOMER_TURN describes what the simulated customer says and the persona phrases it; a CUSTOMER_VERBATIM_TURN is said word for word, and one placed as a top-level step opens the call the moment it connects, before the agent speaks. CUSTOMER_FIRST_MESSAGE is the retired name for that opening case: still accepted, stored and returned as CUSTOMER_VERBATIM_TURN.

The two DTMF types are mirror images and both require dtmfDigits. CUSTOMER_DTMF is keys the simulated caller presses while navigating your agent. AGENT_DTMF is keys your agent under test is expected to press while navigating a menu the simulation is playing, so its digits are an assertion the run is graded against rather than an instruction, and it counts as an agent turn for role alternation.

In a STRICT flow an AGENT_TURN may carry its own offScriptPolicy, which replaces the flow-level one at that step. Omit it (or send null) to follow the flow's policy. Use it where one missed step makes the rest of the call meaningless: an authentication menu, say, with then: HANG_UP_INVALIDATE.

allowUnmerge
boolean

Confirms a write that drops branches which currently rejoin. Only needed when the request omits mergeIntoNodeIds references the flow already had; a faithful round trip never needs it.

Response

The flow graph after the write

data
object
required