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

# Staff: add a host game



## OpenAPI

````yaml /api-reference/openapi.json post /host-games
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:
  /host-games:
    post:
      tags:
        - Host games
      summary: 'Staff: add a host game'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                slug:
                  type: string
                name:
                  type: string
                  minLength: 1
                engine:
                  type: string
                cover_url:
                  type: string
                  format: uri
                stores:
                  type: array
                  items:
                    type: object
                    properties:
                      store:
                        type: string
                        enum:
                          - steam
                          - epic
                          - gog
                          - xbox
                          - ea
                          - ubisoft
                          - battlenet
                          - microsoft
                      ref:
                        type: string
                        minLength: 1
                    required:
                      - store
                      - ref
                  default: []
              required:
                - slug
                - name
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HostGame'
        '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:
    HostGame:
      type: object
      properties:
        id:
          type: string
          format: uuid
        slug:
          type: string
        name:
          type: string
        cover_url:
          type:
            - string
            - 'null'
        engine:
          type:
            - string
            - 'null'
        stores:
          type: array
          items:
            type: object
            properties:
              store:
                type: string
                enum:
                  - steam
                  - epic
                  - gog
                  - xbox
                  - ea
                  - ubisoft
                  - battlenet
                  - microsoft
              ref:
                type: string
            required:
              - store
              - ref
        builds:
          type: array
          items:
            type: object
            properties:
              store:
                type: string
                enum:
                  - steam
                  - epic
                  - gog
                  - xbox
                  - ea
                  - ubisoft
                  - battlenet
                  - microsoft
              build_ref:
                type: string
              version_label:
                type:
                  - string
                  - 'null'
            required:
              - store
              - build_ref
              - version_label
      required:
        - id
        - slug
        - name
        - cover_url
        - engine
        - stores
        - builds
    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.