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

# Change a game's settings

> Only its team (an API key with publish). What's left out stays as it was. `connects_to` and `webrtc` apply from the next release, which copies them as it's published, so its review sees them and a rollback brings back each release's own: Patch's rooms and direct links need neither, only a server of the game's own does.



## OpenAPI

````yaml /api-reference/openapi.json patch /games/{owner}/{slug}/settings
openapi: 3.1.0
info:
  title: Patch API
  version: 1.0.0
  description: >-
    The public API behind patch.gg, the desktop app and pch. Changes within v1
    are additive only. Errors are { error: { code, message, details } }; branch
    on code.
servers:
  - url: https://patch.gg/api/v1
security: []
paths:
  /games/{owner}/{slug}/settings:
    patch:
      tags:
        - Games
      summary: Change a game's settings
      description: >-
        Only its team (an API key with publish). What's left out stays as it
        was. `connects_to` and `webrtc` apply from the next release, which
        copies them as it's published, so its review sees them and a rollback
        brings back each release's own: Patch's rooms and direct links need
        neither, only a server of the game's own does.
      parameters:
        - schema:
            type: string
            example: mira
          required: true
          name: owner
          in: path
        - schema:
            type: string
            example: lantern-run
          required: true
          name: slug
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GameSettingsInput'
      responses:
        '200':
          description: Its settings now
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GameSettings'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Not signed in
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Not allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearer: []
components:
  schemas:
    GameSettingsInput:
      type: object
      properties:
        connects_to:
          type: array
          items:
            type: string
            pattern: >-
              ^(?:(?:https|wss):\/\/(?:\*\.)?(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z][a-z0-9-]{0,62}|(?:http|ws):\/\/(?:(?:[a-z0-9-]+\.)*localhost|127\.0\.0\.1))(?::\d{1,5})?$
          maxItems: 16
        webrtc:
          type:
            - object
            - 'null'
          properties:
            ice_servers:
              type: array
              items:
                type: string
                pattern: >-
                  ^(?:stun|turns?):(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z][a-z0-9-]{0,62}(?::\d{1,5})?(?:\?transport=(?:udp|tcp))?$
              maxItems: 8
          required:
            - ice_servers
        players:
          type:
            - object
            - 'null'
          properties:
            min:
              type: integer
              minimum: 1
              maximum: 1000
            max:
              type: integer
              minimum: 1
              maximum: 1000
          required:
            - min
            - max
      additionalProperties: false
    GameSettings:
      type: object
      properties:
        connects_to:
          type: array
          items:
            type: string
          description: Hosts its next release may fetch from or open WebSockets to
        webrtc:
          type:
            - object
            - 'null'
          properties:
            ice_servers:
              type: array
              items:
                type: string
          required:
            - ice_servers
          description: >-
            Its own ICE servers for WebRTC in its next release, besides Patch's
            relay for direct links; null: none of its own
        players:
          type:
            - object
            - 'null'
          properties:
            min:
              type: integer
            max:
              type: integer
          required:
            - min
            - max
        updated_at:
          type:
            - string
            - 'null'
      required:
        - connects_to
        - webrtc
        - players
        - updated_at
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: version_exists
            message:
              type: string
            details: {}
          required:
            - code
            - message
      required:
        - error
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: An API key (pch_...) or the token from pch login.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.