List Sessions

List conversation sessions for a project with optional filters.

List conversation sessions for a project. Supports filtering by date range and session status.

Required: Owner, Editor, Viewer, or Operator role

POST
/getSessions

Authorization

bearerToken

AuthorizationBearer <token>

API token for YourGPT Public APIs. Create tokens in Settings > API Tokens in your YourGPT dashboard.

In: header

Request Body

application/x-www-form-urlencoded

project_uid*string

The project unique identifier

status?string

Filter by session status

Value in"open" | "closed"
from?string

Start date (YYYY-MM-DD)

Formatdate
to?string

End date (YYYY-MM-DD)

Formatdate
limit?integer

Number of sessions per page

Default10
Range1 <= value <= 100
page?integer

Page number

Default1
Range1 <= value
orderBy?string

Sort order

Default"ASC"
Value in"ASC" | "DESC"

Response Body

application/json

curl -X POST "https://api.yourgpt.ai/chatbot/v1/getSessions" \  -H "Content-Type: application/x-www-form-urlencoded" \  -d 'project_uid=string'
{
  "type": "RXSUCCESS",
  "message": "Session detail",
  "data": [
    {
      "session_uid": 0,
      "id": 0,
      "project_id": 0,
      "integration_id": 0,
      "status": "string",
      "chat_mode": "string",
      "state": "string",
      "segment": "string",
      "country": "string",
      "created_at": "2019-08-24T14:15:22Z",
      "updated_at": "2019-08-24T14:15:22Z",
      "last_message": "string",
      "last_message_time": "2019-08-24T14:15:22Z",
      "visitor_data": {},
      "contact_data": {},
      "session_meta": {}
    }
  ]
}