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

# Update reviewer status

> Update the current user's reviewer status for a review



## OpenAPI

````yaml patch /repos/{repo_id}/reviews/{review_id}/reviewers/status
openapi: 3.0.3
info:
  title: Diversion Core API
  description: >-
    Definition of the Core API used to access low-level functionality of
    Diversion
  version: 0.2.0
servers:
  - url: https://api.diversion.dev/v0
    description: Base endpoint
security: []
paths:
  /repos/{repo_id}/reviews/{review_id}/reviewers/status:
    parameters:
      - $ref: '#/components/parameters/RepoParam'
      - in: path
        name: review_id
        required: true
        description: Review ID
        schema:
          type: string
          maxLength: 128
    patch:
      tags:
        - Reviews
      summary: Update reviewer status
      description: Update the current user's reviewer status for a review
      operationId: src.handlersv2.review.update_reviewer_status
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateReviewerStatusPayload'
      responses:
        '200':
          description: Reviewer status updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Review'
        default:
          $ref: '#/components/responses/Error'
      security:
        - OAuth2:
            - coreapi/write
components:
  parameters:
    RepoParam:
      in: path
      name: repo_id
      required: true
      schema:
        type: string
        example: example_id
        minLength: 3
        maxLength: 128
      description: >-
        The repo ID of the repository. Repo _name_ can be used instead of the
        ID, but usage of ID for permanent linking and API requests is preferred.
  schemas:
    UpdateReviewerStatusPayload:
      description: Payload for updating reviewer status
      type: object
      properties:
        status:
          type: string
          enum:
            - approved
            - changes_requested
            - rejected
          description: New reviewer status (requested is not allowed for manual updates)
      required:
        - status
    Review:
      description: Review details
      type: object
      properties:
        id:
          type: string
          description: Review ID
        title:
          type: string
          description: Review title
        description:
          type: string
          description: Review description
        status:
          type: string
          enum:
            - open
            - closed
          description: Review status
        author:
          $ref: '#/components/schemas/User'
        reviewers:
          type: array
          items:
            $ref: '#/components/schemas/User'
          description: List of reviewers
        reviewer_statuses:
          type: array
          items:
            $ref: '#/components/schemas/ReviewerStatus'
          description: List of reviewer statuses
        created_at:
          type: integer
          description: Unix timestamp when the review was created
        updated_at:
          type: integer
          description: Unix timestamp when the review was last updated
        base_ref:
          type: string
          description: Base reference (branch/commit)
        compare_ref:
          type: string
          description: Compare reference (branch/commit)
        repo_id:
          type: string
          description: Repository ID
        merge_commit_id:
          type: integer
          description: ID of the commit that merged this review
        active_merge_id:
          type: string
          description: ID of active merge with conflicts
        draft_commit_id:
          type: string
          description: ID of the draft commit that created this review
      required:
        - id
        - title
        - status
        - author
        - created_at
        - updated_at
        - base_ref
        - compare_ref
        - repo_id
    User:
      description: User details
      type: object
      properties:
        image:
          type: string
          description: >-
            URL of the user image. If updating the image, could be a base64
            encoded image.
          maxLength: 524288
        email:
          type: string
          format: email
        full_name:
          type: string
        id:
          type: string
        name:
          type: string
        tier:
          $ref: '#/components/schemas/Tier'
      required:
        - id
    ReviewerStatus:
      description: Individual reviewer status
      type: object
      properties:
        user_id:
          type: string
          description: Reviewer user ID
        status:
          type: string
          enum:
            - requested
            - approved
            - changes_requested
            - rejected
          description: Reviewer's status
        updated_at:
          type: integer
          description: Unix timestamp when the reviewer status was last updated
      required:
        - user_id
        - status
        - updated_at
    Error:
      type: object
      properties:
        status:
          type: integer
          description: HTTP status code
        detail:
          type: string
        title:
          type: string
        type:
          type: string
      required:
        - status
        - detail
    Tier:
      description: The tier of the user
      type: string
      enum:
        - EDUCATION
        - INDIE
        - PROFESSIONAL
        - ENTERPRISE
        - UNKNOWN
  responses:
    Error:
      description: An error occurred
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    OAuth2:
      type: oauth2
      x-tokenInfoFunc: src.token_info.token_auth
      description: This API uses OAuth 2 with the implicit grant flow
      flows:
        implicit:
          authorizationUrl: https://auth.diversion.dev/oauth2/authorize
          scopes:
            coreapi/read: Operations with no possible side-effects
            coreapi/write: Modifying operations
            coreapi/admin: >-
              Organizational operations like adding a repo or changing repo
              properties

````