Skip to main content
The bugs endpoints give you full programmatic access to Detail’s findings. You can list all pending bugs for a repository, fetch a single bug’s details, and update a bug’s review state — all without leaving your own tooling.

GET /public/v1/bugs

Returns a paginated list of bugs for a repository, filtered by review status.
curl "https://api.detail.dev/public/v1/bugs?repo_id=repo_abc123&status=pending" \
  -H "Authorization: Bearer dtl_live_YOUR_KEY"

Query parameters

repo_id
string
required
The repository ID to fetch bugs for. Repository IDs are prefixed with repo_ and can be retrieved from GET /public/v1/repos. Example: repo_abc123.
status
string
required
Filter bugs by review state. One of:
  • pending — bugs that have not yet been reviewed
  • resolved — bugs marked as fixed
  • dismissed — bugs marked as not actionable
limit
integer
Number of results to return. Between 1 and 100. Defaults to 50.
offset
integer
Number of results to skip for pagination. Defaults to 0.
workflow_request_id
string
Filter bugs to those surfaced by a specific scan. Workflow request IDs are prefixed with wr_ and are returned by GET /public/v1/scans.

Response

bugs
Bug[]
Array of bug objects matching the query.
total
integer
Total number of bugs matching the query, regardless of limit and offset.

Example response

{
  "bugs": [
    {
      "id": "bug_abc123",
      "title": "SQL injection in user search",
      "summary": "User-controlled input is passed directly to a raw SQL query without sanitization, enabling SQL injection attacks.",
      "filePath": "src/db/users.ts",
      "commitSha": "abc1234567890abcdef",
      "isSecurityVulnerability": true,
      "repoId": "repo_xyz789",
      "createdAt": 1736899200000,
      "introducedIn": {
        "sha": "abc1234def5678",
        "date": "2024-12-10",
        "author": "alice",
        "prNumber": 42
      },
      "review": null,
      "linkedIssues": []
    }
  ],
  "total": 12
}

GET /public/v1/bugs/{bug_id}

Returns a single bug by its ID. The response shape is identical to an individual item in the bugs array above.
curl https://api.detail.dev/public/v1/bugs/bug_abc123 \
  -H "Authorization: Bearer dtl_live_YOUR_KEY"

Path parameters

bug_id
string
required
The bug ID to retrieve. Must match the pattern bug_*.

Example response

{
  "id": "bug_abc123",
  "title": "SQL injection in user search",
  "summary": "User-controlled input is passed directly to a raw SQL query without sanitization, enabling SQL injection attacks.",
  "filePath": "src/db/users.ts",
  "commitSha": "abc1234567890abcdef",
  "isSecurityVulnerability": true,
  "repoId": "repo_xyz789",
  "createdAt": 1736899200000,
  "introducedIn": {
    "sha": "abc1234def5678",
    "date": "2024-12-10",
    "author": "alice",
    "prNumber": 42
  },
  "review": null,
  "linkedIssues": [
    {
      "tracker": "linear",
      "issueId": "ENG-101",
      "url": "https://linear.app/team/issue/ENG-101"
    }
  ]
}

POST /public/v1/bugs/{bug_id}/review

Creates or updates a review on a bug. Use this to resolve, dismiss, or reopen a finding programmatically.
curl -X POST https://api.detail.dev/public/v1/bugs/bug_abc123/review \
  -H "Authorization: Bearer dtl_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "state": "dismissed",
    "dismissalReason": "not_a_bug",
    "notes": "Reviewed — this is expected behavior in the context of our auth middleware."
  }'

Path parameters

bug_id
string
required
The bug ID to review. Must match the pattern bug_*.

Request body

state
string
required
The new review state for the bug. One of:
  • resolved — the bug has been fixed
  • dismissed — the bug is not actionable
  • pending — reopen a previously reviewed bug
dismissalReason
string
Required when state is dismissed. One of:
  • not_a_bug — the finding is a false positive
  • wont_fix — the team has decided not to address this
  • duplicate — already tracked elsewhere
  • other — any other reason
notes
string
Optional free-text note to record with the review. Useful for explaining triage decisions.

Response

Returns the created or updated BugReview object.
state
string
The review state: pending, resolved, or dismissed.
createdAt
integer
Unix timestamp (milliseconds) when this review was recorded.
dismissalReason
string
The dismissal reason, if state is dismissed.
notes
string
The note recorded with the review, if provided.
source
string
How the review was created. For API-created reviews this is review.

Example response

{
  "state": "dismissed",
  "createdAt": 1736985600000,
  "dismissalReason": "not_a_bug",
  "notes": "Reviewed — this is expected behavior in the context of our auth middleware.",
  "source": "review"
}
Calling this endpoint on a bug that already has a review will overwrite the existing review with the new state.