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.purgeQueue({
broadcast_id: '00000000-0000-0000-0000-000000000000',
});
console.log(response);
}
main();curl -X DELETE 'https://api.periskope.app/v1/queue/purge' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'x-phone: 919876543210' \
-H 'Content-Type: application/json' \
-d '{
"broadcast_id": "00000000-0000-0000-0000-000000000000"
}'Queue APIs
Purge Queue
Removes jobs from the send queue by queue_id or broadcast_id. Warning: an omitted or empty body purges the ENTIRE queue. Messages already submitted to WhatsApp are unaffected.
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.purgeQueue({
broadcast_id: '00000000-0000-0000-0000-000000000000',
});
console.log(response);
}
main();curl -X DELETE 'https://api.periskope.app/v1/queue/purge' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'x-phone: 919876543210' \
-H 'Content-Type: application/json' \
-d '{
"broadcast_id": "00000000-0000-0000-0000-000000000000"
}'Deprecated. Use
POST /message/queues/purge instead.
The request body shape is the same, queue_ids and broadcast_id are acceptedAuthorizations
Headers
Body
application/json
Response
Jobs purged — no content
Was this page helpful?