API Reference

REST API for programmatic access to PRCheck reviews and rulesets.

Authentication

All API requests require a Bearer token in the Authorization header. Retrieve your API token from the PRCheck dashboard under Settings > API Keys.

http
Authorization: Bearer prc_live_xxxxxxxxxxxx

Base URL: https://api.prcheckhq.com/v1

POST /reviews

Trigger a manual scan of a pull request. Useful for re-triggering a scan after rule changes or for CI workflows.

Request

json POST /v1/reviews
{
  "repo": "acme-corp/api-service",
  "pr_number": 142,
  "ruleset": "default"  // optional, defaults to repo ruleset
}

Response

json 202 Accepted
{
  "review_id": "rev_01hz8kq9m3fap",
  "status": "queued",
  "estimated_ms": 4500
}

GET /reviews/:id

Fetch the results of a completed or in-progress review.

Response

json 200 OK
{
  "review_id": "rev_01hz8kq9m3fap",
  "status": "complete",
  "pr_number": 142,
  "repo": "acme-corp/api-service",
  "completed_at": "2026-05-14T09:22:41Z",
  "findings": [
    {
      "rule_id": "security/jwt-signature-required",
      "severity": "high",
      "file": "src/auth/session.ts",
      "line": 43,
      "message": "jwt.decode() skips signature verification"
    }
  ],
  "summary": {
    "high": 1,
    "medium": 0,
    "warning": 2
  }
}

GET /rules

List active rulesets for your organization.

json 200 OK
{
  "rulesets": [
    {
      "id": "ruleset_default",
      "name": "default",
      "rule_count": 48,
      "scope": "org"
    },
    {
      "id": "ruleset_api_custom",
      "name": "api-service-custom",
      "rule_count": 6,
      "scope": "repo"
    }
  ]
}

POST /rules

Create a new custom rule via the API. Equivalent to adding a rule to your .prccheck/rules.yml.

json POST /v1/rules
{
  "id": "no-console-log",
  "type": "regex",
  "pattern": "console\\.log\\(",
  "message": "Remove debug logging before merge",
  "severity": "warning",
  "scope": "org"
}

DELETE /rules/:id

Delete a custom rule by ID. Default ruleset rules cannot be deleted, only disabled per-repo via .prccheck/rules.yml.

http 204 No Content on success
DELETE /v1/rules/no-console-log

Rate limits

API requests are rate-limited to 60 requests per minute per API key. The X-RateLimit-Remaining header in each response shows your remaining quota for the current window. If you exceed the limit, you will receive a 429 Too Many Requests response.