Skip to main content
Node.js

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_ids
string[]

Provide the queue_id of the message to purge only jobs in that queue (or an array of queue_id to purge multiple queues)

Example:
broadcast_id
string

Provide the broadcast_id to purge all messages of that broadcast

Example:

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

Response

200 - application/json

200 OK

The response confirms the purge operation

purged
boolean

Whether the purge operation was successful

Example:

true

mode
enum<string>

The purge mode used, indicating the scope of the purge operation

Available options:
all,
queue_ids,
broadcast
Example:

"queue_ids"

queue_ids
string[]

The broadcast ID or queue IDs that were purged

Example: