---
title: "Delete samples"
method: POST
path: "/beta/dataset/{dataset_id}/split/{split_id}/sample/delete"
tags: ["Dataset"]
---

# Delete samples

`POST /beta/dataset/{dataset_id}/split/{split_id}/sample/delete`

## Request

- Base URL: `https://api.friendli.ai`
- URL: `https://api.friendli.ai/beta/dataset/{dataset_id}/split/{split_id}/sample/delete`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/friendli/apis/friendli-suite-api-reference/docs/beta/dataset/:dataset_id/split/:split_id/sample/delete/post.ts> (a function with typed inputs; its response is checked against the schema)

Delete samples from the split.

## Path parameters

- `dataset_id` string, required: ID of the dataset.
- `split_id` string, required: ID of the split.

## Headers

- `X-Friendli-Team` string, nullable: ID of team to run requests as (optional parameter).

## Request body

- union[]
  - union
    - string
    - integer

## Response `200`

Successful Response

- DeleteSamplesResponse: Delete samples response.
  - `sampleIds` string[], required: List of sample IDs that were deleted from the dataset.

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/friendli/apis/friendli-suite-api-reference.md) - [All operations](https://skmtc.dev/friendli/apis/friendli-suite-api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/friendli/apis/friendli-suite-api-reference/revisions/38fb43993a11?raw)
