API / handle-origin-pull-request-review-webhooks

API

Handle Origin pull request review webhooks

Subscribe to pull_request.review.submitted and pull_request.review.dismissed. Official payload: OpenAPI PullRequestReviewWebhookPayload and llms-full.txt → Events. Changelog: August 26, 2026 (dismissed event).

Origin is in Early Beta and subject to change. Subscribe when you configure the app's webhook events list. Subscribing needs repository:pull_requests:reviews:read. Delivery uses the same signed envelope as other Origin webhooks.

Events

event.type When it fires
pull_request.review.submitted A review is submitted with any verdict.
pull_request.review.dismissed A submitted review is dismissed, explicitly or by being superseded by a newer decision.

Payload fields

Field Meaning
pullRequest Pull request reference (id, number, repository)
review The review that was submitted or dismissed
review.id Review id (rev_…)
review.author Actor who filed the review (user / app / serviceAccount)
review.verdict Submitted verdict (for example approve)
review.body Review body text
review.submittedAt When the review was submitted
review.pullRequestVersion Version the review was filed against (number, headSha, baseSha)
review.dismissal Set on dismissed events

Sample pull_request.review.submitted event.payload:

{
  "pullRequest": {
    "id": "pr_01k2ja2000e0080000000000d4",
    "number": "17",
    "repository": {
      "id": "repo_01k2ja2000e0080000000000q4",
      "name": "rocket",
      "owner": {
        "slug": "acme",
        "id": "ns_01k2ja2000e0080000000000p3",
        "type": "team"
      }
    }
  },
  "review": {
    "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"
    }
  }
}

Receiver tips

  1. Branch on event.type. On dismissed, expect review.dismissal to be populated with the same overall review shape as submitted.
  2. Comments filed inside Create Pull Request Review emit their own pull_request.comment.created events when the review submits — handle those separately.
  3. Refresh review state with List / Get Pull Request Reviews when you need the full history after a dismiss/supersede.
  4. Keep the receiver answering within the 10-second delivery deadline.

Pitfalls