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

# Read existing autofix status for a task or pull request



## OpenAPI

````yaml /openapi.json get /v1/code/autofix
openapi: 3.0.3
info:
  title: CodeRabbit API spec
  version: 1.0.0
servers:
  - url: https://api.coderabbit.ai
security:
  - ApiKeyAuth: []
paths:
  /v1/code/autofix:
    get:
      tags:
        - Coding
      summary: Read existing autofix status for a task or pull request
      operationId: get_code_autofix
      parameters:
        - name: org_id
          in: query
          required: false
          schema:
            type: string
            minLength: 1
          allowEmptyValue: true
          allowReserved: true
        - name: target
          in: query
          required: true
          schema:
            anyOf:
              - type: object
                properties:
                  type:
                    enum:
                      - task
                  taskId:
                    type: string
                    minLength: 1
                    maxLength: 64
                required:
                  - type
                  - taskId
                additionalProperties: false
              - type: object
                properties:
                  type:
                    enum:
                      - pull_request
                  repoId:
                    type: string
                    minLength: 1
                    maxLength: 255
                  prNumber:
                    type: integer
                    minimum: 0
                    maximum: 9007199254740991
                    exclusiveMinimum: true
                required:
                  - type
                  - repoId
                  - prNumber
                additionalProperties: false
          style: deepObject
          explode: true
          allowEmptyValue: true
          allowReserved: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  deliveryConflict:
                    type: object
                    properties:
                      reasonCode:
                        enum:
                          - delivery_conflict
                      operationId:
                        type: string
                        minLength: 1
                        maxLength: 200
                      attemptedHeadSha:
                        type: string
                        minLength: 1
                        maxLength: 200
                      patchGeneration:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                        exclusiveMinimum: true
                    required:
                      - reasonCode
                      - operationId
                      - attemptedHeadSha
                      - patchGeneration
                    additionalProperties: false
                  available:
                    type: boolean
                  watch:
                    anyOf:
                      - type: object
                        properties:
                          id:
                            type: string
                            format: uuid
                          organizationId:
                            type: string
                            format: uuid
                          provider:
                            enum:
                              - github
                              - gitlab
                              - azure-devops
                              - bitbucket
                            type: string
                          host:
                            enum:
                              - github.com
                              - gitlab.com
                              - dev.azure.com
                              - bitbucket.org
                            type: string
                          repoId:
                            type: string
                            minLength: 1
                            maxLength: 255
                          owner:
                            type: string
                            minLength: 1
                            maxLength: 255
                          repo:
                            type: string
                            minLength: 1
                            maxLength: 255
                          taskId:
                            type: string
                            minLength: 1
                            maxLength: 64
                          prNumber:
                            anyOf:
                              - type: integer
                                minimum: 0
                                maximum: 9007199254740991
                                exclusiveMinimum: true
                              - type: string
                                nullable: true
                                enum:
                                  - null
                          prUrl:
                            anyOf:
                              - type: string
                                format: uri
                              - type: string
                                nullable: true
                                enum:
                                  - null
                          summaryCommentId:
                            anyOf:
                              - type: integer
                                minimum: 0
                                maximum: 9007199254740991
                                exclusiveMinimum: true
                              - type: string
                                nullable: true
                                enum:
                                  - null
                            default: null
                          sourceRepositoryId:
                            anyOf:
                              - type: string
                                minLength: 1
                                maxLength: 255
                              - type: string
                                nullable: true
                                enum:
                                  - null
                          sourceBranch:
                            anyOf:
                              - type: string
                                maxLength: 1024
                              - type: string
                                nullable: true
                                enum:
                                  - null
                          baseBranch:
                            anyOf:
                              - type: string
                                maxLength: 1024
                              - type: string
                                nullable: true
                                enum:
                                  - null
                            default: null
                          requestedBy:
                            type: object
                            properties:
                              id:
                                type: string
                                minLength: 1
                                maxLength: 255
                              login:
                                type: string
                                minLength: 1
                                maxLength: 255
                            required:
                              - id
                          providerUserId:
                            type: string
                            minLength: 1
                            maxLength: 255
                          enabled:
                            type: boolean
                          generation:
                            type: integer
                            minimum: 0
                            maximum: 9007199254740991
                          revision:
                            type: integer
                            minimum: 0
                            maximum: 9007199254740991
                          pendingRevision:
                            type: integer
                            minimum: 0
                            maximum: 9007199254740991
                          pendingEventAt:
                            anyOf:
                              - type: string
                                format: date-time
                              - type: string
                                nullable: true
                                enum:
                                  - null
                            default: null
                          processedRevision:
                            type: integer
                            minimum: 0
                            maximum: 9007199254740991
                            default: 0
                          nativeActionIds:
                            type: array
                            maxItems: 200
                            items:
                              type: string
                              pattern: ^[a-f0-9]{64}$
                            default: []
                          state:
                            enum:
                              - waiting_for_pr
                              - checking
                              - fixing
                              - waiting
                              - green
                              - paused
                              - stopped
                            type: string
                          rounds:
                            type: integer
                            minimum: 0
                            maximum: 5
                          unchangedRounds:
                            type: integer
                            minimum: 0
                            maximum: 9007199254740991
                          headSha:
                            anyOf:
                              - type: string
                              - type: string
                                nullable: true
                                enum:
                                  - null
                          mergeQueueEviction:
                            anyOf:
                              - type: object
                                properties:
                                  headSha:
                                    type: string
                                    minLength: 1
                                    maxLength: 255
                                  reason:
                                    enum:
                                      - CI_FAILURE
                                      - INVALID_MERGE_COMMIT
                                      - MERGE_CONFLICT
                                      - MERGE_CONFLICT_ERROR
                                    type: string
                                required:
                                  - headSha
                                  - reason
                                additionalProperties: false
                              - type: string
                                nullable: true
                                enum:
                                  - null
                            default: null
                          remainingFingerprint:
                            anyOf:
                              - type: string
                              - type: string
                                nullable: true
                                enum:
                                  - null
                          operationId:
                            anyOf:
                              - type: string
                              - type: string
                                nullable: true
                                enum:
                                  - null
                          operationHeadSha:
                            anyOf:
                              - type: string
                              - type: string
                                nullable: true
                                enum:
                                  - null
                            default: null
                          operationContinuationTurnId:
                            anyOf:
                              - type: string
                                minLength: 1
                                maxLength: 255
                              - type: string
                                nullable: true
                                enum:
                                  - null
                          operationPrompt:
                            anyOf:
                              - type: string
                                maxLength: 200000
                              - type: string
                                nullable: true
                                enum:
                                  - null
                            default: null
                          operationActionContext:
                            anyOf:
                              - anyOf:
                                  - type: object
                                    properties:
                                      origin:
                                        enum:
                                          - autopilot
                                      trigger:
                                        enum:
                                          - merge_queue_eviction
                                      pullRequest:
                                        type: object
                                        properties:
                                          url:
                                            type: string
                                            maxLength: 2048
                                            format: uri
                                          title:
                                            type: string
                                            maxLength: 500
                                          headBranch:
                                            type: string
                                            maxLength: 500
                                          baseBranch:
                                            type: string
                                            maxLength: 500
                                          headSha:
                                            type: string
                                            minLength: 1
                                            maxLength: 200
                                        required:
                                          - url
                                          - headSha
                                      details:
                                        type: object
                                        properties:
                                          checks:
                                            type: array
                                            maxItems: 48
                                            items:
                                              type: object
                                              properties:
                                                id:
                                                  type: string
                                                  maxLength: 500
                                                name:
                                                  type: string
                                                  maxLength: 500
                                                url:
                                                  type: string
                                                  maxLength: 2048
                                                  format: uri
                                                summary:
                                                  type: string
                                                  maxLength: 6000
                                              required:
                                                - name
                                          logs:
                                            type: array
                                            maxItems: 48
                                            items:
                                              type: object
                                              properties:
                                                name:
                                                  type: string
                                                  maxLength: 500
                                                body:
                                                  type: string
                                                  maxLength: 6000
                                              required:
                                                - name
                                                - body
                                          comments:
                                            type: array
                                            maxItems: 48
                                            items:
                                              type: object
                                              properties:
                                                body:
                                                  type: string
                                                  maxLength: 6000
                                                id:
                                                  type: string
                                                  maxLength: 500
                                                authorKind:
                                                  enum:
                                                    - human
                                                    - coderabbit
                                                    - unknown
                                                  type: string
                                                author:
                                                  type: string
                                                  maxLength: 500
                                                url:
                                                  type: string
                                                  maxLength: 2048
                                                  format: uri
                                                path:
                                                  type: string
                                                  maxLength: 500
                                                line:
                                                  type: integer
                                                  minimum: 0
                                                  maximum: 9007199254740991
                                                  exclusiveMinimum: true
                                                originalLine:
                                                  type: integer
                                                  minimum: 0
                                                  maximum: 9007199254740991
                                                  exclusiveMinimum: true
                                                originalCommitSha:
                                                  type: string
                                                  maxLength: 500
                                                outdated:
                                                  type: boolean
                                              required:
                                                - body
                                          warnings:
                                            type: array
                                            maxItems: 12
                                            items:
                                              type: string
                                              maxLength: 500
                                        required:
                                          - checks
                                          - logs
                                          - comments
                                          - warnings
                                      kind:
                                        enum:
                                          - fix_ci
                                          - fix_pre_merge_checks
                                          - generate_docstrings
                                          - generate_unit_tests
                                          - simplify_code
                                          - address_comments
                                          - fix_ci_and_address_comments
                                        type: string
                                    required:
                                      - details
                                      - kind
                                  - type: object
                                    properties:
                                      origin:
                                        enum:
                                          - autopilot
                                      trigger:
                                        enum:
                                          - merge_queue_eviction
                                      pullRequest:
                                        type: object
                                        properties:
                                          url:
                                            type: string
                                            maxLength: 2048
                                            format: uri
                                          title:
                                            type: string
                                            maxLength: 500
                                          headBranch:
                                            type: string
                                            maxLength: 500
                                          baseBranch:
                                            type: string
                                            maxLength: 500
                                          headSha:
                                            type: string
                                            minLength: 1
                                            maxLength: 200
                                        required:
                                          - url
                                          - headSha
                                      details:
                                        type: object
                                        properties:
                                          checks:
                                            type: array
                                            maxItems: 48
                                            items:
                                              type: object
                                              properties:
                                                id:
                                                  type: string
                                                  maxLength: 500
                                                name:
                                                  type: string
                                                  maxLength: 500
                                                url:
                                                  type: string
                                                  maxLength: 2048
                                                  format: uri
                                                summary:
                                                  type: string
                                                  maxLength: 6000
                                              required:
                                                - name
                                          logs:
                                            type: array
                                            maxItems: 48
                                            items:
                                              type: object
                                              properties:
                                                name:
                                                  type: string
                                                  maxLength: 500
                                                body:
                                                  type: string
                                                  maxLength: 6000
                                              required:
                                                - name
                                                - body
                                          comments:
                                            type: array
                                            maxItems: 48
                                            items:
                                              type: object
                                              properties:
                                                body:
                                                  type: string
                                                  maxLength: 6000
                                                id:
                                                  type: string
                                                  maxLength: 500
                                                authorKind:
                                                  enum:
                                                    - human
                                                    - coderabbit
                                                    - unknown
                                                  type: string
                                                author:
                                                  type: string
                                                  maxLength: 500
                                                url:
                                                  type: string
                                                  maxLength: 2048
                                                  format: uri
                                                path:
                                                  type: string
                                                  maxLength: 500
                                                line:
                                                  type: integer
                                                  minimum: 0
                                                  maximum: 9007199254740991
                                                  exclusiveMinimum: true
                                                originalLine:
                                                  type: integer
                                                  minimum: 0
                                                  maximum: 9007199254740991
                                                  exclusiveMinimum: true
                                                originalCommitSha:
                                                  type: string
                                                  maxLength: 500
                                                outdated:
                                                  type: boolean
                                              required:
                                                - body
                                          warnings:
                                            type: array
                                            maxItems: 12
                                            items:
                                              type: string
                                              maxLength: 500
                                        required:
                                          - checks
                                          - logs
                                          - comments
                                          - warnings
                                      kind:
                                        enum:
                                          - run_custom_recipe
                                      recipeName:
                                        type: string
                                        maxLength: 500
                                    required:
                                      - details
                                      - kind
                                  - type: object
                                    properties:
                                      origin:
                                        enum:
                                          - autopilot
                                      trigger:
                                        enum:
                                          - merge_queue_eviction
                                      pullRequest:
                                        type: object
                                        properties:
                                          url:
                                            type: string
                                            maxLength: 2048
                                            format: uri
                                          title:
                                            type: string
                                            maxLength: 500
                                          headBranch:
                                            type: string
                                            maxLength: 500
                                          baseBranch:
                                            type: string
                                            maxLength: 500
                                          headSha:
                                            type: string
                                            minLength: 1
                                            maxLength: 200
                                        required:
                                          - url
                                          - headSha
                                      details:
                                        type: object
                                        properties:
                                          checks:
                                            type: array
                                            maxItems: 48
                                            items:
                                              type: object
                                              properties:
                                                id:
                                                  type: string
                                                  maxLength: 500
                                                name:
                                                  type: string
                                                  maxLength: 500
                                                url:
                                                  type: string
                                                  maxLength: 2048
                                                  format: uri
                                                summary:
                                                  type: string
                                                  maxLength: 6000
                                              required:
                                                - name
                                          logs:
                                            type: array
                                            maxItems: 48
                                            items:
                                              type: object
                                              properties:
                                                name:
                                                  type: string
                                                  maxLength: 500
                                                body:
                                                  type: string
                                                  maxLength: 6000
                                              required:
                                                - name
                                                - body
                                          comments:
                                            type: array
                                            maxItems: 48
                                            items:
                                              type: object
                                              properties:
                                                body:
                                                  type: string
                                                  maxLength: 6000
                                                id:
                                                  type: string
                                                  maxLength: 500
                                                authorKind:
                                                  enum:
                                                    - human
                                                    - coderabbit
                                                    - unknown
                                                  type: string
                                                author:
                                                  type: string
                                                  maxLength: 500
                                                url:
                                                  type: string
                                                  maxLength: 2048
                                                  format: uri
                                                path:
                                                  type: string
                                                  maxLength: 500
                                                line:
                                                  type: integer
                                                  minimum: 0
                                                  maximum: 9007199254740991
                                                  exclusiveMinimum: true
                                                originalLine:
                                                  type: integer
                                                  minimum: 0
                                                  maximum: 9007199254740991
                                                  exclusiveMinimum: true
                                                originalCommitSha:
                                                  type: string
                                                  maxLength: 500
                                                outdated:
                                                  type: boolean
                                              required:
                                                - body
                                          warnings:
                                            type: array
                                            maxItems: 12
                                            items:
                                              type: string
                                              maxLength: 500
                                        required:
                                          - checks
                                          - logs
                                          - comments
                                          - warnings
                                      kind:
                                        enum:
                                          - resolve_conflicts
                                    required:
                                      - details
                                      - kind
                              - type: string
                                nullable: true
                                enum:
                                  - null
                          operationMergeConflictResolution:
                            anyOf:
                              - type: object
                                properties:
                                  pullRequestNumber:
                                    type: integer
                                    minimum: 0
                                    maximum: 9007199254740991
                                    exclusiveMinimum: true
                                  headBranch:
                                    type: string
                                    minLength: 1
                                    maxLength: 1024
                                  baseBranch:
                                    type: string
                                    minLength: 1
                                    maxLength: 1024
                                  expectedHeadSha: {}
                                  baseSha: {}
                                  conflictingFiles:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        path:
                                          type: string
                                          minLength: 1
                                          maxLength: 4096
                                        conflictType:
                                          type: string
                                          minLength: 1
                                          maxLength: 128
                                      required:
                                        - path
                                        - conflictType
                                      additionalProperties: false
                                  baseRepositoryId:
                                    type: string
                                    minLength: 1
                                    maxLength: 255
                                  baseCloneUrl:
                                    type: string
                                    format: uri
                                  baseRefreshUsed:
                                    enum:
                                      - true
                                required:
                                  - pullRequestNumber
                                  - headBranch
                                  - baseBranch
                                  - conflictingFiles
                                  - baseRepositoryId
                                  - baseCloneUrl
                                additionalProperties: false
                              - type: string
                                nullable: true
                                enum:
                                  - null
                            default: null
                          operationFindings:
                            type: array
                            maxItems: 500
                            items:
                              type: object
                              properties:
                                commentIdentity:
                                  type: string
                                  pattern: ^[a-f0-9]{24}$
                                isNitpick:
                                  enum:
                                    - true
                                isOutsideDiff:
                                  enum:
                                    - true
                                filePath:
                                  type: string
                                  minLength: 1
                                  maxLength: 4096
                                startLine:
                                  type: integer
                                  minimum: 0
                                  maximum: 9007199254740991
                                  exclusiveMinimum: true
                                endLine:
                                  type: integer
                                  minimum: 0
                                  maximum: 9007199254740991
                                  exclusiveMinimum: true
                                codegenInstructions:
                                  type: string
                                  minLength: 1
                                  maxLength: 20000
                              required:
                                - filePath
                                - startLine
                                - endLine
                                - codegenInstructions
                            default: []
                          findingDispositions:
                            type: array
                            maxItems: 500
                            items:
                              type: object
                              properties:
                                findingId:
                                  type: string
                                  pattern: ^finding-[1-9]\d*$
                                disposition:
                                  enum:
                                    - invalid
                                    - already_fixed
                                  type: string
                                reason:
                                  type: string
                                  minLength: 1
                                  maxLength: 2000
                                evidence:
                                  anyOf:
                                    - type: string
                                      minLength: 1
                                      maxLength: 4000
                                    - type: string
                                      minLength: 1
                                      maxLength: 4000
                                operationId:
                                  type: string
                                  minLength: 1
                                  maxLength: 255
                                headSha:
                                  type: string
                                  minLength: 1
                                  maxLength: 255
                                finding:
                                  type: object
                                  properties:
                                    commentIdentity:
                                      type: string
                                      pattern: ^[a-f0-9]{24}$
                                    isNitpick:
                                      enum:
                                        - true
                                    isOutsideDiff:
                                      enum:
                                        - true
                                    filePath:
                                      type: string
                                      minLength: 1
                                      maxLength: 4096
                                    startLine:
                                      type: integer
                                      minimum: 0
                                      maximum: 9007199254740991
                                      exclusiveMinimum: true
                                    endLine:
                                      type: integer
                                      minimum: 0
                                      maximum: 9007199254740991
                                      exclusiveMinimum: true
                                    codegenInstructions:
                                      type: string
                                      minLength: 1
                                      maxLength: 20000
                                  required:
                                    - filePath
                                    - startLine
                                    - endLine
                                    - codegenInstructions
                              required:
                                - findingId
                                - disposition
                                - reason
                                - evidence
                                - operationId
                                - headSha
                                - finding
                              additionalProperties: false
                            default: []
                          operationBilling:
                            anyOf:
                              - anyOf:
                                  - type: object
                                    properties:
                                      access:
                                        enum:
                                          - metered
                                      factoryLoop:
                                        type: object
                                        properties:
                                          loopId:
                                            type: string
                                            format: uuid
                                          runId:
                                            type: string
                                            format: uuid
                                          startupProtocol:
                                            enum:
                                              - occurrence_v1
                                          remainingMilliseconds:
                                            anyOf:
                                              - type: integer
                                                minimum: 0
                                                maximum: 9007199254740991
                                                exclusiveMinimum: true
                                              - type: string
                                                nullable: true
                                                enum:
                                                  - null
                                        required:
                                          - loopId
                                          - runId
                                          - remainingMilliseconds
                                        additionalProperties: false
                                      codingPaidUsageAllowedAtAdmission:
                                        type: boolean
                                      codingSpendCapPolicy:
                                        enum:
                                          - admission_v1
                                      chargebeeSubscriptionId:
                                        type: string
                                        minLength: 1
                                      prepaidAuthorizationRequired:
                                        type: boolean
                                      prepaidUsageMetric:
                                        enum:
                                          - agent_minutes
                                          - coding_agent_minutes
                                        type: string
                                      creditActor:
                                        type: object
                                        properties:
                                          provider:
                                            enum:
                                              - slack
                                              - discord
                                              - microsoft_teams
                                              - github
                                              - gitlab
                                              - bitbucket
                                              - azure-devops
                                              - origin
                                              - github-self-hosted
                                              - gitlab-self-hosted
                                              - bitbucket-self-hosted
                                              - azure-devops-self-hosted
                                              - gerrit-self-hosted
                                            type: string
                                          userId:
                                            type: string
                                            minLength: 1
                                            maxLength: 255
                                        required:
                                          - provider
                                          - userId
                                        additionalProperties: false
                                    required:
                                      - access
                                      - chargebeeSubscriptionId
                                    additionalProperties: false
                                  - type: object
                                    properties:
                                      access:
                                        enum:
                                          - trial_credits
                                      factoryLoop:
                                        type: object
                                        properties:
                                          loopId:
                                            type: string
                                            format: uuid
                                          runId:
                                            type: string
                                            format: uuid
                                          startupProtocol:
                                            enum:
                                              - occurrence_v1
                                          remainingMilliseconds:
                                            anyOf:
                                              - type: integer
                                                minimum: 0
                                                maximum: 9007199254740991
                                                exclusiveMinimum: true
                                              - type: string
                                                nullable: true
                                                enum:
                                                  - null
                                        required:
                                          - loopId
                                          - runId
                                          - remainingMilliseconds
                                        additionalProperties: false
                                      codingPaidUsageAllowedAtAdmission:
                                        type: boolean
                                      codingSpendCapPolicy:
                                        enum:
                                          - admission_v1
                                      creditActor:
                                        type: object
                                        properties:
                                          provider:
                                            enum:
                                              - slack
                                              - discord
                                              - microsoft_teams
                                              - github
                                              - gitlab
                                              - bitbucket
                                              - azure-devops
                                              - origin
                                              - github-self-hosted
                                              - gitlab-self-hosted
                                              - bitbucket-self-hosted
                                              - azure-devops-self-hosted
                                              - gerrit-self-hosted
                                            type: string
                                          userId:
                                            type: string
                                            minLength: 1
                                            maxLength: 255
                                        required:
                                          - provider
                                          - userId
                                        additionalProperties: false
                                      triageExhaustedCreditsWaived:
                                        type: boolean
                                      triageExhaustedCreditsWaivedUntil:
                                        type: string
                                    required:
                                      - access
                                    additionalProperties: false
                                  - type: object
                                    properties:
                                      access:
                                        enum:
                                          - unlimited
                                      factoryLoop:
                                        type: object
                                        properties:
                                          loopId:
                                            type: string
                                            format: uuid
                                          runId:
                                            type: string
                                            format: uuid
                                          startupProtocol:
                                            enum:
                                              - occurrence_v1
                                          remainingMilliseconds:
                                            anyOf:
                                              - type: integer
                                                minimum: 0
                                                maximum: 9007199254740991
                                                exclusiveMinimum: true
                                              - type: string
                                                nullable: true
                                                enum:
                                                  - null
                                        required:
                                          - loopId
                                          - runId
                                          - remainingMilliseconds
                                        additionalProperties: false
                                    required:
                                      - access
                                    additionalProperties: false
                                  - type: object
                                    properties:
                                      access:
                                        enum:
                                          - free_turn
                                      factoryLoop:
                                        type: object
                                        properties:
                                          loopId:
                                            type: string
                                            format: uuid
                                          runId:
                                            type: string
                                            format: uuid
                                          startupProtocol:
                                            enum:
                                              - occurrence_v1
                                          remainingMilliseconds:
                                            anyOf:
                                              - type: integer
                                                minimum: 0
                                                maximum: 9007199254740991
                                                exclusiveMinimum: true
                                              - type: string
                                                nullable: true
                                                enum:
                                                  - null
                                        required:
                                          - loopId
                                          - runId
                                          - remainingMilliseconds
                                        additionalProperties: false
                                      collaborationMode:
                                        enum:
                                          - plan
                                    required:
                                      - access
                                    additionalProperties: false
                                  - type: object
                                    properties:
                                      access:
                                        enum:
                                          - development_bypass
                                      factoryLoop:
                                        type: object
                                        properties:
                                          loopId:
                                            type: string
                                            format: uuid
                                          runId:
                                            type: string
                                            format: uuid
                                          startupProtocol:
                                            enum:
                                              - occurrence_v1
                                          remainingMilliseconds:
                                            anyOf:
                                              - type: integer
                                                minimum: 0
                                                maximum: 9007199254740991
                                                exclusiveMinimum: true
                                              - type: string
                                                nullable: true
                                                enum:
                                                  - null
                                        required:
                                          - loopId
                                          - runId
                                          - remainingMilliseconds
                                        additionalProperties: false
                                    required:
                                      - access
                                    additionalProperties: false
                              - type: string
                                nullable: true
                                enum:
                                  - null
                            default: null
                          settledOperationId:
                            anyOf:
                              - type: string
                              - type: string
                                nullable: true
                                enum:
                                  - null
                            default: null
                          review:
                            anyOf:
                              - type: object
                                properties:
                                  headSha:
                                    type: string
                                    minLength: 1
                                    maxLength: 255
                                  complete:
                                    type: boolean
                                  botUserId:
                                    type: string
                                    minLength: 1
                                    maxLength: 255
                                  findings:
                                    type: array
                                    maxItems: 500
                                    items:
                                      type: object
                                      properties:
                                        commentIdentity:
                                          type: string
                                          pattern: ^[a-f0-9]{24}$
                                        isNitpick:
                                          enum:
                                            - true
                                        isOutsideDiff:
                                          enum:
                                            - true
                                        filePath:
                                          type: string
                                          minLength: 1
                                          maxLength: 4096
                                        startLine:
                                          type: integer
                                          minimum: 0
                                          maximum: 9007199254740991
                                          exclusiveMinimum: true
                                        endLine:
                                          type: integer
                                          minimum: 0
                                          maximum: 9007199254740991
                                          exclusiveMinimum: true
                                        codegenInstructions:
                                          type: string
                                          minLength: 1
                                          maxLength: 20000
                                      required:
                                        - filePath
                                        - startLine
                                        - endLine
                                        - codegenInstructions
                                  blockingPreMergeChecks:
                                    type: array
                                    maxItems: 500
                                    items:
                                      type: object
                                      properties:
                                        checkName:
                                          type: string
                                          minLength: 1
                                          maxLength: 512
                                        explanation:
                                          type: string
                                          maxLength: 4000
                                        resolution:
                                          type: string
                                          minLength: 1
                                          maxLength: 4000
                                      required:
                                        - checkName
                                        - explanation
                                      additionalProperties: false
                                    default: []
                                required:
                                  - headSha
                                  - complete
                                  - findings
                              - type: string
                                nullable: true
                                enum:
                                  - null
                            default: null
                          reviewHistory:
                            type: array
                            maxItems: 10
                            items:
                              type: object
                              properties:
                                headSha:
                                  type: string
                                  minLength: 1
                                  maxLength: 255
                                complete:
                                  type: boolean
                                botUserId:
                                  type: string
                                  minLength: 1
                                  maxLength: 255
                                findings:
                                  type: array
                                  maxItems: 500
                                  items:
                                    type: object
                                    properties:
                                      commentIdentity:
                                        type: string
                                        pattern: ^[a-f0-9]{24}$
                                      isNitpick:
                                        enum:
                                          - true
                                      isOutsideDiff:
                                        enum:
                                          - true
                                      filePath:
                                        type: string
                                        minLength: 1
                                        maxLength: 4096
                                      startLine:
                                        type: integer
                                        minimum: 0
                                        maximum: 9007199254740991
                                        exclusiveMinimum: true
                                      endLine:
                                        type: integer
                                        minimum: 0
                                        maximum: 9007199254740991
                                        exclusiveMinimum: true
                                      codegenInstructions:
                                        type: string
                                        minLength: 1
                                        maxLength: 20000
                                    required:
                                      - filePath
                                      - startLine
                                      - endLine
                                      - codegenInstructions
                                blockingPreMergeChecks:
                                  type: array
                                  maxItems: 500
                                  items:
                                    type: object
                                    properties:
                                      checkName:
                                        type: string
                                        minLength: 1
                                        maxLength: 512
                                      explanation:
                                        type: string
                                        maxLength: 4000
                                      resolution:
                                        type: string
                                        minLength: 1
                                        maxLength: 4000
                                    required:
                                      - checkName
                                      - explanation
                                    additionalProperties: false
                                  default: []
                              required:
                                - headSha
                                - complete
                                - findings
                            default: []
                          cursor:
                            anyOf:
                              - type: string
                                maxLength: 4096
                              - type: string
                                nullable: true
                                enum:
                                  - null
                            default: null
                          workflowId:
                            anyOf:
                              - type: string
                              - type: string
                                nullable: true
                                enum:
                                  - null
                          reason:
                            anyOf:
                              - type: string
                                maxLength: 2000
                              - type: string
                                nullable: true
                                enum:
                                  - null
                          updatedAt:
                            type: string
                            format: date-time
                        required:
                          - id
                          - organizationId
                          - provider
                          - host
                          - repoId
                          - owner
                          - repo
                          - taskId
                          - prNumber
                          - prUrl
                          - sourceRepositoryId
                          - sourceBranch
                          - requestedBy
                          - providerUserId
                          - enabled
                          - generation
                          - revision
                          - pendingRevision
                          - state
                          - rounds
                          - unchangedRounds
                          - headSha
                          - remainingFingerprint
                          - operationId
                          - workflowId
                          - reason
                          - updatedAt
                        additionalProperties: false
                      - type: string
                        nullable: true
                        enum:
                          - null
                required:
                  - available
                  - watch
        '400':
          description: '400'
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        enum:
                          - invalid_request
                        type: string
                      message:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                        exclusiveMinimum: true
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        '401':
          description: '401'
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        enum:
                          - unauthenticated
                        type: string
                      message:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                        exclusiveMinimum: true
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        '403':
          description: '403'
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        enum:
                          - forbidden
                        type: string
                      message:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                        exclusiveMinimum: true
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        '404':
          description: '404'
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        enum:
                          - not_found
                        type: string
                      message:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                        exclusiveMinimum: true
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        '409':
          description: '409'
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        enum:
                          - head_changed
                          - conflict
                        type: string
                      message:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                        exclusiveMinimum: true
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        '412':
          description: '412'
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        enum:
                          - precondition_failed
                        type: string
                      message:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                        exclusiveMinimum: true
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        '413':
          description: '413'
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        enum:
                          - payload_too_large
                        type: string
                      message:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                        exclusiveMinimum: true
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        '429':
          description: '429'
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        enum:
                          - rate_limit_exceeded
                        type: string
                      message:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                        exclusiveMinimum: true
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        '500':
          description: '500'
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        enum:
                          - internal_error
                        type: string
                      message:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                        exclusiveMinimum: true
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        '503':
          description: '503'
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - unavailable
                      message:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                        exclusiveMinimum: true
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-coderabbitai-api-key
      description: >-
        API key for authentication. You can create an API key from the
        CodeRabbit dashboard.

````

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