List sessions
Updated
Retrieves the sessions in your project that match the filters.
Preview documentation
https://preview.ai.agora.io/conversational-ai/v1/projects/{appid}/sessionsBy default, the response contains running sessions that started in the last two hours.
appidstringThe App ID of your project.
channelstringReturn only sessions in this RTC channel. The match is exact and case-sensitive. Telephony sessions have no RTC channel and never match.
statusstringThe statuses to include, separated by commas, for example RUNNING,STOPPED. Valid statuses are IDLE, STARTING, RUNNING, STOPPING, STOPPED, and FAILED.
started_afterintegerReturn only sessions that started after this time, as a Unix timestamp in seconds. Defaults to two hours before the request.
started_beforeintegerReturn only sessions that started before this time, as a Unix timestamp in seconds. Defaults to the time of the request.
limitintegerThe maximum number of sessions to return on each page.
cursorstringThe next_cursor value from the previous page of results. Omit it to get the first page. The cursor is opaque, so pass it back unchanged.
Response Body
The request was successful. The response body contains a page of sessions.
Response Headers
dataobjectcountintegerThe number of sessions on this page.
listarray<object>The sessions on this page.
agent_session_idstringThe ID of the session.
statusstringThe status of the session:
IDLE: The session is idle.STARTING: The session is starting.RUNNING: The session is running.STOPPING: The session is stopping.STOPPED: The session has ended.FAILED: The session failed.
start_tsintegerThe time the session was created, as a Unix timestamp in seconds.
has_morebooleanWhether more results are available after this page.
next_cursorstring | nullThe cursor for the next page. Pass it in the cursor query parameter of your next request. null on the last page.
Request examples
curl -X GET 'https://preview.ai.agora.io/conversational-ai/v1/projects/string/sessions'Response example
{ "data": { "count": 1, "list": [ { "agent_session_id": "a42ac95tp25py49fc37hp94vm67ht52h", "start_ts": 1735035893, "status": "RUNNING" } ] }, "has_more": true, "next_cursor": "a42aj97dh44ve73km82yr34rr67pk75e"}