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

# Update system

> Update an existing system. Only the fields provided in the request body will be updated.
If a field is provided, the new content will replace the existing content.
If a field is not provided, the existing content will remain unchanged.



## OpenAPI

````yaml patch /systems/{systemId}
openapi: 3.1.0
info:
  title: Scorecard API
  description: REST API for Scorecard
  version: 1.0.0
servers:
  - url: https://api2.scorecard.io/api/v2
security:
  - ApiKeyAuth: []
paths:
  /systems/{systemId}:
    patch:
      summary: Update system
      description: >-
        Update an existing system. Only the fields provided in the request body
        will be updated.

        If a field is provided, the new content will replace the existing
        content.

        If a field is not provided, the existing content will remain unchanged.
      operationId: updateSystem
      parameters:
        - in: path
          name: systemId
          description: The ID of the system to update.
          schema:
            type: string
            format: uuid
            example: 12345678-0a8b-4f66-b6f3-2ddcfa097257
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: The name of the system. Unique within the project.
                description:
                  type: string
                  default: ''
                  description: The description of the system.
                productionVersionId:
                  type: string
                  format: uuid
                  description: The ID of the production version of the system.
            examples:
              Update system production version:
                value:
                  productionVersionId: 87654321-4d3b-4ae4-8c7a-4b6e2a19ccf3
                summary: Update production config
                description: >-
                  Updates a system to mark an existing system version as the
                  production version.
              Update system name:
                value:
                  name: GPT-4 Turbo Chatbot
                  description: Updated production chatbot powered by GPT-4 Turbo
                summary: Update system metadata
                description: >-
                  Simple metadata update without changing any system versions.
                  Updates only the name and description fields while preserving
                  the system config.
      responses:
        '200':
          description: System updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/System'
              examples:
                Updated system production version:
                  value:
                    id: 12345678-0a8b-4f66-b6f3-2ddcfa097257
                    name: GPT-4 Turbo Chatbot
                    description: Updated production chatbot powered by GPT-4 Turbo
                    productionVersion:
                      id: 87654321-4d3b-4ae4-8c7a-4b6e2a19ccf3
                      systemId: 12345678-0a8b-4f66-b6f3-2ddcfa097257
                      name: Version 3 (with system prompt)
                      config:
                        temperature: 0.5
                        maxTokens: 1024
                        systemPrompt: You are an extremely helpful assistant.
                    versions:
                      - id: 87654321-4d3b-4ae4-8c7a-4b6e2a19ccf3
                        name: Version 3 (with system prompt)
                      - id: 87654321-4d3b-4ae4-8c7a-4b6e2a19ccf0
                        name: Version 2 (Low Temperature)
                      - id: 87654321-4d3b-4ae4-8c7a-4b6e2a19ccf1
                        name: Version 1 (High Temperature)
                  summary: Updated system
                  description: Result after updating the production config of a system.
        '401':
          $ref: '#/components/responses/UnauthenticatedError'
        '500':
          $ref: '#/components/responses/ServiceError'
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Scorecard from 'scorecard-ai';


            const client = new Scorecard({
              apiKey: 'My API Key',
            });


            const system = await
            client.systems.update('12345678-0a8b-4f66-b6f3-2ddcfa097257', {
              productionVersionId: '87654321-4d3b-4ae4-8c7a-4b6e2a19ccf3',
            });


            console.log(system.id);
        - lang: Python
          source: |-
            from scorecard_ai import Scorecard

            client = Scorecard(
                api_key="My API Key",
            )
            system = client.systems.update(
                system_id="12345678-0a8b-4f66-b6f3-2ddcfa097257",
                production_version_id="87654321-4d3b-4ae4-8c7a-4b6e2a19ccf3",
            )
            print(system.id)
        - lang: cURL
          source: |-
            curl https://api2.scorecard.io/api/v2/systems/$SYSTEM_ID \
                -X PATCH \
                -H "Authorization: Bearer $SCORECARD_API_KEY"
components:
  schemas:
    System:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: The ID of the system.
        name:
          type: string
          description: The name of the system. Unique within the project.
        description:
          type: string
          default: ''
          description: The description of the system.
        productionVersion:
          $ref: '#/components/schemas/SystemVersion'
          description: The production version of the system.
        versions:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                format: uuid
                description: The ID of the system version.
              name:
                type: string
                description: The name of the system version.
            required:
              - id
              - name
            description: >-
              A SystemVersion defines the specific settings for a System Under
              Test.


              System versions contain parameter values that determine system
              behavior during evaluation.

              They are immutable snapshots - once created, they never change.


              When running evaluations, you reference a specific systemVersionId
              to establish which system version to test.
          description: The versions of the system.
      required:
        - id
        - name
        - description
        - productionVersion
        - versions
      description: >-
        A System Under Test (SUT).


        Systems are templates - to run evaluations, pair them with a
        SystemVersion that provides specific

        parameter values.
    SystemVersion:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: The ID of the system version.
        systemId:
          type: string
          format: uuid
          description: The ID of the system the system version belongs to.
        name:
          type: string
          description: The name of the system version.
        config:
          type: object
          additionalProperties: true
          description: The configuration of the system version.
      required:
        - id
        - systemId
        - name
        - config
      description: >-
        A SystemVersion defines the specific settings for a System Under Test.


        System versions contain parameter values that determine system behavior
        during evaluation.

        They are immutable snapshots - once created, they never change.


        When running evaluations, you reference a specific systemVersionId to
        establish which system version to test.
    ApiError:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
        details:
          type: object
          additionalProperties: true
          x-stainless-any: true
      required:
        - code
        - message
        - details
      description: An API error.
  responses:
    UnauthenticatedError:
      description: Error indicating that the request is not authenticated.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
          examples:
            Authentication failure:
              value:
                code: UNAUTHORIZED
                message: Invalid or missing authentication token
                details: {}
              summary: Authentication failure
              description: >-
                Error returned when authentication credentials are invalid or
                missing.
    ServiceError:
      description: >-
        An internal service error indicating an issue with the Scorecard
        service.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
          examples:
            Internal error:
              value:
                code: INTERNAL_ERROR
                message: An unexpected error occurred while processing your request.
                details: {}
              summary: Internal error
              description: Generic error when an unexpected internal issue occurs.
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: starts with ak_

````