> ## 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 (beta)

> Returns the autofix watch state for a coding task or pull request, and whether autofix is available. Requires coding_agent:read. available is false when the organization has no coding agent access. A pending deliveryConflict is returned for use with the recover action.

Open Beta (This feature is currently in open beta. We are actively improving it based on your feedback. If you encounter any issues or have suggestions, please share them on our Discord community or visit the support page.)

> [tab] CLI Tool
>
> ```bash
> coderabbit api request "/code/autofix?target[type]=task&target[taskId]=$TARGET_TASK_ID"
> ```
>
> To install and sign in to the CLI, see [Call from the CLI](https://docs.coderabbit.ai/api/cli.md).

> [tab] MCP Server
>
> An agent connected to the [CodeRabbit MCP server](https://docs.coderabbit.ai/api/mcp.md) runs this operation as the `get_code_autofix` tool. The connection selects the organization, so the arguments have no `org_id` or `org_name`.
>
> ```json
> {
>   "method": "tools/call",
>   "params": {
>     "name": "get_code_autofix",
>     "arguments": {
>       "target": "<target>"
>     }
>   }
> }
> ```


## OpenAPI

````yaml /openapi.json get /v1/code/autofix
openapi: 3.0.0
info:
  title: CodeRabbit API
  version: 1.0.0
  description: >-
    Read and manage CodeRabbit reviews, coding tasks, Verify, Triage, security
    findings, Knowledge Base, configuration, and users for your organization.
servers:
  - url: https://api.coderabbit.ai
    description: US region
  - url: https://api.eu.coderabbit.ai
    description: EU region
security:
  - ApiKeyAuth: []
tags:
  - name: Organizations and repositories
  - name: Pull requests and reviews
  - name: Coding Agent
  - name: Coding environments
  - name: Verify
  - name: Triage
  - name: Security
  - name: Knowledge Base
  - name: Automations
  - name: Reports
  - name: Configuration
  - name: Connections
  - name: Users and roles
  - name: Usage and metrics
paths:
  /v1/code/autofix:
    get:
      tags:
        - Coding Agent
      summary: Read existing autofix status for a task or pull request
      description: >-
        Returns the autofix watch state for a coding task or pull request, and
        whether autofix is available. Requires coding_agent:read. available is
        false when the organization has no coding agent access. A pending
        deliveryConflict is returned for use with the recover action.
      operationId: get_code_autofix
      parameters:
        - name: org_id
          in: query
          required: false
          schema:
            type: string
            minLength: 1
            description: >-
              Organization for a workspace key: the Git-provider organization ID
              (scope.provider_organization_id) or the CodeRabbit organization ID
              (scope.id, or id from list organizations). Supply either org_id or
              org_name, never both. Omit for organization keys and MCP
              connections.
          allowEmptyValue: true
          allowReserved: true
        - name: org_name
          in: query
          required: false
          schema:
            type: string
            pattern: ^[A-Za-z0-9][A-Za-z0-9-]{0,38}$
            description: >-
              GitHub organization login, such as coderabbitai, not its display
              name. Matched case-insensitively within the authenticated
              workspace. Supply either org_name or org_id, never both; omit for
              organization keys and MCP connections.
          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
                    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
                        exclusiveMinimum: true
                    required:
                      - reasonCode
                      - operationId
                      - attemptedHeadSha
                      - patchGeneration
                    additionalProperties: false
                  available:
                    type: boolean
                  watch:
                    anyOf:
                      - type: object
                        properties:
                          repoId:
                            type: string
                            minLength: 1
                            maxLength: 255
                          prNumber:
                            anyOf:
                              - type: integer
                                minimum: 0
                                exclusiveMinimum: true
                              - type: string
                                nullable: true
                                enum:
                                  - null
                          prUrl:
                            anyOf:
                              - type: string
                                format: uri
                              - type: string
                                nullable: true
                                enum:
                                  - null
                          enabled:
                            type: boolean
                          state:
                            enum:
                              - waiting_for_pr
                              - checking
                              - fixing
                              - waiting
                              - green
                              - paused
                              - stopped
                            type: string
                          headSha:
                            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
                          id:
                            type: string
                            format: uuid
                          organizationId:
                            type: string
                            format: uuid
                          provider:
                            enum:
                              - github
                              - gitlab
                              - azure-devops
                              - bitbucket
                            type: string
                          host:
                            type: string
                            minLength: 1
                            maxLength: 255
                            pattern: >-
                              ^[a-z0-9](?:[a-z0-9.-]*[a-z0-9])?(?::[1-9]\d{0,4})?$
                          owner:
                            type: string
                            minLength: 1
                            maxLength: 255
                          repo:
                            type: string
                            minLength: 1
                            maxLength: 255
                          taskId:
                            type: string
                            minLength: 1
                            maxLength: 64
                          summaryCommentId:
                            anyOf:
                              - type: integer
                                minimum: 0
                                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
                          triage:
                            type: object
                            properties:
                              executionId:
                                type: string
                                format: uuid
                              ruleId:
                                type: string
                                format: uuid
                              configVersion:
                                type: integer
                                minimum: 0
                                exclusiveMinimum: true
                              instructions:
                                type: string
                                maxLength: 4000
                            required:
                              - executionId
                              - ruleId
                              - configVersion
                            additionalProperties: false
                          repairScope:
                            enum:
                              - all
                              - ci
                            type: string
                          generation:
                            type: integer
                            minimum: 0
                          revision:
                            type: integer
                            minimum: 0
                          pendingRevision:
                            type: integer
                            minimum: 0
                          pendingEventAt:
                            anyOf:
                              - type: string
                                format: date-time
                              - type: string
                                nullable: true
                                enum:
                                  - null
                            default: null
                          processedRevision:
                            type: integer
                            minimum: 0
                            default: 0
                          nativeActionIds:
                            type: array
                            maxItems: 200
                            items:
                              type: string
                              pattern: ^[a-f0-9]{64}$
                            default: []
                          rounds:
                            type: integer
                            minimum: 0
                          unchangedRounds:
                            type: integer
                            minimum: 0
                          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
                                                  exclusiveMinimum: true
                                                originalLine:
                                                  type: integer
                                                  minimum: 0
                                                  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
                                                  exclusiveMinimum: true
                                                originalLine:
                                                  type: integer
                                                  minimum: 0
                                                  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
                                                  exclusiveMinimum: true
                                                originalLine:
                                                  type: integer
                                                  minimum: 0
                                                  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
                                    exclusiveMinimum: true
                                  headBranch:
                                    type: string
                                    minLength: 1
                                    maxLength: 1024
                                  baseBranch:
                                    type: string
                                    minLength: 1
                                    maxLength: 1024
                                  baseCloneUrl:
                                    type: string
                                    format: uri
                                  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
                                  baseRefreshUsed:
                                    enum:
                                      - true
                                required:
                                  - pullRequestNumber
                                  - headBranch
                                  - baseBranch
                                  - baseCloneUrl
                                  - conflictingFiles
                                  - baseRepositoryId
                                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
                                  exclusiveMinimum: true
                                endLine:
                                  type: integer
                                  minimum: 0
                                  exclusiveMinimum: true
                                codegenInstructions:
                                  type: string
                                  minLength: 1
                                  maxLength: 20000
                              required:
                                - filePath
                                - startLine
                                - endLine
                                - codegenInstructions
                            default: []
                          nativeDescriptionInput:
                            type: object
                            properties:
                              operationId:
                                type: string
                                minLength: 1
                                maxLength: 255
                              headSha:
                                type: string
                                minLength: 1
                                maxLength: 255
                              failedCheckIds:
                                type: array
                                maxItems: 500
                                items:
                                  type: string
                                  minLength: 1
                                  maxLength: 255
                            required:
                              - operationId
                              - headSha
                              - failedCheckIds
                            additionalProperties: false
                          nativeDescriptionReceipt:
                            type: object
                            properties:
                              operationId:
                                type: string
                                minLength: 1
                                maxLength: 255
                              responseSeq:
                                type: integer
                                minimum: 0
                                exclusiveMinimum: true
                              requestHash:
                                type: string
                                pattern: ^[a-f0-9]{64}$
                              headSha:
                                type: string
                                minLength: 1
                                maxLength: 255
                            required:
                              - operationId
                              - responseSeq
                              - requestHash
                              - headSha
                            additionalProperties: false
                          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
                                      exclusiveMinimum: true
                                    endLine:
                                      type: integer
                                      minimum: 0
                                      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:
                                          - consumption
                                      factoryLoop:
                                        not: {}
                                      product:
                                        enum:
                                          - pr_automation
                                      organizationId:
                                        type: string
                                        format: uuid
                                      taskId:
                                        type: string
                                        minLength: 1
                                        maxLength: 255
                                      queueItemId:
                                        type: string
                                        minLength: 1
                                        maxLength: 255
                                      parentReviewRunId:
                                        anyOf:
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                          - type: string
                                            nullable: true
                                            enum:
                                              - null
                                      target:
                                        type: object
                                        properties:
                                          provider:
                                            type: string
                                            minLength: 1
                                            maxLength: 64
                                          repositoryId:
                                            type: string
                                            minLength: 1
                                            maxLength: 256
                                          prNumber:
                                            type: integer
                                            minimum: 0
                                            exclusiveMinimum: true
                                        required:
                                          - provider
                                          - repositoryId
                                          - prNumber
                                        additionalProperties: false
                                    required:
                                      - access
                                      - product
                                      - organizationId
                                      - taskId
                                      - queueItemId
                                      - parentReviewRunId
                                      - target
                                    additionalProperties: false
                                  - 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
                                                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
                                                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
                                                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
                                                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
                                                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
                                          exclusiveMinimum: true
                                        endLine:
                                          type: integer
                                          minimum: 0
                                          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
                                        exclusiveMinimum: true
                                      endLine:
                                        type: integer
                                        minimum: 0
                                        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
                        required:
                          - repoId
                          - prNumber
                          - prUrl
                          - enabled
                          - state
                          - headSha
                          - reason
                          - updatedAt
                          - id
                          - organizationId
                          - provider
                          - host
                          - owner
                          - repo
                          - taskId
                          - sourceRepositoryId
                          - sourceBranch
                          - requestedBy
                          - providerUserId
                          - generation
                          - revision
                          - pendingRevision
                          - rounds
                          - unchangedRounds
                          - remainingFingerprint
                          - operationId
                          - workflowId
                        additionalProperties: false
                      - type: string
                        nullable: true
                        enum:
                          - null
                  ciFollowups:
                    type: object
                    properties:
                      repoId:
                        type: string
                        minLength: 1
                        maxLength: 255
                      prNumber:
                        anyOf:
                          - type: integer
                            minimum: 0
                            exclusiveMinimum: true
                          - type: string
                            nullable: true
                            enum:
                              - null
                      prUrl:
                        anyOf:
                          - type: string
                            format: uri
                          - type: string
                            nullable: true
                            enum:
                              - null
                      enabled:
                        type: boolean
                      state:
                        enum:
                          - waiting_for_pr
                          - checking
                          - fixing
                          - waiting
                          - green
                          - paused
                          - stopped
                        type: string
                      headSha:
                        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
                      id:
                        type: string
                        format: uuid
                      organizationId:
                        type: string
                        format: uuid
                      provider:
                        enum:
                          - github
                          - gitlab
                          - azure-devops
                          - bitbucket
                        type: string
                      host:
                        type: string
                        minLength: 1
                        maxLength: 255
                        pattern: ^[a-z0-9](?:[a-z0-9.-]*[a-z0-9])?(?::[1-9]\d{0,4})?$
                      owner:
                        type: string
                        minLength: 1
                        maxLength: 255
                      repo:
                        type: string
                        minLength: 1
                        maxLength: 255
                      taskId:
                        type: string
                        minLength: 1
                        maxLength: 64
                      summaryCommentId:
                        anyOf:
                          - type: integer
                            minimum: 0
                            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
                      triage:
                        type: object
                        properties:
                          executionId:
                            type: string
                            format: uuid
                          ruleId:
                            type: string
                            format: uuid
                          configVersion:
                            type: integer
                            minimum: 0
                            exclusiveMinimum: true
                          instructions:
                            type: string
                            maxLength: 4000
                        required:
                          - executionId
                          - ruleId
                          - configVersion
                        additionalProperties: false
                      repairScope:
                        enum:
                          - all
                          - ci
                        type: string
                      generation:
                        type: integer
                        minimum: 0
                      revision:
                        type: integer
                        minimum: 0
                      pendingRevision:
                        type: integer
                        minimum: 0
                      pendingEventAt:
                        anyOf:
                          - type: string
                            format: date-time
                          - type: string
                            nullable: true
                            enum:
                              - null
                        default: null
                      processedRevision:
                        type: integer
                        minimum: 0
                        default: 0
                      nativeActionIds:
                        type: array
                        maxItems: 200
                        items:
                          type: string
                          pattern: ^[a-f0-9]{64}$
                        default: []
                      rounds:
                        type: integer
                        minimum: 0
                      unchangedRounds:
                        type: integer
                        minimum: 0
                      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
                                              exclusiveMinimum: true
                                            originalLine:
                                              type: integer
                                              minimum: 0
                                              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
                                              exclusiveMinimum: true
                                            originalLine:
                                              type: integer
                                              minimum: 0
                                              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
                                              exclusiveMinimum: true
                                            originalLine:
                                              type: integer
                                              minimum: 0
                                              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
                                exclusiveMinimum: true
                              headBranch:
                                type: string
                                minLength: 1
                                maxLength: 1024
                              baseBranch:
                                type: string
                                minLength: 1
                                maxLength: 1024
                              baseCloneUrl:
                                type: string
                                format: uri
                              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
                              baseRefreshUsed:
                                enum:
                                  - true
                            required:
                              - pullRequestNumber
                              - headBranch
                              - baseBranch
                              - baseCloneUrl
                              - conflictingFiles
                              - baseRepositoryId
                            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
                              exclusiveMinimum: true
                            endLine:
                              type: integer
                              minimum: 0
                              exclusiveMinimum: true
                            codegenInstructions:
                              type: string
                              minLength: 1
                              maxLength: 20000
                          required:
                            - filePath
                            - startLine
                            - endLine
                            - codegenInstructions
                        default: []
                      nativeDescriptionInput:
                        type: object
                        properties:
                          operationId:
                            type: string
                            minLength: 1
                            maxLength: 255
                          headSha:
                            type: string
                            minLength: 1
                            maxLength: 255
                          failedCheckIds:
                            type: array
                            maxItems: 500
                            items:
                              type: string
                              minLength: 1
                              maxLength: 255
                        required:
                          - operationId
                          - headSha
                          - failedCheckIds
                        additionalProperties: false
                      nativeDescriptionReceipt:
                        type: object
                        properties:
                          operationId:
                            type: string
                            minLength: 1
                            maxLength: 255
                          responseSeq:
                            type: integer
                            minimum: 0
                            exclusiveMinimum: true
                          requestHash:
                            type: string
                            pattern: ^[a-f0-9]{64}$
                          headSha:
                            type: string
                            minLength: 1
                            maxLength: 255
                        required:
                          - operationId
                          - responseSeq
                          - requestHash
                          - headSha
                        additionalProperties: false
                      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
                                  exclusiveMinimum: true
                                endLine:
                                  type: integer
                                  minimum: 0
                                  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:
                                      - consumption
                                  factoryLoop:
                                    not: {}
                                  product:
                                    enum:
                                      - pr_automation
                                  organizationId:
                                    type: string
                                    format: uuid
                                  taskId:
                                    type: string
                                    minLength: 1
                                    maxLength: 255
                                  queueItemId:
                                    type: string
                                    minLength: 1
                                    maxLength: 255
                                  parentReviewRunId:
                                    anyOf:
                                      - type: string
                                        minLength: 1
                                        maxLength: 255
                                      - type: string
                                        nullable: true
                                        enum:
                                          - null
                                  target:
                                    type: object
                                    properties:
                                      provider:
                                        type: string
                                        minLength: 1
                                        maxLength: 64
                                      repositoryId:
                                        type: string
                                        minLength: 1
                                        maxLength: 256
                                      prNumber:
                                        type: integer
                                        minimum: 0
                                        exclusiveMinimum: true
                                    required:
                                      - provider
                                      - repositoryId
                                      - prNumber
                                    additionalProperties: false
                                required:
                                  - access
                                  - product
                                  - organizationId
                                  - taskId
                                  - queueItemId
                                  - parentReviewRunId
                                  - target
                                additionalProperties: false
                              - 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
                                            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
                                            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
                                            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
                                            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
                                            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
                                      exclusiveMinimum: true
                                    endLine:
                                      type: integer
                                      minimum: 0
                                      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
                                    exclusiveMinimum: true
                                  endLine:
                                    type: integer
                                    minimum: 0
                                    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
                    required:
                      - repoId
                      - prNumber
                      - prUrl
                      - enabled
                      - state
                      - headSha
                      - reason
                      - updatedAt
                      - id
                      - organizationId
                      - provider
                      - host
                      - owner
                      - repo
                      - taskId
                      - sourceRepositoryId
                      - sourceBranch
                      - requestedBy
                      - providerUserId
                      - generation
                      - revision
                      - pendingRevision
                      - rounds
                      - unchangedRounds
                      - remainingFingerprint
                      - operationId
                      - workflowId
                    additionalProperties: false
                required:
                  - available
                  - watch
        '400':
          description: Bad request
          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
                        exclusiveMinimum: true
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        '401':
          description: Unauthorized
          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
                        exclusiveMinimum: true
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        '403':
          description: Forbidden
          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
                        exclusiveMinimum: true
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        '404':
          description: Not found
          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
                        exclusiveMinimum: true
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        '409':
          description: Conflict
          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
                        exclusiveMinimum: true
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        '412':
          description: Precondition failed
          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
                        exclusiveMinimum: true
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        '413':
          description: Content too large
          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
                        exclusiveMinimum: true
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        '429':
          description: Too many requests
          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
                        exclusiveMinimum: true
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        '500':
          description: Internal server error
          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
                        exclusiveMinimum: true
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        '503':
          description: Service unavailable
          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
                        exclusiveMinimum: true
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-coderabbitai-api-key
      description: >-
        See [Authentication](/api/authentication) for the key types and where to
        create a key.

````

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