---
title: "Purge deleted annotations"
method: POST
path: "/api/v1/annotations/purge_deleted"
tags: ["Annotation"]
---

# Purge deleted annotations

`POST /api/v1/annotations/purge_deleted`

Start the asynchronous process of purging customer's data related to selected annotations with `deleted` status. The following operations will happen:

* delete [annotation content](/api/annotation-content)
* delete [pages](/api/page)
* remove content and file names of [documents](/api/document)
* remove annotations from [relations](/api/relation) of type `duplicate`
* preserve [annotations](/api/annotation) objects, move them to `purged` [status](#Annotation-Lifecycle)

This is an asynchronous endpoint, status of annotations is changed to `purged` and related objects are gradually being deleted.

At least one of `annotations`, `queue` fields must be filled in. The resulting set of annotations is the disjunction of `queue` and `annotations` filter.

## Request body

- object
  - `annotations` string[] — List of annotations to be purged.
  - `queue` string, uri — Queue of which the annotations should be purged.

## Response `202`

Accepted

## Other responses

- `400` — Invalid input data.
- `401` — The username/password is invalid or token is invalid (e.g. expired).
- `403` — Insufficient permission, missing authentication, invalid CSRF token and similar issue.
- `404` — The specified resource was not found.
- `409` — Conflict
- `413` — Payload too large (especially for files uploaded).
- `429` — Request rate is too high, wait before sending more requests. See [Rate Limiting](/guides/overview#rate-limiting) for more details.
- `500` — Server failure while processing the request.
- `502` — Invalid response from the upstream server.
- `503` — We're temporarily offline for maintenance. Please try again later.
- `504` — Upstream server could not complete the request in time.

---

[API](https://skmtc.dev/rossum/apis/rossum-api.md) · [All operations](https://skmtc.dev/rossum/apis/rossum-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/rossum/rossum-api/revisions/f1b5a910991d/schema)
