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

# A change request

> With what you can do with it (`can_merge`, `can_decline`, `can_withdraw`, `can_talk`). `from` is this repo itself for one of its own branches, which whoever opened it withdraws and the rest of its org declines.



## OpenAPI

````yaml /api-reference/openapi.json get /projects/{owner}/{slug}/change-requests/{number}
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}/change-requests/{number}:
    get:
      tags:
        - Change requests
      summary: A change request
      description: >-
        With what you can do with it (`can_merge`, `can_decline`,
        `can_withdraw`, `can_talk`). `from` is this repo itself for one of its
        own branches, which whoever opened it withdraws and the rest of its org
        declines.
      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: integer
            minimum: 1
            example: 12
          required: true
          name: number
          in: path
      responses:
        '200':
          description: The request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChangeRequestDetail'
        '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'
        '429':
          description: >-
            Too many requests: wait as long as `Retry-After` says
            (`retry_after_s` in `details`), then retry
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    ChangeRequestDetail:
      allOf:
        - $ref: '#/components/schemas/ChangeRequest'
        - type: object
          properties:
            can_merge:
              type: boolean
              description: >-
                Whether you can merge it: you're in the repo's org, and it's
                open.
            can_decline:
              type: boolean
              description: >-
                Whether you can decline it: you're in the repo's org, and it's
                open.
            can_withdraw:
              type: boolean
              description: 'Whether you can withdraw it: you offer it, and it''s open.'
            can_talk:
              type: boolean
              description: 'Whether you can post in its talk: you''re signed in.'
          required:
            - can_merge
            - can_decline
            - can_withdraw
            - can_talk
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: version_exists
            message:
              type: string
            details: {}
          required:
            - code
            - message
      required:
        - error
    ChangeRequest:
      type: object
      properties:
        number:
          type: integer
          example: 12
        title:
          type: string
          example: Port to 26.5
        description:
          type: string
        state:
          type: string
          enum:
            - open
            - merged
            - declined
            - withdrawn
          description: >-
            open: waiting on the repo's owner. merged: its commits are in the
            branch it was for. declined: the owner turned it down. withdrawn:
            its author took it back.
        from:
          type:
            - string
            - 'null'
          description: >-
            The repo its branch is in, as owner/slug: the fork it comes from, or
            this repo itself for one of its own branches. Null if you can't
            reach the fork.
          example: kai/sky-mod
        branch:
          type: string
          description: The branch it offers, in `from`
          example: port-26.5
        into:
          type: string
          description: The branch it would change in this repo
          example: '26.5'
        head_commit:
          type: string
          description: >-
            Its latest commit, as copied into this repo, where a clone doesn't
            see it: `git fetch <clone_url> <head_commit>` gets its commits while
            it's open.
        problems:
          type: array
          items:
            type: string
          description: >-
            What stopped the latest push to its branch being copied, which stays
            out of the request until it's fixed: a refusal, a fork that isn't
            open, which copies when it opens, or a copy that failed, which a new
            push tries again. Empty says nothing has stopped one, and a copy may
            still be on its way.
        author:
          type:
            - string
            - 'null'
          description: 'Who opened it: their username'
          example: kai
        talk_count:
          type: integer
          description: Posts in its talk
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        closed_at:
          type:
            - string
            - 'null'
          format: date-time
        closed_by:
          type:
            - string
            - 'null'
          description: 'Who merged, declined or withdrew it: their username'
        merge_commit:
          type:
            - string
            - 'null'
          description: The commit its branch was at after the merge.
      required:
        - number
        - title
        - description
        - state
        - from
        - branch
        - into
        - head_commit
        - problems
        - author
        - talk_count
        - created_at
        - updated_at
        - closed_at
        - closed_by
        - merge_commit

````

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