Get chat history
POST
/waInstance{{idInstance}}/getChatHistory/{{apiTokenInstance}}Documentation GetChatHistory
Request
Body Params application/json
chatId
string
required
count
integer
required
Example
{
"chatId": "79001234567@c.us",
"count": 100
}
Request samples
Responses
getChatHistory(200)
HTTP Code: 200
Content Type : JSONapplication/json
Data Schema
array of:
type
string
required
idMessage
string
required
timestamp
integer
required
typeMessage
string
required
chatId
string
required
textMessage
string
required
statusMessage
string
optional
sendByApi
boolean
optional
deletedMessageId
string
required
editedMessageId
string
required
isEdited
boolean
required
isDeleted
boolean
required
senderId
string
optional
senderName
string
optional
senderContactName
string
optional
ExamplegetChatHistory
[
{
"type": "outgoing",
"idMessage": "BAE5D12345ABCDEF",
"timestamp": 1587412276,
"typeMessage": "textMessage",
"chatId": "79001234567@c.us",
"textMessage": "Hello man",
"statusMessage": "read",
"sendByApi": true,
"deletedMessageId": "",
"editedMessageId": "",
"isEdited": false,
"isDeleted": false
},
{
"type": "incoming",
"idMessage": "9DB14F14A253D33F4A9CD84123456789",
"timestamp": 1706522263,
"typeMessage": "textMessage",
"chatId": "120363153000000000@g.us",
"textMessage": "Hi",
"senderId": "70000000012@c.us",
"senderName": "Rachel",
"senderContactName": "Rachel 2",
"deletedMessageId": "",
"editedMessageId": "",
"isEdited": false,
"isDeleted": false
}
]
Last modified: 19 days ago