---
title: "Purge Queue Jobs"
method: POST
path: "/message/queues/purge"
tags: ["message"]
---

# Purge Queue Jobs

`POST /message/queues/purge`

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.

## Headers

- `x-phone` string

## Request body

- object
  - `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)
  - `broadcast_id` string — Provide the broadcast_id to purge all messages of that broadcast

## Response `200`

200 OK

- object — The response confirms the purge operation
  - `purged` boolean — Whether the purge operation was successful
  - `mode` 'all' | 'queue_ids' | 'broadcast' — The purge mode used, indicating the scope of the purge operation
  - `queue_ids` string[] — The broadcast ID or queue IDs that were purged

---

[API](https://skmtc.net/periskope/apis/api-local.md) · [All operations](https://skmtc.net/periskope/apis/api-local/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/periskope/api-local/versions/f2738ced87d8/schema)
