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

# Update repository review instructions

> Update custom instructions for code reviews on pull requests



## OpenAPI

````yaml https://api.ghostsecurity.ai/openapi.json patch /v2/repos/{id}/instructions/review
openapi: 3.1.0
info:
  contact:
    email: support@ghostsecurity.com
    name: Ghost Security
    url: https://ghostsecurity.com/
  description: 'Provide your Bearer token as: Bearer <token>'
  title: Ghost API
  version: 2.0.0
servers:
  - description: Ghost Security API server
    url: https://api.ghostsecurity.ai
security: []
externalDocs:
  description: ''
  url: ''
paths:
  /v2/repos/{id}/instructions/review:
    patch:
      tags:
        - repos.v2
      summary: Update repository review instructions
      description: Update custom instructions for code reviews on pull requests
      parameters:
        - description: Repository ID
          in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/types.UpdateRepoReviewInstructionsRequest'
        description: Review instructions data
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/types.RepoReviewInstructions'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/types.ErrorBadRequest'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/types.ErrorUnauthorized'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/types.ErrorResponse'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/types.ErrorResponse'
          description: Not Found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/types.ErrorResponse'
          description: Unprocessable Entity
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/types.ErrorInternalServerError'
          description: Internal Server Error
      security:
        - bearerauth: []
components:
  schemas:
    types.UpdateRepoReviewInstructionsRequest:
      description: Repository review instructions update request
      properties:
        enabled:
          description: Whether the instructions are enabled
          type: boolean
        instructions:
          description: Custom instructions for code reviews (max 2500 characters)
          maxLength: 2500
          type: string
      type: object
    types.RepoReviewInstructions:
      description: Repository review instructions
      properties:
        created_at:
          description: When the instructions were created
          example: '2025-05-29T22:27:39.047356Z'
          type: string
        enabled:
          description: Whether the instructions are enabled
          example: true
          type: boolean
        instructions:
          description: Custom instructions for code reviews
          example: Focus on security vulnerabilities and follow OWASP guidelines.
          type: string
        updated_at:
          description: When the instructions were last updated
          example: '2025-05-29T22:27:39.047356Z'
          type: string
      type: object
    types.ErrorBadRequest:
      description: Error response for bad requests
      properties:
        error:
          description: Error message
          example: Invalid request body
          type: string
      type: object
    types.ErrorUnauthorized:
      description: Error response for unauthorized requests
      properties:
        error:
          description: Error message
          example: Unauthorized
          type: string
      type: object
    types.ErrorResponse:
      description: Error response
      properties:
        error:
          description: Error message
          example: Request error
          type: string
      type: object
    types.ErrorInternalServerError:
      description: Error response for internal server errors
      properties:
        error:
          description: Error message
          example: Internal server error
          type: string
      type: object
  securitySchemes:
    bearerauth:
      bearerFormat: JWT
      scheme: bearer
      type: http

````