API ReferenceChats & History
Get messages from a specific chat
GET
/api/gateway/chat/{chat_jid}/messagesGet messages from a specific chat
Headers
Authorizationstringrequired
Bearer format: Bearer <API_KEY>.
X-Device-Idstringoptional
Optional / Session-scoped. Target WhatsApp session ID.
Query Parameters
limitintegerrequired
-
offsetintegerrequired
-
start_timestringoptional
-
end_timestringoptional
-
media_onlybooleanoptional
-
is_from_mebooleanoptional
-
searchstringoptional
-
Returns
Returns standard Wayits response envelope with status: 200 and code: "SUCCESS". The response payload is available inside results.
curl -X GET "https://api.yourdomain.com/api/gateway/chat/{chat_jid}/messages?limit=&offset=" \
-H "Authorization: Bearer $WAYITS_API_KEY" \
-H "X-Device-Id: $WAYITS_DEVICE_ID"200 — Example
{
"status": 200,
"code": "SUCCESS",
"message": "Success",
"results": {
"message_id": "3EB0C8B729314C12821E",
"status": "Success"
}
}