TypeScript
import { PeriskopeApi } from '@periskope/periskope-client';
const client = new PeriskopeApi({
authToken: 'YOUR_API_KEY',
phone: '919876543210', // the phone to act with (x-phone)
});
async function main() {
const response = await client.queue.getQueueJobs();
console.log(response);
}
main();curl -X GET 'https://api.periskope.app/v1/queue/jobs' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'x-phone: 919876543210'[
{
"data": {
"chat_id": "120363000000000000@g.us",
"body": "Hello from Periskope!",
"message_type": "chat",
"quoted_message_id": "",
"unique_id": "00000000-0000-0000-0000-000000000000",
"performed_by": "api"
},
"id": "00000000-0000-0000-0000-000000000000",
"message_id": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"status": "completed",
"stacktrace": [
"Error: Evaluation failed: t"
],
"attemptsStarted": 1,
"attemptsMade": 1,
"addedTimestamp": 1737373507280,
"finishedTimestamp": 1737373510691,
"processedTimestamp": 1737373507380
}
]{
"code": "ERROR",
"message": "The phone server is disconnected or not reachable",
"status": 400
}{
"code": "UNAUTHORIZED_ERROR",
"message": "Invalid bearer auth token",
"status": 401
}{
"code": "VALIDATION_ERROR",
"message": "Request validation failed",
"status": 422,
"fields": {
"body.chat_id": {
"message": "chat_id is required"
}
}
}{
"code": "RATE_LIMIT_ERROR",
"message": "You can only make 100 requests per second",
"status": 429
}{
"code": "UNKNOWN_ERROR",
"message": "Internal server error",
"status": 500
}Queue APIs
Fetch Queue Jobs
Lists the jobs in the send queue of the phone — scheduled, waiting, in flight, completed or failed.
TypeScript
import { PeriskopeApi } from '@periskope/periskope-client';
const client = new PeriskopeApi({
authToken: 'YOUR_API_KEY',
phone: '919876543210', // the phone to act with (x-phone)
});
async function main() {
const response = await client.queue.getQueueJobs();
console.log(response);
}
main();curl -X GET 'https://api.periskope.app/v1/queue/jobs' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'x-phone: 919876543210'[
{
"data": {
"chat_id": "120363000000000000@g.us",
"body": "Hello from Periskope!",
"message_type": "chat",
"quoted_message_id": "",
"unique_id": "00000000-0000-0000-0000-000000000000",
"performed_by": "api"
},
"id": "00000000-0000-0000-0000-000000000000",
"message_id": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"status": "completed",
"stacktrace": [
"Error: Evaluation failed: t"
],
"attemptsStarted": 1,
"attemptsMade": 1,
"addedTimestamp": 1737373507280,
"finishedTimestamp": 1737373510691,
"processedTimestamp": 1737373507380
}
]{
"code": "ERROR",
"message": "The phone server is disconnected or not reachable",
"status": 400
}{
"code": "UNAUTHORIZED_ERROR",
"message": "Invalid bearer auth token",
"status": 401
}{
"code": "VALIDATION_ERROR",
"message": "Request validation failed",
"status": 422,
"fields": {
"body.chat_id": {
"message": "chat_id is required"
}
}
}{
"code": "RATE_LIMIT_ERROR",
"message": "You can only make 100 requests per second",
"status": 429
}{
"code": "UNKNOWN_ERROR",
"message": "Internal server error",
"status": 500
}Deprecated. Use
POST /message/queues instead.
Pass queue_id or broadcast_id in the request body to filterAuthorizations
Headers
Query Parameters
Response
The matching queue jobs
Was this page helpful?