Sessions
Every conversation an agent has, inbound or outbound, playground or production, is written as a session you can read back. Sessions are read-only over the API.
Listing and filtering
The session list is paginated and filterable. You can narrow by agent, by lead, by campaign, by status, by direction (who called whom), by session type, by call type (audio or video), by date range, or by free-text search.
curl "https://api.saaya.ai/api/v1/sessions?agent_id=…&call_type=audio&start_date=2026-04-01T00:00:00Z" \
-H "X-API-Key: sa_..."
curl https://api.saaya.ai/api/v1/sessions/{call_id} \
-H "X-API-Key: sa_..."Recordings and artifacts
A session's recording is fetched through the session itself, as is any other artifact the conversation produced. Both return a time-limited URL rather than the bytes, so you can hand the link straight to a player or a download.
curl https://api.saaya.ai/api/v1/sessions/{call_id}/recording \
-H "X-API-Key: sa_..."
curl https://api.saaya.ai/api/v1/sessions/{call_id}/artifacts/{artifact_id}/url \
-H "X-API-Key: sa_..."Aggregate stats
For a period summary rather than individual conversations, ask for stats over a date range. You get call volume, average duration, and cost, each alongside the same figure for the immediately preceding period of equal length, so a number is always shown against a baseline. Optionally scope it to one agent.
curl "https://api.saaya.ai/api/v1/sessions/stats?start_date=2026-04-01T00:00:00Z&end_date=2026-04-30T23:59:59Z" \
-H "X-API-Key: sa_..."