> ## Documentation Index
> Fetch the complete documentation index at: https://docs.codegen.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Edit Pull Request Simple

> Edit pull request properties (simple endpoint).

Update the state of a pull request (open, closed, draft, ready_for_review).
This endpoint only requires the PR ID, not the repo ID.
The requesting user must have write permissions to the repository.

Rate limit: 30 requests per minute.



## OpenAPI

````yaml api-reference/openapi3.json patch /v1/organizations/{org_id}/prs/{pr_id}
openapi: 3.1.0
info:
  title: Developer API
  description: API for application developers
  version: 1.0.0
servers:
  - url: https://api.codegen.com
    description: Codegen API
security: []
paths:
  /v1/organizations/{org_id}/prs/{pr_id}:
    patch:
      tags:
        - pull-requests
        - pull-requests
        - pull-requests
      summary: Edit Pull Request Simple
      description: >-
        Edit pull request properties (simple endpoint).


        Update the state of a pull request (open, closed, draft,
        ready_for_review).

        This endpoint only requires the PR ID, not the repo ID.

        The requesting user must have write permissions to the repository.


        Rate limit: 30 requests per minute.
      operationId: edit_pull_request_simple_v1_organizations__org_id__prs__pr_id__patch
      parameters:
        - name: org_id
          in: path
          required: true
          schema:
            type: integer
            title: Org Id
        - name: pr_id
          in: path
          required: true
          schema:
            type: integer
            title: Pr Id
        - name: authorization
          in: header
          required: false
          schema:
            title: Authorization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EditPRInput'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EditPRResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIRateLimitErrorResponse'
          description: Too Many Requests
components:
  schemas:
    EditPRInput:
      properties:
        state:
          type: string
          enum:
            - open
            - closed
            - draft
            - ready_for_review
          title: State
      type: object
      required:
        - state
      title: EditPRInput
      description: Input for editing PR properties.
    EditPRResponse:
      properties:
        success:
          type: boolean
          title: Success
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: Url
        number:
          anyOf:
            - type: integer
            - type: 'null'
          title: Number
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
        state:
          anyOf:
            - type: string
            - type: 'null'
          title: State
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
      type: object
      required:
        - success
      title: EditPRResponse
      description: Response from editing PR properties.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    APIRateLimitErrorResponse:
      properties:
        message:
          type: string
          title: Message
          default: Rate limit exceeded. Please try again later.
        status_code:
          type: integer
          title: Status Code
          default: 429
      type: object
      title: APIRateLimitErrorResponse
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````