English
English
Appearance
English
English
Appearance
/public/chat/{chatId}/readMarks all messages in a conversation as read.
Authorization: Basic Base64(AccessKey:SecretKey))| Parameter | Type | Required | Description |
|---|---|---|---|
chatId | string | Yes | The unique identifier of the chat conversation. |
curl -X POST "https://api.repliz.com/public/chat/680affa5ce12f2f72916f67e/read" \
-H "Authorization: Basic $(echo -n 'YOUR_ACCESS_KEY:YOUR_SECRET_KEY' | base64)"import axios from 'axios';
const chatId = '680affa5ce12f2f72916f67e';
const response = await axios.post(`https://api.repliz.com/public/chat/${chatId}/read`, {}, {
auth: {
username: 'YOUR_ACCESS_KEY',
password: 'YOUR_SECRET_KEY'
}
});
console.log(response.data);const credentials = btoa('YOUR_ACCESS_KEY:YOUR_SECRET_KEY');
const chatId = '680affa5ce12f2f72916f67e';
const response = await fetch(`https://api.repliz.com/public/chat/${chatId}/read`, {
method: 'POST',
headers: {
'Authorization': `Basic ${credentials}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({})
});
const data = await response.json();
console.log(data);// No content returned on success{
"code": 404,
"message": "chat not found"
}{
"code": 401,
"message": "unauthorized"
}