Skip to main content
DELETE
Clear queued async tasks

Overview

Use this endpoint to clear your organization’s pending async queue in a single call. It deletes every task still in the QUEUED state, which is useful when you’ve enqueued a large backlog by mistake or want to reset the queue instead of waiting for it to drain (or opening a support request). Only queued tasks are affected:
  • QUEUED tasks are removed.
  • PROCESSING tasks are already in-flight on a worker and are left running — they cannot be recalled from here.
  • COMPLETED and FAILED tasks are historical and are left in place; you can still retrieve them via GET /v1/async/task/{taskId} until they age out of the retention window.

Billing

Queued tasks have not been charged yet — credits are only deducted once a task is processed. Clearing the queue therefore has no effect on your credit balance, and no refund is issued.

Idempotency

The call is safe to repeat. If the queue is already empty, it returns cleared: 0 rather than an error.

Checking the queue first

To see how many tasks are currently queued before clearing, use the async status endpoint.

Example usage

Authorizations

Authorization
string
header
required

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

Response

Queue cleared. Returns the number of queued tasks that were removed.

success
boolean
required

Indicates the queue was cleared successfully.

Example:

true

cleared
integer
required

Number of queued tasks that were removed.

Example:

42