Manage chats
curl --request POST \
--url https://core.wadial.com/api/v1/sessions/{sessionId}/chats/action \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://core.wadial.com/api/v1/sessions/{sessionId}/chats/action', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://core.wadial.com/api/v1/sessions/{sessionId}/chats/action"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)API Reference
Manage chats
Mute, pin, archive, mark read, lock, star, clear, and delete chats.
POST
/
api
/
v1
/
sessions
/
{sessionId}
/
chats
/
action
Manage chats
curl --request POST \
--url https://core.wadial.com/api/v1/sessions/{sessionId}/chats/action \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://core.wadial.com/api/v1/sessions/{sessionId}/chats/action', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://core.wadial.com/api/v1/sessions/{sessionId}/chats/action"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)Apply a chat action
POST /api/v1/sessions/{sessionId}/chats/action
Authorization: Bearer <api_key>
Content-Type: application/json
{
"chatJid": "[email protected]",
"action": "archive"
}
action values:
[
"mute",
"unmute",
"pin",
"unpin",
"archive",
"unarchive",
"mark_read",
"mark_unread",
"lock",
"unlock",
"clear",
"delete"
]
mute, include muteEndTimestampMs. For clear, you can include deleteStarred and deleteMedia. For delete, you can include deleteMedia.
{
"data": {
"sessionId": "01J...",
"to": "[email protected]",
"action": "archive",
"messageId": null
}
}
Star or unstar a message
POST /api/v1/sessions/{sessionId}/chats/messages/star
Authorization: Bearer <api_key>
Content-Type: application/json
{
"message": {
"chatJid": "[email protected]",
"id": "3EB0A1B2C3D4E5F6",
"fromMe": false
},
"starred": true
}
starred to false to unstar the message.Was this page helpful?