v1

latestOpenAPI 3.0.32026-07-26870417.2 KB
message

Purge Queue Jobs

This endpoint purges jobs from the message queue

If neither queue_ids nor broadcast_id are provided in the request body, this will purge all the message jobs across all the queues.

post/message/queues/purge

Headers

x-phonestring
Example:918527184400

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

Request body

queue_idsstring[]

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

broadcast_idstring

Provide the broadcast_id to purge all messages of that broadcast

Example request

{
  "queue_ids": [
    "5df4cb6d-9f2b-46b6-936e-8e6f4b1a5400"
  ],
  "broadcast_id": "b25192d5-2370-4a69-b844-aae5e2bfae92"
}

Response

200 OK

purgedboolean

Whether the purge operation was successful

mode'all' | 'queue_ids' | 'broadcast'

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

queue_idsstring[]

The broadcast ID or queue IDs that were purged

Example response

{
  "purged": true,
  "mode": "queue_ids",
  "queue_ids": [
    "5df4cb6d-9f2b-46b6-936e-8e6f4b1a5400"
  ]
}