Run script
POST
Run script

Authorizations

Authorization
string
header
required

Voiceflow bearer token

Query Parameters

projectID
string
required

The ID of the project to operate on.

environmentAlias
string
required

The alias of the environment to operate on (e.g. main).

Body

messages
string[]
required

The user messages to send, in order, after the launch that starts the conversation.

variables
object

Variable values to set before the launch, keyed by variable name, to start as a known caller.

version
enum<string>
default:"draft"

Whether to talk to the draft or the published version of the environment. Draft unless you pass it.

Available options: draft, published

Response

200 - application/json

Returns one digest per turn: the agent's replies, the tools it called, the variables that changed, and any errors. Messages that were not sent because the script stopped early come back in notSent, and needsRecompile says whether the turns ran against an outdated compile.

userID
string
required

The conversation user ID the script ran as, for reading its state afterwards.

needsRecompile
boolean
required

When true, the script ran against a stale prototype. Compile the environment and run it again; do not treat these turns as proof the latest edits work.

turns
object[]
required

The launch turn first, then one turn per message sent.

notSent
string[]
required

Messages that were not sent because the agent ended the conversation, a turn failed or reported errors, or the caller stopped the script first.

Use the up and down arrow keys to select a result, Enter to open it, and Escape to close the search.