API / dismiss-origin-pull-request-review-via-api

API

Dismiss an Origin Pull Request Review via the API

Dismiss a submitted review so its verdict no longer counts toward the pull request's review state with PUT https://api.cursor.com/v1/origin/repos/{ownerSlug}/{repoName}/pulls/{pullNumber}/reviews/{reviewId}/dismissals. Official reference: Origin API → Dismiss Pull Request Review (OpenAPI OriginService_DismissPullRequestReview).

Origin is in Early Beta and subject to change. Authenticate with an installation access token (oit_…) or a user access token that carries repository:pull_requests:reviews:write. Availability: Early Beta per the API overview.

The review itself is retained and keeps appearing in List Pull Request Reviews, with dismissal set. Dismissing does not require having authored the review; write permission on the repository's pull request reviews is sufficient. Only approve and request_changes reviews can be dismissed, and only once: a comment review, an unsubmitted draft review, or an already-dismissed review returns FAILED_PRECONDITION. Repeating the call leaves the first dismissal in place. A review that does not belong to the named pull request returns NOT_FOUND (HTTP 404). The message body field is required and must contain a non-whitespace character (INVALID_ARGUMENT otherwise). Pull request number is a JSON string. An unknown or unreachable pull returns 404. A 404 never distinguishes a missing pull from one your installation cannot reach.

Cost: 5 points against the principal budget (ordinary write).

Path parameters

Param Required Meaning
ownerSlug yes Owning entity's unique slug
repoName yes Repo name, unique to the owner
pullNumber yes Pull request number within the repository (string on the wire)
reviewId yes Stable Origin review identifier, as returned by List Pull Request Reviews

Request body

Field Required Meaning
message yes Reason recorded with the dismissal; must contain a non-whitespace character
curl --request PUT \
  --url 'https://api.cursor.com/v1/origin/repos/OWNER_SLUG/REPO_NAME/pulls/17/reviews/rev_01k2ja2000e0080000000000f6/dismissals' \
  --header 'Authorization: Bearer YOUR_ORIGIN_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
  "message": "Superseded by a newer review."
}'

Response

200 returns the review with dismissal set: dismissedBy, dismissedAt (RFC 3339), and message.

{
  "id": "rev_01k2ja2000e0080000000000f6",
  "author": {
    "user": {
      "id": "user_01k2ja2000e0080000000000c3",
      "email": "jane@acme.dev"
    }
  },
  "verdict": "approve",
  "body": "Approving. The telemetry schema matches the spec.",
  "submittedAt": "2026-08-02T15:00:00Z",
  "pullRequestVersion": {
    "number": "3",
    "headSha": "9a41f0c3d2b8e7f6a5c4d3e2f1b0a9c8d7e6f5a4",
    "baseSha": "3b1f9c2d8a7e6f5049c8b7a6d5e4f3a2b1c0d9e8",
    "createdAt": "2026-08-01T09:30:00Z"
  },
  "dismissal": {
    "dismissedBy": {
      "user": {
        "id": "user_01k2ja2000e0080000000000c3",
        "email": "jane@acme.dev"
      }
    },
    "dismissedAt": "2026-08-02T15:00:00Z",
    "message": "Superseded by a newer review."
  }
}

List remaining reviews with List Pull Request Reviews. Base URL: https://api.cursor.com/v1/origin.