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

# Update Application Spec

> ### Description
Updates a application spec

### Details
This API can be used to update the application spec that matches the ID that was passed in as a path parameter. To use this API, pass in the `id` that was returned from your Create Application Spec API call as a path parameter.

Review the request schema to see the fields that can be updated.



## OpenAPI

````yaml https://app.stainlessapi.com/api/spec/documented/sgp/openapi.yml patch /v4/application-specs/{application_spec_id}
openapi: 3.1.0
info:
  title: EGP API V4
  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: []
tags:
  - name: Models
    description: Model API.
paths:
  /v4/application-specs/{application_spec_id}:
    patch:
      tags:
        - Application Specs
      summary: Update Application Spec
      description: >-
        ### Description

        Updates a application spec


        ### Details

        This API can be used to update the application spec that matches the ID
        that was passed in as a path parameter. To use this API, pass in the
        `id` that was returned from your Create Application Spec API call as a
        path parameter.


        Review the request schema to see the fields that can be updated.
      operationId: PATCH-V4-/application-specs/{application_spec_id}
      parameters:
        - name: application_spec_id
          in: path
          required: true
          schema:
            type: string
            title: Application Spec Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RestorablePartialApplicationSpecRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/egp_api_backend__server__api__models__application_models_no_gen__ApplicationSpecResponse
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-codeSamples:
        - lang: Python
          source: |-
            import os
            from scale_gp import SGPClient

            client = SGPClient(
                api_key=os.environ.get("SGP_API_KEY"),  # This is the default and can be omitted
            )
            application_spec = client.application_specs.update(
                application_spec_id="application_spec_id",
            )
            print(application_spec.id)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/stainless-sdks/sgp-go\"\n\t\"github.com/stainless-sdks/sgp-go/option\"\n)\n\nfunc main() {\n\tclient := sgp.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tapplicationSpec, err := client.ApplicationSpecs.Update(\n\t\tcontext.TODO(),\n\t\t\"application_spec_id\",\n\t\tsgp.ApplicationSpecUpdateParams{\n\t\t\tBody: sgp.ApplicationSpecUpdateParamsBodyPartialApplicationSpecRequest{\n\t\t\t\tRestore: sgp.F(sgp.ApplicationSpecUpdateParamsBodyPartialApplicationSpecRequestRestoreFalse),\n\t\t\t},\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", applicationSpec.ID)\n}\n"
components:
  schemas:
    RestorablePartialApplicationSpecRequest:
      oneOf:
        - $ref: '#/components/schemas/PartialApplicationSpecRequest'
        - $ref: '#/components/schemas/RestoreRequest'
      title: RestorablePartialApplicationSpecRequest
      discriminator:
        propertyName: restore
        mapping:
          'False':
            $ref: '#/components/schemas/PartialApplicationSpecRequest'
          'True':
            $ref: '#/components/schemas/RestoreRequest'
    egp_api_backend__server__api__models__application_models_no_gen__ApplicationSpecResponse:
      properties:
        name:
          type: string
          title: Name
          description: The name of the Application Spec
        description:
          type: string
          title: Description
          description: The description of the Application Spec
        theme_id:
          title: Theme Id
          can_patch: true
          type: string
        run_online_evaluation:
          title: Run Online Evaluation
          description: >-
            Whether the application spec should run online evaluation, default
            is `false`
          default: false
          type: boolean
        id:
          type: string
          title: Id
          description: The unique identifier of the entity.
        created_at:
          type: string
          format: date-time
          title: Created At
          description: The date and time when the entity was created in ISO format.
        account_id:
          type: string
          title: Account Id
          description: The ID of the account that owns the given entity.
          can_patch: false
        created_by_user_id:
          type: string
          title: Created By User Id
          description: The user who originally created the entity.
        created_by_identity_type:
          $ref: '#/components/schemas/IdentifierTypeEnum'
          description: The type of identity that created the entity.
        archived_at:
          title: Archived At
          description: The date and time when the entity was archived in ISO format.
          type: string
          format: date-time
      type: object
      required:
        - name
        - description
        - id
        - created_at
        - account_id
      title: ApplicationSpecResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    PartialApplicationSpecRequest:
      properties:
        name:
          type: string
          title: Name
          description: The name of the Application Spec
        description:
          type: string
          title: Description
          description: The description of the Application Spec
        theme_id:
          title: Theme Id
          can_patch: true
          type: string
        run_online_evaluation:
          title: Run Online Evaluation
          description: >-
            Whether the application spec should run online evaluation, default
            is `false`
          type: boolean
        restore:
          type: boolean
          const: false
          title: Restore
          description: Set to true to restore the entity from the database.
          default: false
      additionalProperties: false
      type: object
      title: PartialApplicationSpecRequest
    RestoreRequest:
      properties:
        restore:
          type: boolean
          const: true
          title: Restore
          description: Set to true to restore the entity from the database.
      additionalProperties: false
      type: object
      required:
        - restore
      title: RestoreRequest
    IdentifierTypeEnum:
      type: string
      enum:
        - user
        - service_account
      title: IdentifierTypeEnum
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
          additionalProperties: true
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````