Mark a message as read
curl --request POST \
--url https://api.wsapi.chat/messages/{messageId}/read \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--header 'X-Instance-Id: <x-instance-id>' \
--data '
{
"chatId": "1234567890@s.whatsapp.net",
"senderId": "1234567890@s.whatsapp.net",
"receiptType": "read"
}
'import requests
url = "https://api.wsapi.chat/messages/{messageId}/read"
payload = {
"chatId": "1234567890@s.whatsapp.net",
"senderId": "1234567890@s.whatsapp.net",
"receiptType": "read"
}
headers = {
"X-Instance-Id": "<x-instance-id>",
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Instance-Id': '<x-instance-id>',
'X-Api-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
chatId: '1234567890@s.whatsapp.net',
senderId: '1234567890@s.whatsapp.net',
receiptType: 'read'
})
};
fetch('https://api.wsapi.chat/messages/{messageId}/read', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));using RestSharp;
var options = new RestClientOptions("https://api.wsapi.chat/messages/{messageId}/read");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-Instance-Id", "<x-instance-id>");
request.AddHeader("X-Api-Key", "<api-key>");
request.AddJsonBody("{\n \"chatId\": \"1234567890@s.whatsapp.net\",\n \"senderId\": \"1234567890@s.whatsapp.net\",\n \"receiptType\": \"read\"\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
{
"status": 400,
"detail": "invalid request body"
}{
"status": 401,
"detail": "unauthorized"
}{
"status": 403,
"detail": "device not paired"
}{
"status": 503,
"detail": "instance not available"
}Messages
Mark a message as read
Mark a message as read with the specified receipt type.
POST
/
messages
/
{messageId}
/
read
Mark a message as read
curl --request POST \
--url https://api.wsapi.chat/messages/{messageId}/read \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--header 'X-Instance-Id: <x-instance-id>' \
--data '
{
"chatId": "1234567890@s.whatsapp.net",
"senderId": "1234567890@s.whatsapp.net",
"receiptType": "read"
}
'import requests
url = "https://api.wsapi.chat/messages/{messageId}/read"
payload = {
"chatId": "1234567890@s.whatsapp.net",
"senderId": "1234567890@s.whatsapp.net",
"receiptType": "read"
}
headers = {
"X-Instance-Id": "<x-instance-id>",
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Instance-Id': '<x-instance-id>',
'X-Api-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
chatId: '1234567890@s.whatsapp.net',
senderId: '1234567890@s.whatsapp.net',
receiptType: 'read'
})
};
fetch('https://api.wsapi.chat/messages/{messageId}/read', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));using RestSharp;
var options = new RestClientOptions("https://api.wsapi.chat/messages/{messageId}/read");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-Instance-Id", "<x-instance-id>");
request.AddHeader("X-Api-Key", "<api-key>");
request.AddJsonBody("{\n \"chatId\": \"1234567890@s.whatsapp.net\",\n \"senderId\": \"1234567890@s.whatsapp.net\",\n \"receiptType\": \"read\"\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
{
"status": 400,
"detail": "invalid request body"
}{
"status": 401,
"detail": "unauthorized"
}{
"status": 403,
"detail": "device not paired"
}{
"status": 503,
"detail": "instance not available"
}Authorizations
Instance or customer-level API key. Either the instance's own API key or the customer's API key is accepted. Must be paired with the X-Instance-Id header to identify the target instance.
Headers
The ID of the WhatsApp instance to use
Path Parameters
Message ID
Body
application/json
Response
Message marked as read
⌘I