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

# Update playground configuration

> Update the playground configuration for an environment. All fields are optional — only provided fields are updated.



## OpenAPI

````yaml https://api.alpic.ai/openapi.json put /v1/environments/{environmentId}/playground
openapi: 3.1.1
info:
  title: Alpic API
  version: 1.0.0
servers:
  - url: https://api.alpic.ai
security:
  - bearerAuth: []
paths:
  /v1/environments/{environmentId}/playground:
    put:
      tags:
        - environments
      summary: Update playground configuration
      description: >-
        Update the playground configuration for an environment. All fields are
        optional — only provided fields are updated.
      operationId: playground.upsert.v1
      parameters:
        - name: environmentId
          in: path
          required: true
          schema:
            type: string
            description: The ID of the environment
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                isPlaygroundEnabled:
                  type: boolean
                name:
                  type: string
                  minLength: 1
                  maxLength: 100
                description:
                  type: string
                  minLength: 1
                  maxLength: 500
                headers:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                        minLength: 1
                        maxLength: 100
                      description:
                        type: string
                        maxLength: 200
                      isRequired:
                        type: boolean
                        default: false
                      isSecret:
                        type: boolean
                        default: false
                    required:
                      - name
                      - description
                examplePrompts:
                  type: array
                  maxItems: 5
                  items:
                    type: object
                    properties:
                      title:
                        type: string
                        minLength: 1
                        maxLength: 100
                      prompt:
                        type: string
                        minLength: 1
                        maxLength: 500
                    required:
                      - title
                      - prompt
      responses:
        '200':
          description: The updated playground configuration
          content:
            application/json:
              schema:
                type: object
                properties:
                  isPlaygroundEnabled:
                    type: boolean
                  serverMetadata:
                    anyOf:
                      - type: object
                        properties:
                          name:
                            type: string
                          description:
                            type: string
                          headers:
                            type: array
                            items:
                              type: object
                              properties:
                                name:
                                  type: string
                                description:
                                  type: string
                                isRequired:
                                  type: boolean
                                isSecret:
                                  type: boolean
                              required:
                                - name
                                - description
                                - isRequired
                                - isSecret
                          examplePrompts:
                            type: array
                            items:
                              type: object
                              properties:
                                title:
                                  type: string
                                  minLength: 1
                                  maxLength: 100
                                prompt:
                                  type: string
                                  minLength: 1
                                  maxLength: 500
                              required:
                                - title
                                - prompt
                        required:
                          - name
                          - description
                          - headers
                          - examplePrompts
                      - type: 'null'
                required:
                  - isPlaygroundEnabled
                  - serverMetadata
        '400':
          description: '400'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: BAD_REQUEST
                      status:
                        const: 400
                      message:
                        type: string
                        default: Bad Request
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - type: object
                    properties:
                      defined:
                        const: false
                      code:
                        type: string
                      status:
                        type: number
                      message:
                        type: string
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
        '404':
          description: '404'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: NOT_FOUND
                      status:
                        const: 404
                      message:
                        type: string
                        default: Not Found
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - type: object
                    properties:
                      defined:
                        const: false
                      code:
                        type: string
                      status:
                        type: number
                      message:
                        type: string
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
components:
  securitySchemes:
    bearerAuth:
      type: http
      description: >-
        Bearer token for authentication. Use an API key from the API Keys page
        in team settings, or an OAuth access token.
      scheme: bearer

````