Skip to main content
POST
Error

Authorizations

Authorization
string
header
required

Flowyte secret API key (Authorization: Bearer flowyte_sk_live_…). Scope-gated; is scoped to your organization — a key can never reach another tenant. The listed scopes in each operation's apiKey requirement are the scopes that key must hold. The tokenUrl is nominal: keys are minted in the dashboard.

Path Parameters

agentId
string
required

The agent this resource is scoped to (the UUID returned by createAgent / listAgents).

Body

application/json

Chat/voice draft tester request. mode selects the tester surface: text (in-UI chat tester) or voice (in-browser voice draft tester); voice_browser/probe_loopback also supported. draftMode runs the simulation against the ephemerally compiled draft config (default true for the in-builder tester).

mode
enum<string>
required
Available options:
text,
voice,
voice_browser,
probe_loopback
scenarioId
string
channel
enum<string>
default:chat

In-builder text tester channel (mode text only): chat (default, markdown-native) or sms (plain text, GSM-7 — the runtime returns a plain-text reply so the tester previews the SMS voice, and the UI shows a live segment counter). Any other value is treated as chat.

Available options:
chat,
sms
draftMode
boolean

Run against the ephemerally-compiled draft config (not the published version, not billed). Default true for the in-builder chat/voice tester.

transcript
string[]
sessionId
string

Carry ONE session across every turn of a test conversation. Server-held per-session state — the write-confirm gate, and the paused-playbook run — is keyed on it, so a fresh id per turn makes confirm-gated and multi-step flows untestable. Send the same value for the whole conversation and a new one when the tester is reset. Omitted → a fresh id per call (single-turn behaviour).

callerNumber
string

Synthetic caller ID for the test, in E.164. Lets a caller-ID data dip (e.g. "look this number up in the CRM before answering") be exercised without placing a real call. Omitted → no caller ID, which is what a real chat has.

driverState
string

Opaque conversation state returned by the previous turn's driver_state event. Hand it back unchanged on the next request and a multi-step playbook resumes exactly where it paused (same collected answers, same next question); omit it and the playbook starts over. Treat it as a token — it is signed and bound to this agent + sessionId, and editing it only makes the turn ignore it.

Response

SSE stream of SimulateEvent frames (each an AuditEventDTO).

The live simulate/chat SSE frame. It IS an AuditEventDTO: the SSE event: line equals eventType and the data: line is the AuditEventDTO JSON. Streams terminate with event: done or event: error, consumed via fetch() streaming.

id
string
required
conversationId
string
required
seq
integer
required
tsMs
integer
required

On voice rows this is a MONOTONIC clock (relative), useless as an absolute time — use createdAtMs for wall-clock dating.

channel
enum<string>
required
Available options:
voice,
chat,
sms
eventType
enum<string>
required

Authoritative AuditEvent / SimulateEvent event-type set. Each value selects the per-variant payload shape documented on AuditEventDTO.payload (see the *Payload schemas below). The legacy agent_utterance/turn_summary values are also supported for the ported audit_events write-path.

Available options:
user_utterance,
agent_message,
tool_call,
kb_retrieval,
guardrail,
verification,
language_switch,
handoff,
barge_in,
latency,
filler,
call_started,
call_ended,
error,
agent_utterance,
turn_summary,
procedure_run,
driver_state,
claim_check
payload
object
required

Per-eventType payload (see schema description for the eventType→*Payload mapping).

createdAtMs
integer

Wall-clock insert time (audit_events.created_at) as epoch ms — the reliable timestamp for dating an event on the transcript. Present on persisted receipt rows; absent on the live SSE frame.

traceId
string