Skip to main content
GET
/
api
/
v1
/
chats
List chats
curl --request GET \
  --url http://localhost:{port}/api/v1/chats \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "id": "<string>",
      "name": "<string>",
      "isGroup": true,
      "unreadCount": 123,
      "timestamp": 123,
      "pinned": true,
      "muted": true,
      "archived": true
    }
  ],
  "pagination": {
    "total": 123,
    "page": 123,
    "pageSize": 123,
    "totalPages": 123
  }
}

Authorizations

Authorization
string
header
required

JWT token authentication

Query Parameters

page
number

Page number

limit
number

Items per page

unreadOnly
boolean

Filter to only show chats with unread messages

Response

200 - application/json

Chats retrieved successfully

data
object[]
required

Array of chats

pagination
object
required

Pagination metadata