List Chats

Returns all chats for the authenticated user with pagination support.

Query Parameters
  • page
    Type: integer

    Integer numbers.

  • size
    Type: integer

    Integer numbers.

Headers
  • Authorization
    Type: string
    required

    JWT Bearer token. Format: Bearer <JWT>

Responses
  • application/json
  • application/json
Request Example for get/api/chat/getChats
curl 'https://demo.api.whispchat.com/api/chat/getChats?page=0&size=20' \
  --header 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9...' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "chats": [
    {
      "chatId": "123e4567-e89b-12d3-a456-426614174000",
      "chatName": "string",
      "lastMessageTimestamp": "2026-05-29T11:57:30.580Z",
      "lastMessage": "string",
      "createdAt": "2026-05-29T11:57:30.580Z",
      "creator": "123e4567-e89b-12d3-a456-426614174000",
      "groupChat": true
    }
  ]
}