Server
Sessions and usage
Read a conversation’s transcript, recording and timings, and a flow’s usage over time.
Reading needs only the flow key. Pass it on each call, or set it as the client's default flowKey.
Read a session
Read one session by its id:
const record = await voxio.sessions.get("SESSION_ID", { flowKey: "YOUR_FLOW_KEY" });
record.transcription; // → [{ role: "user", content: "Hi" }, …]record.recordingUrl; // when recording was onrecord.startTime; // ISO 8601record.totalConnectedTime; // secondsReplace the following:
SESSION_ID: the session's id. It's on the browser session (session.sessionId), in theendedevent and in every webhookYOUR_FLOW_KEY: the key of the flow the session belongs to
Read usage
Read a flow's totals for a period, broken down by hour, day, week or month:
const usage = await voxio.sessions.usage({ flowKey: "YOUR_FLOW_KEY", from: "2026-10-01", to: "2026-10-31", bucket: "day",});
usage.totals.sessions; // → 412usage.totals["connected-minutes"]; // → 1873usage.buckets; // one entry per day, with the same fieldsEach total and each bucket has these fields:
| Field | What it counts |
|---|---|
sessions | Sessions. |
connected-seconds, connected-minutes | Time on the line. |
ai-seconds, human-seconds | Time each side spent talking. |
ai-tokens, human-tokens, total-tokens | Tokens on each side. |
time-ratio, token-ratio | Agent divided by human, or null. |
Next steps
- Webhooks: get each session as it happens instead of reading it later.
- Server SDK: set a default flow key on the client.