---
title: "Remove logs from a dataset"
method: DELETE
path: "/api/datasets/{dataset_id}/logs/import/"
tags: ["datasets"]
---

# Remove logs from a dataset

`DELETE /api/datasets/{dataset_id}/logs/import/`

Remove logs from a dataset asynchronously by filters, or remove all logs by setting `is_deleting_all_logs=true`.

## Path parameters

- `dataset_id` string, required

## Headers

- `Authorization` string, required

## Request body

- object
  - `is_deleting_all_logs` boolean — Set to `true` to remove every log in the dataset.
  - `filters` object — Platform-standard filters keyed by field name.

## Response `200`

Removal started.

- DatasetsRemoveDatasetLogsResponse200
  - `message` string, required

## Other responses

- `400` — Bad request - provide `filters` or set `is_deleting_all_logs=true`.
- `401` — Unauthorized - Missing or invalid authentication.
- `404` — Dataset not found.

## Changes

> 6 revisions in range; 3 could not be searched.

- **2026-07-31** `c26d550029f8` — 1 breaking, 3 info
  - removed the request body
  - removed the non-success response with the status `400`
  - removed the non-success response with the status `401`
  - removed the non-success response with the status `404`

[Change history](https://skmtc.dev/keywordsai/apis/api-reference/changes/api/datasets/:dataset_id/logs/import/delete.md)

---

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