> ## 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.

# Update a listing version

> Updates a library listing version. Setting is_live to true will demote the current live version.



## OpenAPI

````yaml patch /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'
    patch:
      summary: Updates a library listing version
      description: >-
        Updates a library listing version. Setting is_live to true will demote
        the current live version.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateLibraryListingVersionRequestV1'
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LibraryListingVersionV1'
      x-codeSamples:
        - lang: bash
          source: >-
            curl --request PATCH \

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

            --header "Authorization: Bearer $BASETEN_API_KEY" \

            --header "Content-Type: application/json" \

            --data '{
              "is_live": true
            }'
        - 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}", "Content-Type":
            "application/json"}


            response = requests.request(
                "PATCH",
                url,
                headers=headers,
                json={'is_live': True}
            )


            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:
    UpdateLibraryListingVersionRequestV1:
      description: Request to update a library listing version.
      properties:
        is_live:
          anyOf:
            - type: boolean
            - type: 'null'
          default: null
          description: >-
            Whether this version should be the live version. Setting to true
            demotes the current live version.
          title: Is Live
        allow_truss_download:
          anyOf:
            - type: boolean
            - type: 'null'
          default: null
          description: Whether users deploying this model can download the Truss
          title: Allow Truss Download
      title: UpdateLibraryListingVersionRequestV1
      type: object
    LibraryListingVersionV1:
      description: A library listing version.
      properties:
        version_tag:
          description: Human-readable tag for this version
          title: Version Tag
          type: string
        is_live:
          description: Whether this version is the live version
          title: Is Live
          type: boolean
        allow_truss_download:
          description: Whether users deploying this model can download the Truss
          title: Allow Truss Download
          type: boolean
        oracle_version_id:
          description: Id of the source model version
          title: Oracle Version Id
          type: string
        created_at:
          description: Time the version was created in ISO 8601 format
          format: date-time
          title: Created At
          type: string
        modified_at:
          description: Time the version was last modified
          format: date-time
          title: Modified At
          type: string
      required:
        - version_tag
        - is_live
        - allow_truss_download
        - oracle_version_id
        - created_at
        - modified_at
      title: LibraryListingVersionV1
      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.

````