> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gp.scale.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete a dataset item

> Soft-delete a dataset item by marking it as removed in the current dataset version.

The database row is not removed; instead the item's end version is set to the current dataset
version so it no longer appears at the latest version while remaining retrievable at earlier
versions, and a new dataset version snapshot is created to record the removal. An item that is
already archived or already deleted cannot be deleted again. The response echoes the item id with
deleted set to true.



## OpenAPI

````yaml https://api.sgp.scale.com/openapi-versions/v5/openapi.json delete /v5/dataset-items/{dataset_item_id}
openapi: 3.1.0
info:
  title: EGP API V5
  description: >-
    This is the parent API for all EGP APIs. If you are looking for the EGP API,
    please go to https://api.egp.scale.com/docs.
  contact:
    name: Scale Generative AI Platform
    url: https://scale.com/genai-platform
  version: 0.1.0
servers:
  - url: https://api.egp.scale.com
security: []
paths:
  /v5/dataset-items/{dataset_item_id}:
    delete:
      tags:
        - Dataset Items
      summary: Delete a dataset item
      description: >-
        Soft-delete a dataset item by marking it as removed in the current
        dataset version.


        The database row is not removed; instead the item's end version is set
        to the current dataset

        version so it no longer appears at the latest version while remaining
        retrievable at earlier

        versions, and a new dataset version snapshot is created to record the
        removal. An item that is

        already archived or already deleted cannot be deleted again. The
        response echoes the item id with

        deleted set to true.
      operationId: DELETE-V5-/v5/dataset-items/dataset_item_id
      parameters:
        - name: dataset_item_id
          in: path
          required: true
          schema:
            type: string
            title: Dataset Item Id
        - name: x-selected-account-id
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Account ID Header
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteResponse_DatasetItem_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    DeleteResponse_DatasetItem_:
      properties:
        id:
          type: string
          title: Id
        object:
          type: string
          const: dataset.item
          title: Object
          default: dataset.item
        deleted:
          type: boolean
          title: Deleted
      type: object
      required:
        - id
        - deleted
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          title: Error Type
          type: string
        input:
          title: Input
        ctx:
          type: object
          title: Context
          additionalProperties: true
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: x-api-key

````