# Remove queued async tasks

`DELETE https://api.answerline.dev/v1/async/queue`

Removes all of the authenticated organization's tasks that are still `QUEUED`, so a pending backlog can be emptied with a single request rather than through support. `PROCESSING` tasks are already running and stay as they are, and so do `COMPLETED` and `FAILED` ones. Nothing was charged for queued tasks: removing them releases the amounts they held, so `remaining` rises and the balance is unchanged. Repeating the call is harmless: with nothing queued it returns `cleared: 0`. A queue too long to clear within one call answers 202 with `clearing: true`: the rest is deleted without further calls, and `GET /v1/async/status` shows the queue shrink.

## Returns

- `success` (boolean, required): Confirms that the queue has been emptied.
- `cleared` (integer, required): How many queued tasks were deleted.

## Responses

- 200: Queue emptied. The response reports how many queued tasks were deleted.
- 202: Still clearing: the queue is longer than one call clears. The rest is deleted without further calls; GET /v1/async/status shows what is left.
- 401: Unauthorized - authentication failed
- 429: Too Many Requests - the service dropped the request because it was overloaded (`SERVICE_OVERLOADED`), which returns `Retry-After` without any limit headers, or one address presented too many unknown keys (`RATE_LIMIT_EXCEEDED`, with `Retry-After`)
- 500: Internal Server Error

## Request

curl:

```bash
curl -X DELETE "https://api.answerline.dev/v1/async/queue" \
  -H "Authorization: Bearer $API_KEY"
```


## Example responses

200:

```json
{
  "success": true,
  "cleared": 42
}
```

