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

# Publish a release: upload to live in one flow

> Takes a release from its upload to live, one step a call. It checks the files and starts the test on the person's PC, holds while Patch Desktop plays it (wait, up to 50 seconds), and once it's recorded answers your_review with the footage: send review to this route and, if it passes, it's submitted at once and followed through Patch's review. Call it again until stage is live, or it stops and says why. Calling it is the person's yes: call it when they want it out. In a Patch Desktop chat a game or mod stops at ready: the person's press on the chat's publish button sends it.



## OpenAPI

````yaml /api-reference/openapi.json post /projects/{owner}/{slug}/releases/{version}/publish
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}/releases/{version}/publish:
    post:
      tags:
        - Review
      summary: 'Publish a release: upload to live in one flow'
      description: >-
        Takes a release from its upload to live, one step a call. It checks the
        files and starts the test on the person's PC, holds while Patch Desktop
        plays it (wait, up to 50 seconds), and once it's recorded answers
        your_review with the footage: send review to this route and, if it
        passes, it's submitted at once and followed through Patch's review. Call
        it again until stage is live, or it stops and says why. Calling it is
        the person's yes: call it when they want it out. In a Patch Desktop chat
        a game or mod stops at ready: the person's press on the chat's publish
        button sends 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
        - schema:
            type: string
            example: 0.1.0
          required: true
          name: version
          in: path
        - schema:
            type:
              - integer
              - 'null'
            minimum: 0
            maximum: 50
            description: >-
              Seconds (up to 50) to wait for this to change while Patch is
              working on it. Answers at once when it's your turn or the
              person's.
          required: false
          description: >-
            Seconds (up to 50) to wait for this to change while Patch is working
            on it. Answers at once when it's your turn or the person's.
          name: wait
          in: query
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                review:
                  type: object
                  properties:
                    verdict:
                      type: string
                      enum:
                        - pass
                        - fail
                    plays:
                      type: boolean
                      description: It starts and can be played
                    harmful:
                      type: boolean
                      description: >-
                        It sends players' data elsewhere, mines, phishes or
                        collects credentials, misleads players, or shows content
                        Patch doesn't allow
                    summary:
                      type: string
                      minLength: 1
                      maxLength: 2000
                      description: What you saw, in a few lines
                    moments:
                      type: array
                      items:
                        type: object
                        properties:
                          run:
                            type: integer
                            minimum: 1
                          at:
                            type: string
                            description: The run time as the sheets label frames, mm:ss
                            example: '00:14'
                          saw:
                            type: string
                            minLength: 1
                            maxLength: 500
                            description: What happened there
                        required:
                          - run
                          - at
                          - saw
                      maxItems: 50
                  required:
                    - verdict
                    - plays
                    - harmful
                    - summary
                    - moments
                  description: Your review of the recorded test's footage, at your_review
                test_again:
                  type: boolean
                  description: Start another test after one that couldn't run
      responses:
        '200':
          description: Where it is now
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublishStep'
        '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:
    PublishStep:
      type: object
      properties:
        project:
          type: string
        version:
          type: string
        stage:
          type: string
          enum:
            - uploading
            - testing
            - your_review
            - in_review
            - ready
            - live
            - stopped
          description: >-
            uploading: files are missing. testing: Patch Desktop on the person's
            PC tests it. your_review: the test is recorded and footage has its
            sheets: look at every one and send review. in_review: Patch reviews
            it. ready: in a Patch Desktop chat, it passed and the person's press
            on the chat's publish button sends it. live. stopped: code and next
            say why and what to do
        line:
          type: string
          description: >-
            One line to show the person: Uploading, Testing on your PC, In
            review or Live
          example: Testing on your PC
        next:
          type: string
          description: What to do now, for the agent
        code:
          type:
            - string
            - 'null'
          description: >-
            Why it stopped: files_failed, test_failed, couldnt_run, rejected,
            repo_private or overtaken
        status:
          type: string
          enum:
            - draft
            - checking
            - testing
            - cloud_review
            - in_review
            - published
            - rejected
            - yanked
            - quarantined
          description: >-
            draft, then checking (file checks). A browser game is testing until
            a test on its creator's PC passes, then cloud_review, then
            published. A mod goes to cloud_review, then in_review (a staff
            member), then published. Any step can end in rejected.
        needs_person:
          $ref: '#/components/schemas/PersonNeeded'
        test_id:
          type:
            - string
            - 'null'
          format: uuid
        footage:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/Sheet'
          description: 'At your_review: every contact sheet of the test, in order'
        findings:
          type: array
          items:
            $ref: '#/components/schemas/Finding'
          description: 'When stopped: what to fix'
        urls:
          $ref: '#/components/schemas/ProjectUrls'
      required:
        - project
        - version
        - stage
        - line
        - next
        - code
        - status
        - needs_person
        - test_id
        - footage
        - findings
        - urls
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: version_exists
            message:
              type: string
            details: {}
          required:
            - code
            - message
      required:
        - error
    PersonNeeded:
      type:
        - object
        - 'null'
      properties:
        code:
          type: string
          enum:
            - open_patch_desktop
            - press_start
          description: >-
            open_patch_desktop: no Patch Desktop is open to take the test on.
            press_start: one is, and the test was asked for outside its chats,
            so it waits there for the person to press Start
        why:
          type: string
          description: Why, for the agent
        ask:
          type: string
          description: What to ask the person, in words to pass on
        link:
          type: string
      required:
        - code
        - why
        - ask
        - link
      description: >-
        Something only the person can do. Ask them, then wait for their answer
        rather than asking Patch again.
    Sheet:
      type: object
      properties:
        run:
          type: integer
        index:
          type: integer
        kind:
          type: string
          enum:
            - frames
            - burst
          description: >-
            frames: a frame every 2 seconds. burst: consecutive frames at the
            full frame rate, around ready and while keys were held, to see what
            changes from one frame to the next (flicker, popping, a frame that's
            wrong)
        from:
          type: string
          description: The run time of its first frame, mm:ss, or mm:ss.hh in a burst
        to:
          type: string
        frames:
          type: array
          items:
            type: string
          description: Every frame's run time, mm:ss, or mm:ss.hh in a burst
        sha256:
          type: string
        url:
          type: string
          description: A JPEG, for 15 minutes
        expires_at:
          type: string
      required:
        - run
        - index
        - kind
        - from
        - to
        - frames
        - sha256
        - url
        - expires_at
    Finding:
      type: object
      properties:
        rule_id:
          type: string
          example: PA-130
        severity:
          type: string
          enum:
            - blocking
            - warning
            - info
        path:
          type:
            - string
            - 'null'
          description: The file it's about, if any
        message:
          type: string
        suggestion:
          type:
            - string
            - 'null'
          description: What to change
        url:
          type:
            - string
            - 'null'
          description: A page with more about it, such as a malware scan's report
      required:
        - rule_id
        - severity
        - path
        - message
        - suggestion
        - url
    ProjectUrls:
      type: object
      properties:
        page:
          type: string
          description: Its game page on Patch
        play:
          type:
            - string
            - 'null'
          description: Where it plays on Patch, while a browser game version is live
        game:
          type:
            - string
            - 'null'
          description: >-
            The live browser game, or block's demo, on the game host, its own
            origin (https://<site>-<env>.patchusercontent.com/). Null where
            there's no game host.
      required:
        - page
        - play
        - game
      description: Where it is on Patch. On single-project responses, not in lists.
  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.