# Delete document reviews

Delete a finished document review, or up to 100 at once, with the review's claim items and inputs. A review that is still running returns 409. Free.

Documentation index: https://webcite.co/llms.txt
Canonical page: https://webcite.co/api-docs/delete-document-reviews
API origin: https://api.webcite.co
Authentication: x-api-key header. Keep keys on your server.

## Delete one review

`DELETE https://api.webcite.co/api/v1/playground/chat/document-reviews/{review_id}` deletes one review with its claim items, its review inputs and the background job records of the review. Send the key in the `x-api-key` header; app keys cannot use these routes. Deleting costs 0 credits.

`review_id` is the 64-character id that `review_document` and `get_document_review_job` return as `review_id`. The `job_id` is a different id. These routes sit beside the review reads the [MCP server](/api-docs/mcp#review) uses and are outside the public [OpenAPI file](/api-docs/openapi.json). Deletion runs through this REST API, with the same API key the MCP server accepts.

```bash
curl --fail-with-body -X DELETE 'https://api.webcite.co/api/v1/playground/chat/document-reviews/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' \
  -H "x-api-key: $WEBCITE_API_KEY"
```

HTTP 200 response, with a placeholder identifier:

```json
{
  "review_id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "deleted": true
}
```

## A running review returns 409

A review whose status is `queued`, `running`, `extracting`, `waiting_review`, `pending` or `processing` is still being written, so the delete returns 409 with the message `This review is still running; delete it after it finishes` and nothing is removed. Poll `get_document_review_job` until the job reaches a terminal status, then delete the review.

## Delete reviews in bulk

`POST https://api.webcite.co/api/v1/playground/chat/document-reviews/delete` takes `ids`, 1 to 100 review ids, and returns HTTP 200 with three lists: `deleted`, `not_found` for ids that do not exist or that another account owns, and `in_progress` for running reviews, which are left in place. Repeated ids count once.

```bash
curl --fail-with-body -X POST 'https://api.webcite.co/api/v1/playground/chat/document-reviews/delete' \
  -H "x-api-key: $WEBCITE_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"ids": ["aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "0000000000000000000000000000000000000000000000000000000000000001"]}'
```

Example response; the identifiers are placeholders.

```json
{
  "deleted": [
    "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
  ],
  "not_found": [],
  "in_progress": [
    "0000000000000000000000000000000000000000000000000000000000000001"
  ]
}
```

## Errors

400: an id is not 64 lowercase hexadecimal characters (`Invalid review id`), or `ids` is missing, empty or longer than 100 entries; nothing is deleted. 401: missing or invalid key. 403: app keys cannot use these routes. 404 (single delete): no review with this id in your account (`Document review not found`). 409 (single delete): the review is still running.

## Reviews and files

Deleting a review leaves the uploaded file in place; delete it with [delete an uploaded file](/api-docs/delete-file). Deleting a file leaves the reviews that used it in place until you delete them here.
