Skip to main content
POST
Rehearse a call against a persona

Authorizations

Authorization
string
header
required

Project API key (sk_api_…).

Path Parameters

assistantId
string<uuid>
required

The assistant to rehearse.

Body

application/json
persona
object
required

Who picks up. Kept separate from context and variables so one persona can be re-run across scenarios and contacts.

context
string

What the person picking up knows about who is ringing them and why. Overrides the context in the assistant's stored brief; with neither, they go in cold.

Maximum string length: 8000
variables
object

The contact record for this one simulated call, handed to the agent under test as its caller record. Falls back to the first sampleRows entry of the stored brief. Keys are at most 64 characters, and the whole object under 3000 characters of JSON.

Response

An event stream, not a JSON body. It looks like this on the wire:

  • turn carries {index, role, text} — index is 1-based speaking order, role is agent or caller.
  • Exactly one terminal event ends the stream: done with the whole transcript, or error with a {message} — a conversation that broke mid-flight, or one that hit the five-minute ceiling.
  • Either side can end the conversation, and the caller often does — don't assume the transcript ends on the agent's closing line.
  • On done, personaId is minted for this run and archetype is always happy, whatever path you sent.
  • : ping keepalives arrive every 15 seconds; SSE parsers drop them.
  • A stream that ends with neither terminal event is a dropped connection — there is no resume, so run it again.

The response is of type string.