Appearance
List chats
Returns the channel's chats (people and groups), most recent first, with their last message.
GET/api/user/whatsapp-qr/channels/{channel}/chats
Required scope:
whatsapp-qr:readPath parameters
integer
Query parameters
integer
integer
curl -X GET "https://loopx-console.test/api/user/whatsapp-qr/channels/105/chats?limit=20&offset=0" \
-H "Authorization: Bearer $TOKEN" \
-H "Accept: application/json"Example response
{
"status": true,
"code": 200,
"validation": [],
"message": "Chats",
"data": [
{
"id": "201066278084@c.us",
"name": "Mahmoud Ahmed",
"picture": "https://pps.whatsapp.net/v/t61.24694-24/…",
"lastMessage": {
"id": "false_201066278084@c.us_3AEF0449C153977B1897",
"timestamp": 1791204698,
"from": "201066278084@c.us",
"fromMe": false,
"source": "app",
"body": "Is the offer still available?",
"hasMedia": false,
"ack": 2,
"ackName": "DEVICE"
},
"_chat": {
"id": "201066278084@c.us",
"unreadCount": 1,
"conversationTimestamp": 1791204698
}
}
]
}Response fields
| Field | Type | Description |
|---|---|---|
id | string | Chat id. It ends in @g.us for groups. Use it in List messages and the send endpoints. |
name | string | null | Contact or group name |
picture | string | null | Profile picture URL |
lastMessage | object | null | The latest message, in the same shape as List messages |
_chat | object | Raw chat data from WhatsApp |