chat
get all chats
Retrieves a list of all chats with their latest messages and metadata. Supports pagination.
post/instances/{id}/client/action/get-chats
Request
- Base URL: https://waapi.app/api/v1
- URL: https://waapi.app/api/v1/instances/{id}/client/action/get-chats
- Auth: HTTP bearer
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"
}Changes
No recorded changes to this operation across all 1 revision of this API.