---
title: "Delete old AI content batches"
url: https://docs.gleap.ai/en/reference/rest-api/remove-old-batches
method: DELETE
path: "/aicontent/oldbatches"
api: "API Reference"
tag: "AI content"
operationId: "RemoveOldBatches"
updatedAt: "2026-11-01T18:40:15.677Z"
language: en
---

# Delete old AI content batches

`DELETE https://api.gleap.io/v3/aicontent/oldbatches`

Delete all AI content except the current batch

Remove all AI content entries except those with the current batch ID, optionally filtered by type

## Authorization

- `Authorization` (header, required): `Bearer <token>`

## Headers

- `project` (string, required)

## Request body (`application/json`, required)

- `type` (string)
- `currentBatchId` (string, required)

## Example request

```bash
curl --request DELETE \
  --url https://api.gleap.io/v3/aicontent/oldbatches \
  --header 'Authorization: Bearer <token>' \
  --header 'project: <project>' \
  --header 'Content-Type: application/json' \
  --data '{
  "currentBatchId": "<currentBatchId>"
}'
```

## Responses

### 200 (`application/json`)

Ok

- `deleted` (any, required)
- `success` (boolean, required)

```json
{
  "success": true
}
```
