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

# Delete a project that's still scratch

> Members of the owning org, signed in to Patch as themselves: it can't be undone, so an API key gets 403 `session_required`, with the project's page to do it on in `details.page`, and no agent can. Only a project that's still scratch can go: never a release published, even one taken back since (409 `has_releases`), no change request open from it or into it (409 `has_change_requests`, with how many of each in `details`), and nothing forked from it (409 `has_forks`), since change requests trace back to the repo they're for through what each fork came from. One Patch's staff took down stays for them to decide on (409 `taken_down`). It takes its page, its repo, its listing and its address, old ones included, which a new project can then have, and its releases that never went out: drafts, and ones still being checked, tested or reviewed, or turned down, with their checks, tests and reviews. Files named by their bytes stay, as anything with the same bytes reads them there. A change request it sent stays in the repo it went to, with what it changed, as its commits were copied in when it opened: its `from` is null from then on. A repo that couldn't be deleted answers 502 `delete_failed`, and nothing has changed.



## OpenAPI

````yaml /api-reference/openapi.json delete /projects/{owner}/{slug}
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}:
    delete:
      tags:
        - Projects
      summary: Delete a project that's still scratch
      description: >-
        Members of the owning org, signed in to Patch as themselves: it can't be
        undone, so an API key gets 403 `session_required`, with the project's
        page to do it on in `details.page`, and no agent can. Only a project
        that's still scratch can go: never a release published, even one taken
        back since (409 `has_releases`), no change request open from it or into
        it (409 `has_change_requests`, with how many of each in `details`), and
        nothing forked from it (409 `has_forks`), since change requests trace
        back to the repo they're for through what each fork came from. One
        Patch's staff took down stays for them to decide on (409 `taken_down`).
        It takes its page, its repo, its listing and its address, old ones
        included, which a new project can then have, and its releases that never
        went out: drafts, and ones still being checked, tested or reviewed, or
        turned down, with their checks, tests and reviews. Files named by their
        bytes stay, as anything with the same bytes reads them there. A change
        request it sent stays in the repo it went to, with what it changed, as
        its commits were copied in when it opened: its `from` is null from then
        on. A repo that couldn't be deleted answers 502 `delete_failed`, and
        nothing has changed.
      parameters:
        - schema:
            type: string
            example: patch
          required: true
          name: owner
          in: path
        - schema:
            type: string
            example: demo-mod
          required: true
          name: slug
          in: path
      responses:
        '204':
          description: Deleted
        '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'
        '409':
          description: >-
            It isn't scratch: it has had a release published (`has_releases`), a
            change request is open from it or into it (`has_change_requests`),
            something's forked from it (`has_forks`), or it was taken down
            (`taken_down`)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '502':
          description: Its repo couldn't be deleted just now (`delete_failed`)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: A fork is still copying it (`fork_in_progress`)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearer: []
components:
  schemas:
    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.