Skip to main content
Every conversation with a Voiceflow agent runs in two phases: you start a session once to get a session key, then send actions against that key for as long as the conversation lasts. The session key, not your API key, is what authorizes each turn. This recipe runs three requests: one to open the session, one to launch the conversation, and one to send a user message. It needs nothing but curl and jq.
Last verified 2026-08-13 by executing the recipe end to end.

The recipe

main.sh

How it works

  • The session key is scoped to one user and one conversation. Starting a new session for the same userID ends the previous one.
  • launch runs everything your agent does before the first user turn, which is why the first response can carry many traces.
  • Every response is an array of traces. Your application decides how to render each type; most carry a text trace with the agent’s reply.

When it fails