Skip to main content
Retrieve a paginated list of chat conversations with filtering and search capabilities.
Use pagination parameters to efficiently handle large numbers of chats.

Request

X-Device-Id
string
Device identifier for multi-device support. Required when multiple devices are registered. If only one device is registered, it will be used as the default.
limit
integer
default:"25"
Maximum number of chats to return per page (max: 100)
offset
integer
default:"0"
Number of chats to skip for pagination
Search chats by name or phone number
has_media
boolean
default:"false"
Filter to only include chats that contain media messages
archived
boolean
Filter by archived status:
  • true: Return only archived chats
  • false: Return only non-archived chats
  • Omit parameter: Return all chats

Response

code
string
Response code (e.g., SUCCESS)
message
string
Response message describing the resultExample: Success get chat list
results
object
data
array
Array of chat objects
pagination
object
limit
integer
Number of items per page
offset
integer
Current offset
total
integer
Total number of chats
curl -X GET \
  'https://your-api-domain.com/chats?limit=25&offset=0&search=John' \
  -H 'X-Device-Id: my-device' \
  -u 'username:password'
{
  "code": "SUCCESS",
  "message": "Success get chat list",
  "results": {
    "data": [
      {
        "jid": "[email protected]",
        "name": "John Doe",
        "last_message_time": "2024-01-15T10:30:00Z",
        "ephemeral_expiration": 0,
        "created_at": "2024-01-10T08:00:00Z",
        "updated_at": "2024-01-15T10:30:00Z",
        "archived": false
      }
    ],
    "pagination": {
      "limit": 25,
      "offset": 0,
      "total": 150
    }
  }
}

Build docs developers (and LLMs) love