v1
latestOpenAPI 3.1.02026-07-1413113265.9 KBchat
get all chats
Retrieves a list of all chats with their latest messages and metadata. Supports pagination.
post/instances/{id}/client/action/get-chats
Path parameters
idinteger required
Instance ID
Request body
Example request
{
"limit": 10
}Response
Returns a list of chats with their metadata and latest messages
Example response
{
"instanceId": "1",
"data": [
{
"id": {
"server": "c.us",
"user": "xxxxxxxxxxxx",
"_serialized": "xxxxxxxxxxxx@c.us"
},
"name": "Contact Name",
"timestamp": 1738947027,
"lastMessage": {
"id": {
"fromMe": true,
"remote": "xxxxxxxxxxxx@c.us",
"id": "XXXXXXXXXXXXXXXXXXXX",
"_serialized": "true_xxxxxxxxxxxx@c.us_XXXXXXXXXXXXXXXXXXXX"
},
"body": "Message content",
"type": "chat",
"timestamp": 1738947027,
"from": "xxxxxxxxxxxx@c.us",
"to": "xxxxxxxxxxxx@c.us"
}
}
],
"status": "success"
}