English
English
Appearance
English
English
Appearance
https://api.repliz.com/public/broadcast/audienceList the chats of an account that a broadcast can go to now, newest first. Send their _id as chatIds to Create Broadcast, or skip this step with isAll.
Authorization: Basic Base64(AccessKey:SecretKey)) or Bearer token from Login with Replizbroadcast:read (or broadcast:write)| Parameter | Type | Required | Description |
|---|---|---|---|
accountId | string | Yes | The Facebook, Instagram, TikTok, or Telegram account, the _id from Get Account. Other platforms fail with 400, and so does a disconnected account. |
audience | string | Yes | unreplied lists the chats whose last message came from the other person, so nobody answered them yet. all lists every chat. |
page | number | Yes | Page to return, starting from 1. Pages go up to the 1,000 newest chats, the most one broadcast can go to. |
limit | number | Yes | Items per page, from 1 to 100, for example 50. |
search | string | No | Matches the name of the person, case-insensitive. total still counts the whole audience. |
24-hour window
Facebook, Instagram, and TikTok only let a business message someone within 24 hours of that person's last message, so only chats whose last message from the person is less than 24 hours old are listed. The window closes 24 hours after lastMessage.fromSenderAt. Telegram has no window.
curl -X GET "https://api.repliz.com/public/broadcast/audience?accountId=680affa5ce12f2f72916f67e&audience=unreplied&page=1&limit=50" \
-H "Authorization: Basic $(echo -n 'YOUR_ACCESS_KEY:YOUR_SECRET_KEY' | base64)"import axios from 'axios';
const response = await axios.get('https://api.repliz.com/public/broadcast/audience', {
params: {
accountId: '680affa5ce12f2f72916f67e',
audience: 'unreplied',
page: 1,
limit: 50,
},
auth: {
username: 'YOUR_ACCESS_KEY',
password: 'YOUR_SECRET_KEY',
},
});
console.log(response.data);const credentials = btoa('YOUR_ACCESS_KEY:YOUR_SECRET_KEY');
const response = await fetch(
'https://api.repliz.com/public/broadcast/audience?accountId=680affa5ce12f2f72916f67e&audience=unreplied&page=1&limit=50',
{
headers: {
Authorization: `Basic ${credentials}`,
},
},
);
const data = await response.json();
console.log(data);| Field | Type | Description |
|---|---|---|
docs | object[] | The chats: _id, senderId, senderName, senderPicture, unreadCount, and lastMessage (text, type, isFromMe, sendAt, and fromSenderAt, the last message from the person). |
total | number | Every chat in the audience, whatever the search. A broadcast to the whole audience goes to up to 1,000 of them. |
totalDocs | number | Chats that match the search. |
page | number | The page returned. |
limit | number | Items per page. |
hasNextPage | boolean | Whether another page follows, within the 1,000 newest chats. |
{
"docs": [
{
"_id": "6927e1c2e4b0a1f2c3d4e5f7",
"senderId": "1784140123456789",
"senderName": "Azickri",
"senderPicture": "https://scontent.cdninstagram.com/v/t51.2885-19/azickri.jpg",
"unreadCount": 1,
"accountId": "680affa5ce12f2f72916f67e",
"lastMessage": {
"isFromMe": false,
"senderId": "1784140123456789",
"messageId": "aWdfZAG1faWQ6...",
"type": "text",
"status": "unread",
"text": "Kak, pesananku kapan dikirim?",
"sendAt": "2026-11-27T06:00:00.000Z",
"fromSenderAt": "2026-11-27T06:00:00.000Z"
}
}
],
"total": 1,
"totalDocs": 1,
"page": 1,
"limit": 50,
"hasNextPage": false
}{
"code": 400,
"message": "broadcast is not available for threads"
}{
"code": 401,
"message": "unauthorized"
}