Skip to main content
Node.js
import { PeriskopeApi } from '@periskope/periskope-client';

const client = new PeriskopeApi({
  authToken: 'YOUR_API_KEY',
  phone: 'YOUR_PHONE_NUMBER', // e.g., '919876543210'
});

async function listQueueJobs() {
  // Filter by broadcast_id to track all jobs for a broadcast
  const jobs = await client.message.getMessageQueues({
    broadcast_id: 'b25192d5-2370-4a69-b844-aae5e2bfae92'
  });

  console.log(jobs);
}

listQueueJobs();
[
  {
    "queue_id": "5df4cb6d-9f2b-46b6-936e-8e6f4b1a5400",
    "unique_id": "3EB0A0A8F90A01259C81A3",
    "message_id": "true_8824248940@c.us_3EB0A0A8F90A01259C81A3",
    "chat_id": "8824248940@c.us",
    "performed_by": "api",
    "status": "sent",
    "status_description": "Successfully submitted.",
    "message": {
      "body": "Hello",
      "type": "chat"
    },
    "timeline": {
      "queued_at": "2026-04-01T14:23:21.279Z",
      "sent_at": "2026-04-01T14:23:24.111Z"
    },
    "attempts": 1
  }
]

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-phone
string

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

Example:

"918527184400"

Body

application/json
queue_id
string

Filter by a specific message queue

Example:

"5df4cb6d-9f2b-46b6-936e-8e6f4b1a5400"

broadcast_id
string

Filter by broadcast ID to return all jobs belonging to this broadcast

Example:

"b25192d5-2370-4a69-b844-aae5e2bfae92"

Response

200 - application/json

200 OK

queue_id
string

Unique identifier for the message queue

Example:

"5df4cb6d-9f2b-46b6-936e-8e6f4b1a5400"

unique_id
string

Provisional message identifier, useful for tracking via /message/{unique_id}/status

Example:

"3EB0A0A8F90A01259C81A3"

message_id
string

A unique identifier for the message, containing information about the chat, sender, and message details.

Example:

"true_8824248940@c.us_3EB0A0A8F90A01259C81A3"

chat_id
string

The recipient's chat ID, the unique identifier of the WhatsApp chat

Example:

"8824248940@c.us"

performed_by
string

Identifier of who initiated the message (e.g. api, user)

Example:

"api"

status
enum<string>

Current status of the job (queued, sending, sent, failed, scheduled, pending, delivered, read, played)

Available options:
queued,
sending,
sent,
failed,
scheduled
Example:

"sent"

status_description
string

Description of the current status of the message

Example:

"Successfully submitted."

message
object

The message content that was sent

timeline
object

Timestamps for key events in the message lifecycle

attempts
integer

Number of send attempts made

Example:

1