import { PeriskopeApi } from '@periskope/periskope-client';
const client = new PeriskopeApi({
authToken: 'YOUR_API_KEY',
phone: 'YOUR_PHONE_NUMBER', // e.g., '919876543210'
});
async function getBroadcastStatus() {
const response = await client.queue.getBroadcastStatus({
broadcast_id: '22b2a2a4-3c61-4b94-807c-fa431e71a8e5'
});
console.log(response);
}
getBroadcastStatus();curl -X GET \
https://api.periskope.app/v1/queue/broadcast?broadcast_id={id} \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-H 'x-phone: YOUR_PHONE_NUMBER' \
{
"broadcast_id": "22b2a2a4-3c61-4b94-807c-fa431e71a8e5",
"org_id": "5fb0d69a-d789-4429-970e-66d48e381c9b",
"message_payload": {
"body": "#generalteam#",
"message_type": "chat",
"performed_by": "api"
},
"created_at": "2025-03-10T11:11:20.049901+00:00",
"total_chats": 2,
"sent_chats": 0,
"failed_chats": 0,
"pending_chats": 0,
"total_delivered_count": 123,
"total_read_count": 123,
"performed_by": "5fb0d69a-d789-4429-970e-66d48e381c9b",
"performed_at": "2023-11-07T05:31:56Z",
"scheduled_at": "2025-03-10T12:11:19.52+00:00",
"broadcast_status": "<string>",
"total_member_count": 0,
"delivered_percentage": 0,
"read_percentage": 0,
"logs": []
}Get Broadcast Status
Retrieves the status of a broadcast message by its ID
import { PeriskopeApi } from '@periskope/periskope-client';
const client = new PeriskopeApi({
authToken: 'YOUR_API_KEY',
phone: 'YOUR_PHONE_NUMBER', // e.g., '919876543210'
});
async function getBroadcastStatus() {
const response = await client.queue.getBroadcastStatus({
broadcast_id: '22b2a2a4-3c61-4b94-807c-fa431e71a8e5'
});
console.log(response);
}
getBroadcastStatus();curl -X GET \
https://api.periskope.app/v1/queue/broadcast?broadcast_id={id} \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-H 'x-phone: YOUR_PHONE_NUMBER' \
{
"broadcast_id": "22b2a2a4-3c61-4b94-807c-fa431e71a8e5",
"org_id": "5fb0d69a-d789-4429-970e-66d48e381c9b",
"message_payload": {
"body": "#generalteam#",
"message_type": "chat",
"performed_by": "api"
},
"created_at": "2025-03-10T11:11:20.049901+00:00",
"total_chats": 2,
"sent_chats": 0,
"failed_chats": 0,
"pending_chats": 0,
"total_delivered_count": 123,
"total_read_count": 123,
"performed_by": "5fb0d69a-d789-4429-970e-66d48e381c9b",
"performed_at": "2023-11-07T05:31:56Z",
"scheduled_at": "2025-03-10T12:11:19.52+00:00",
"broadcast_status": "<string>",
"total_member_count": 0,
"delivered_percentage": 0,
"read_percentage": 0,
"logs": []
}POST /message/queues with broadcast_id in the request body insteadAuthorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Please provide the number of the phone you want to call with this API in the header. The number must be in country code + number format without any characters or spaces, e.g. 919876543210; Alternatively, provide the phone_id (phone-xxxxxxxxxxxx) in the header
"{{orgPhone}}"
Query Parameters
The unique identifier of the broadcast
"22b2a2a4-3c61-4b94-807c-fa431e71a8e5"
Response
Successful operation
Unique identifier for the broadcast message
"22b2a2a4-3c61-4b94-807c-fa431e71a8e5"
Organization identifier that owns the broadcast
"5fb0d69a-d789-4429-970e-66d48e381c9b"
Container for the broadcast message content and metadata
Show child attributes
Show child attributes
Timestamp when the broadcast was created
"2025-03-10T11:11:20.049901+00:00"
Total number of chat instances targeted by this broadcast
2
Number of chats where the broadcast has been successfully sent
0
Number of chats where the broadcast failed to send
0
Number of chats where the broadcast is queued but not yet sent
0
Total count of broadcast messages delivered to recipients
Total count of broadcast messages that have been read by recipients
Identifier of the user or system that initiated the broadcast
"5fb0d69a-d789-4429-970e-66d48e381c9b"
Timestamp when the broadcast was executed
Timestamp when the broadcast is scheduled to be sent
"2025-03-10T12:11:19.52+00:00"
Current status of the broadcast (pending, in-progress, completed, failed, etc.)
Total number of members eligible to receive this broadcast
0
Percentage of messages successfully delivered to recipients
0
Percentage of delivered messages that have been read by recipients
0
List of log entries related to the broadcast's execution
[]
Was this page helpful?