Appearance
Get Chat
GET/public/chatRetrieve a list of your chat conversations, including participant info, last message, and read status.
Endpoint Details
- Authentication: Basic Auth (
Authorization: Basic Base64(AccessKey:SecretKey)) - Access Tier: Gold+
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
page | number | Yes | Page number, starting from 1. |
limit | number | Yes | Maximum items per page. |
status | string | No | Filter by chat status. Options: unread, unreplied. |
accountIds | array | No | Filter by specific account IDs. |
search | string | No | Search by sender name or message content. |
Example Request
bash
curl -X GET "https://api.repliz.com/public/chat?page=1&limit=20&status=unread&accountIds[]=680affa5ce12f2f72916f67e&search=Azickri" \
-H "Authorization: Basic $(echo -n 'YOUR_ACCESS_KEY:YOUR_SECRET_KEY' | base64)"javascript
import axios from 'axios';
const response = await axios.get('https://api.repliz.com/public/chat', {
params: {
page: 1,
limit: 20,
status: 'unread',
accountIds: 680affa5ce12f2f72916f67e,
search: 'Azickri'
},
auth: {
username: 'YOUR_ACCESS_KEY',
password: 'YOUR_SECRET_KEY'
}
});
console.log(response.data);javascript
const credentials = btoa('YOUR_ACCESS_KEY:YOUR_SECRET_KEY');
const response = await fetch('https://api.repliz.com/public/chat?page=1&limit=20&status=unread&accountIds[]=680affa5ce12f2f72916f67e&search=Azickri', {
headers: {
'Authorization': `Basic ${credentials}`
}
});
const data = await response.json();
console.log(data);Response
json
{
"docs": [
{
"_id": "69c627d16f291e00d98b5754",
"accountId": "69686c4c41ec8ac5117c8929",
"senderId": "6793729447315239",
"userId": "6879b98097fc8c8a78d1d4c1",
"__v": 0,
"createdAt": "2026-03-27T06:46:41.631Z",
"lastMessage": {
"isFromMe": false,
"senderId": "6793729447315239",
"messageId": "m_Nxw6A8mCd-4mNNkdhABNW6DllBn-ZQje_xFEJPRwKTy1oQ3eV_8gXHjUz-BMHBMo0_SEj701uyeU0bGZVPQByA",
"type": "text",
"status": "sent",
"text": "This is Me",
"sendAt": "2026-03-27T06:46:07.459Z",
"fromSenderAt": "2026-03-27T06:46:07.459Z"
},
"senderName": "Shika",
"senderPicture": "https://platform-lookaside.fbsbx.com/platform/profilepic/?eai=Aa1fFfAbP-gTCYq...",
"unreadCount": 1,
"updatedAt": "2026-03-27T06:46:41.631Z",
"account": {
"_id": "69686c4c41ec8ac5117c8929",
"generatedId": "113958387982006",
"name": "Halaman ke 3",
"username": "Cafe",
"picture": "https://scontent-cgk2-1.xx.fbcdn.net/v/t39.30808-1/281663458_113958441315334_...",
"isConnected": true,
"type": "facebook",
"userId": "6879b98097fc8c8a78d1d4c1",
"createdAt": "2026-01-15T04:25:48.838Z",
"updatedAt": "2026-03-24T14:00:00.873Z",
"__v": 0,
"id": "69686c4c41ec8ac5117c8929"
},
"id": "69c627d16f291e00d98b5754"
}
],
"totalDocs": 1,
"limit": 20,
"totalPages": 1,
"page": 1,
"pagingCounter": 1,
"hasPrevPage": false,
"hasNextPage": false,
"prevPage": null,
"nextPage": null
}json
{
"code": 401,
"message": "unauthorized"
}