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

# Comment on a game: what you'd add to it

> Goes under the game for everyone who can see it, by your username, so you need one first (422 `username_required`), or under one of its comments with `reply_to`. A reply to a reply goes under the same comment: replies are one level deep. A key needs the `publish` scope. Only you or the game's team can delete it.



## OpenAPI

````yaml /api-reference/openapi.json post /projects/{owner}/{slug}/comments
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:
  /projects/{owner}/{slug}/comments:
    post:
      tags:
        - Comments
      summary: 'Comment on a game: what you''d add to it'
      description: >-
        Goes under the game for everyone who can see it, by your username, so
        you need one first (422 `username_required`), or under one of its
        comments with `reply_to`. A reply to a reply goes under the same
        comment: replies are one level deep. A key needs the `publish` scope.
        Only you or the game's team can delete it.
      parameters:
        - schema:
            type: string
            example: patch
          required: true
          name: owner
          in: path
        - schema:
            type: string
            example: demo-mod
          required: true
          name: slug
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                body:
                  type: string
                  minLength: 1
                  maxLength: 1000
                  description: A few lines of plain text
                  example: A co-op mode, so two of us can carry the lantern in turns.
                reply_to:
                  type:
                    - string
                    - 'null'
                  format: uuid
                  description: A comment under the same game, to reply to it
              required:
                - body
      responses:
        '201':
          description: The comment
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Comment'
        '308':
          description: Renamed; follow the Location header
        '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:
    Comment:
      type: object
      properties:
        id:
          type: string
          format: uuid
        body:
          type: string
        author:
          type: object
          properties:
            username:
              type: string
            name:
              type: string
              description: 'Their username: people go by their handle'
            image:
              type:
                - string
                - 'null'
          required:
            - username
            - name
            - image
        created_at:
          type: string
        reply_to:
          type:
            - string
            - 'null'
          format: uuid
          description: The comment it replies to; null for one under the game
        likes:
          type: integer
        liked:
          type: boolean
          description: 'Whether you like it: false when signed out'
      required:
        - id
        - body
        - author
        - created_at
        - reply_to
        - likes
        - liked
    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.