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

# Delete a listing version

> Deletes a specific version of a library listing. Deleting a live version will fail with a 400 error; demote the version first by setting another version as live.



## OpenAPI

````yaml delete /v1/library_listings/{user_defined_listing_id}/versions/{version_tag}
openapi: 3.1.0
info:
  description: REST API for management of Baseten resources
  title: Baseten management API
  version: 1.0.0
servers:
  - url: https://api.baseten.co
security:
  - BearerAuth: []
paths:
  /v1/library_listings/{user_defined_listing_id}/versions/{version_tag}:
    parameters:
      - $ref: '#/components/parameters/user_defined_listing_id'
      - $ref: '#/components/parameters/version_tag'
    delete:
      summary: Deletes a library listing version
      description: >-
        Deletes a specific version of a library listing. Deleting a live version
        will fail with a 400 error; demote the version first by setting another
        version as live.
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LibraryListingVersionTombstoneV1'
      x-codeSamples:
        - lang: bash
          source: >
            curl --request DELETE \

            --url
            https://api.baseten.co/v1/library_listings/{user_defined_listing_id}/versions/{version_tag}
            \

            --header "Authorization: Bearer $BASETEN_API_KEY"
        - lang: python
          source: >-
            import requests

            import os

            API_KEY = os.environ.get("BASETEN_API_KEY", "<YOUR_API_KEY>")

            url =
            "https://api.baseten.co/v1/library_listings/{user_defined_listing_id}/versions/{version_tag}"


            headers = {"Authorization": f"Bearer {API_KEY}"}


            response = requests.request(
                "DELETE",
                url,
                headers=headers
            )


            print(response.text)
components:
  parameters:
    user_defined_listing_id:
      schema:
        type: string
      description: The listing's user_defined_id.
      example: acme-text-model
      name: user_defined_listing_id
      in: path
      required: true
    version_tag:
      schema:
        type: string
      description: The listing version's human-readable tag.
      example: 1.0.0
      name: version_tag
      in: path
      required: true
  schemas:
    LibraryListingVersionTombstoneV1:
      description: A library listing version tombstone.
      properties:
        version_tag:
          description: Human-readable tag for this version
          title: Version Tag
          type: string
        deleted:
          description: Whether the library listing version was deleted
          title: Deleted
          type: boolean
      required:
        - version_tag
        - deleted
      title: LibraryListingVersionTombstoneV1
      type: object
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Send `Authorization: Bearer <api_key>`. The legacy `Authorization:
        Api-Key <api_key>` scheme is also accepted.

````