Skip to main content
GET
/
api
/
v1
/
reviews
List Reviews
curl --request GET \
  --url https://api.example.com/api/v1/reviews
{
  "[]": [
    {}
  ],
  "[].id": 123,
  "[].event_type": "<string>",
  "[].source": "<string>",
  "[].status": "<string>",
  "[].pr_status": "<string>",
  "[].created_at": {},
  "[].processed_at": {},
  "[].pr_title": "<string>",
  "[].pr_number": 123,
  "[].repo_name": "<string>",
  "[].branch": "<string>",
  "[].author": "<string>",
  "[].pr_url": "<string>",
  "[].ai_summary": "<string>",
  "[].files_analyzed": 123
}

Overview

Retrieve a paginated list of PR reviews processed by Nectr AI. This endpoint deduplicates reviews by PR number and repository, returning the most recent event with the highest priority status for each unique PR.

Authentication

Requires a valid JWT token in the Authorization header:
Authorization: Bearer YOUR_JWT_TOKEN

Query Parameters

limit
integer
default:"20"
Maximum number of reviews to return (1-100)
status
string
Filter by event status or PR status. Valid values:
  • Event status: pending, processing, completed, failed
  • PR status: open, merged, closed
Search reviews by PR title, repository name, or PR number

Response

Returns an array of review objects, deduplicated by unique PR.
[]
array
Array of review objects
[].id
integer
Event ID
[].event_type
string
Type of event (e.g., “pull_request”)
[].source
string
Event source (e.g., “github”)
[].status
string
Processing status: pending, processing, completed, or failed
[].pr_status
string
Live PR status from GitHub: open, merged, or closed
[].created_at
datetime
Timestamp when the event was created
[].processed_at
datetime
Timestamp when the event was processed (null if pending)
[].pr_title
string
Pull request title
[].pr_number
integer
Pull request number
[].repo_name
string
Repository full name (owner/repo)
[].branch
string
Source branch name
[].author
string
GitHub username of the PR author
[].pr_url
string
Direct URL to the pull request on GitHub
[].ai_summary
string
AI-generated review summary (available when status is completed)
[].files_analyzed
integer
Number of files analyzed by the AI reviewer

Example Request

curl -X GET "https://api.nectr.ai/api/v1/reviews?limit=10&status=completed" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

Example Response

[
  {
    "id": 1234,
    "event_type": "pull_request",
    "source": "github",
    "status": "completed",
    "pr_status": "open",
    "created_at": "2026-03-10T14:30:00Z",
    "processed_at": "2026-03-10T14:32:15Z",
    "pr_title": "Add user authentication endpoints",
    "pr_number": 42,
    "repo_name": "acme/api-server",
    "branch": "feature/auth",
    "author": "johndoe",
    "pr_url": "https://github.com/acme/api-server/pull/42",
    "ai_summary": "APPROVE\n\nConfidence: 4/5\n\nThis PR implements secure authentication...",
    "files_analyzed": 8
  },
  {
    "id": 1230,
    "event_type": "pull_request",
    "source": "github",
    "status": "completed",
    "pr_status": "merged",
    "created_at": "2026-03-09T10:15:00Z",
    "processed_at": "2026-03-09T10:17:45Z",
    "pr_title": "Fix database connection pooling",
    "pr_number": 41,
    "repo_name": "acme/api-server",
    "branch": "bugfix/db-pool",
    "author": "janedoe",
    "pr_url": "https://github.com/acme/api-server/pull/41",
    "ai_summary": "APPROVE\n\nConfidence: 5/5\n\n🟢 **Minor Suggestion**: Consider adding...",
    "files_analyzed": 3
  }
]

Filtering Examples

Filter by Event Status

Get all reviews that are currently being processed:
GET /api/v1/reviews?status=processing

Filter by PR Status

Get all reviews for merged PRs:
GET /api/v1/reviews?status=merged

Search Reviews

Search for reviews containing “authentication” in title or repo name:
GET /api/v1/reviews?search=authentication
Search for a specific PR number:
GET /api/v1/reviews?search=42

Notes

  • Reviews are deduplicated by unique PR (repo + PR number). If multiple events exist for the same PR, the endpoint returns the event with the highest priority status
  • Status priority (highest to lowest): completed > failed > processing > pending
  • The pr_status field is fetched live from GitHub API for accuracy
  • If GitHub API fetch fails, pr_status falls back to the last known state from the webhook payload
  • The search parameter matches against PR title, repo name, and PR number (case-insensitive)

Build docs developers (and LLMs) love