Skip to main content
GET
/
api
/
chats
curl --request GET \
  --url 'https://api.yourdomain.com/api/chats?limit=20&offset=0' \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "chats": [
    {
      "id": "chat_123abc",
      "name": "Project Discussion",
      "createdAt": "2024-01-15T10:30:00Z",
      "updatedAt": "2024-01-15T14:20:00Z"
    }
  ],
  "nextOffset": 20,
  "hasMore": false,
  "total": 15,
  "message": "Chats retrieved successfully"
}

Query Parameters

limit
number
default:20
Number of results per page
offset
number
default:0
Pagination offset

Response

success
boolean
Indicates if the request was successful
chats
array
Array of chat objects
nextOffset
number
Offset for the next page of results
hasMore
boolean
Indicates if there are more results available
total
number
Total number of chats
message
string
Response message
curl --request GET \
  --url 'https://api.yourdomain.com/api/chats?limit=20&offset=0' \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "chats": [
    {
      "id": "chat_123abc",
      "name": "Project Discussion",
      "createdAt": "2024-01-15T10:30:00Z",
      "updatedAt": "2024-01-15T14:20:00Z"
    }
  ],
  "nextOffset": 20,
  "hasMore": false,
  "total": 15,
  "message": "Chats retrieved successfully"
}