---
title: "Delete dataset items"
method: POST
path: "/v1/private/datasets/items/delete"
tags: ["Datasets"]
---

# Delete dataset items

`POST /v1/private/datasets/items/delete`

Delete dataset items using one of two modes:
1. **Delete by IDs**: Provide 'item_ids' to delete specific items by their IDs
2. **Delete by filters**: Provide 'dataset_id' with optional 'filters' to delete items matching criteria

When using filters, an empty 'filters' array will delete all items in the specified dataset.

## Request body

- DatasetItemsDelete — Request to delete multiple dataset items
  - `item_ids` string[] — List of dataset item IDs to delete (max 1000). Use this to delete specific items by their IDs. Mutually exclusive with 'dataset_id' and 'filters'.
  - `dataset_id` string, uuid — Dataset ID to scope the deletion. Required when using 'filters'. Mutually exclusive with 'item_ids'.
  - `filters` DatasetItemFilter[] — Filters to select dataset items to delete within the specified dataset. Must be used with 'dataset_id'. Mutually exclusive with 'item_ids'. Empty array means 'delete all items in the dataset'.
    - `field` string
    - `operator` 'contains' | 'not_contains' | 'starts_with' | 'ends_with' | '=' | '!=' | '>' | '>=' | '<' | '<=' | 'is_empty' | 'is_not_empty' | 'in' | 'not_in'
    - `key` string
    - `value` string
  - `batch_group_id` string, uuid — Optional batch group ID to group multiple delete operations into a single dataset version. If null, mutates the latest version instead of creating a new one.

## Response `204`

No content

## Other responses

- `400` — Bad request - invalid parameters or conflicting fields

## Changes

- **2026-05-08** `b9100cf75dd3` — 2 info
  - added the new `in` enum value to the request property `filters/items/operator`
  - added the new `not_in` enum value to the request property `filters/items/operator`
- **2026-05-04** `d606e84c75e4` — 2 breaking
  - removed the enum value `in` of the request property `filters/items/operator`
  - removed the enum value `not_in` of the request property `filters/items/operator`

[Change history](https://skmtc.dev/comet-ml/apis/opik-rest-api/changes/v1/private/datasets/items/delete/post.md)

---

[API](https://skmtc.dev/comet-ml/apis/opik-rest-api.md) · [All operations](https://skmtc.dev/comet-ml/apis/opik-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/comet-ml/opik-rest-api/revisions/0739fa5022ca/schema)
