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

# 触发 Devin Review

> 为拉取请求/合并请求触发一次 Devin Review。

这会创建一条数据库记录，供审核工作线程池处理。始终从 PR 获取最新提交。

<div id="permissions">
  ## 权限
</div>

需要一个在企业级拥有 `UseReviewManual` 权限的服务用户。


## OpenAPI

````yaml zh/v3-openapi.yaml POST /v3/enterprise/pr-reviews
openapi: 3.1.0
info:
  description: 采用 Service User 身份验证和 RBAC 的 Devin v3 API
  title: Devin API v3
  version: 3.0.0
servers: []
security:
  - bearerAuth: []
paths:
  /v3/enterprise/pr-reviews:
    post:
      tags:
        - pr-reviews
      summary: 触发 Devin Review
      description: |-
        为拉取请求/合并请求触发一次 Devin Review。

        这会创建一条数据库记录，供审核工作线程池处理。始终从 PR 获取最新提交。
      operationId: handle_create_pr_review_v3_enterprise_pr_reviews_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PrReviewCreateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PrReviewResponse'
          description: 成功响应
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: 验证错误
components:
  schemas:
    PrReviewCreateRequest:
      properties:
        pr_url:
          description: 要审查的拉取/合并请求的完整 URL（例如 `https://github.com/owner/repo/pull/123`）。
          examples:
            - https://github.com/owner/repo/pull/123
          title: Pr Url
          type: string
      required:
        - pr_url
      title: PrReviewCreateRequest
      type: object
    PrReviewResponse:
      properties:
        commit_sha:
          description: 将被审查的 PR 头部提交的 SHA。
          title: Commit Sha
          type: string
        created_at:
          description: 审查被接受的时间。
          format: date-time
          title: Created At
          type: string
        pr_number:
          description: 拉取/合并请求编号。
          title: Pr Number
          type: integer
        repo_path:
          description: 规范化的带主机前缀的代码仓库路径（例如 `github.com/owner/repo`）。
          title: Repo Path
          type: string
        status:
          description: 当前审查状态。新接受的审查初始状态为 `pending`。
          enum:
            - pending
            - running
            - completed
            - errored
            - cancelled
          title: Status
          type: string
      required:
        - status
        - repo_path
        - pr_number
        - commit_sha
        - created_at
      title: PrReviewResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    bearerAuth:
      description: 服务用户凭据（前缀：cog_）
      scheme: bearer
      type: http

````