List sessions

Updated

Retrieves the sessions in your project that match the filters.

Preview documentation

You're reading the Conversational AI Platform (Preview) docs. Switch to Main.
GET
https://preview.ai.agora.io/conversational-ai/v1/projects/{appid}/sessions

By default, the response contains running sessions that started in the last two hours.

Path Parameters

appidstring
Required

The App ID of your project.

Query Parameters

channelstring

Return only sessions in this RTC channel. The match is exact and case-sensitive. Telephony sessions have no RTC channel and never match.

statusstring

The statuses to include, separated by commas, for example RUNNING,STOPPED. Valid statuses are IDLE, STARTING, RUNNING, STOPPING, STOPPED, and FAILED.

started_afterinteger

Return only sessions that started after this time, as a Unix timestamp in seconds. Defaults to two hours before the request.

started_beforeinteger

Return only sessions that started before this time, as a Unix timestamp in seconds. Defaults to the time of the request.

limitinteger

The maximum number of sessions to return on each page.

cursorstring

The 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

Agora-Request-Idstring

A unique ID for the request. Include it when you contact Agora support.

dataobject
has_moreboolean

Whether more results are available after this page.

next_cursorstring | null

The cursor for the next page. Pass it in the cursor query parameter of your next request. null on the last page.

Authorization

This endpoint requires authentication.

Request examples

Example Request
curl -X GET 'https://preview.ai.agora.io/conversational-ai/v1/projects/string/sessions'

Response example

Example Response
{  "data": {    "count": 1,    "list": [      {        "agent_session_id": "a42ac95tp25py49fc37hp94vm67ht52h",        "start_ts": 1735035893,        "status": "RUNNING"      }    ]  },  "has_more": true,  "next_cursor": "a42aj97dh44ve73km82yr34rr67pk75e"}