Available endpoints
| Endpoint | Description |
|---|---|
| Conversation | |
| POST Interact (non-stream) | Returns an array of traces in response to a user interaction. Accepts state variables, request, action, and config in the body. |
| POST Interact (stream) | SSE endpoint that returns a stream of trace events followed by an end event. Supports audio, completion streaming, modality selection, and state return. |
| State | |
| GET Get conversation state | Fetches the current state of a user’s conversation, including stack, variables, and storage. |
| PUT Update conversation state | Replaces the full state of a user’s conversation (stack, variables, storage). |
| DEL Delete conversation state | Deletes all state and session data for a user’s conversation. |
| PATCH Update conversation variables | Merges the provided variables into the user’s current conversation state. |
| Session | |
| POST Emit session event | Sends an event to an active session. Useful for injecting actions mid-conversation. |
Actions and traces
When a user interacts with your agent, the request goes to Voiceflow’s runtime — the engine that processes each conversation turn, runs your agent’s logic, and produces a response. The Conversations API is your interface to that runtime. Each turn follows a request-response pattern. Your application sends an action describing what happened on the user’s side, and the runtime processes it and returns a set of traces describing how the agent responds. An action can be a user’s message, a launch request to start a new conversation, a button selection, a system event, a no-reply signal, or a handoff continuation. The most common istext:
text trace with a message, then a choice trace presenting reply options. Your application is responsible for rendering each trace type appropriately.
See Trace types for a complete reference.
Session state
Voiceflow maintains state for each user across turns using theuserID you provide. In most cases this is automatic, but the state endpoints give you direct access when you need it. You can fetch a user’s current state, update it, or delete it to reset the session — useful for testing, debugging, or building custom session management into your integration.
Variables
Variables let you pass context into an agent’s session that it can reference during a conversation. You can update a user’s variables at any point without replacing the full session state. This is useful for pre-loading information before a conversation begins (eg: the user’s name, account tier, or current page) so the agent can personalize its responses from the first turn. Note that variables are not automatically reset when a conversation’s state is reset.Environments
Requests run against thedevelopment version of your agent by default. Set the environment parameter to staging or production to target a specific published version.