---
title: "Run one bounded raw-response and expired-export retention batch for the workspace."
method: POST
path: "/v1/retention"
---

# Run one bounded raw-response and expired-export retention batch for the workspace.

`POST /v1/retention`

## Request

- Base URL: `http://127.0.0.1:8080`
- URL: `http://127.0.0.1:8080/v1/retention`
- Auth: HTTP bearer

Erases at most 1,000 due raw responses and revokes at most 1,000 expired export jobs. Repeat while either count is 1,000 to drain a backlog.

## Headers

- `X-Likerts-Workspace` string

## Request body

- object

## Response `200`

Batch result.

- RetentionResult
  - `responsesErased` integer, required
  - `exportsRevoked` integer, required

## Other responses

- `400`: Invalid input, resource identifier or workspace selection.
- `401`: Missing or invalid credential.
- `403`: The credential scope, membership or role does not permit this operation.
- `429`: Admission or collection rate limit reached. Honor Retry-After in seconds; admission usually returns1, the collection minute window returns60.
- `500`: Internal failure; do not assume a write failed. Retry only with its original idempotency key and payload.
- `503`: Distributed request admission is temporarily unavailable. No protected handler ran; honor Retry-After.

---

[API](https://skmtc.dev/likerts/apis/likerts-development-api.md) · [All operations](https://skmtc.dev/likerts/apis/likerts-development-api/llms.txt) · [OpenAPI document](https://skmtc.dev/likerts/apis/likerts-development-api/revisions/c583fa096c07?raw)
