Skip to main content
The repos and user endpoints give you the reference data you need to work with the rest of the API. Use the repos endpoint to discover repo_id values, which are required parameters for the bugs, scans, and rules endpoints. Use the user endpoint to verify your API key and inspect your organization memberships.

GET /public/v1/repos

Returns a paginated list of repositories connected to Detail that the authenticated user can access.
curl "https://api.detail.dev/public/v1/repos" \
  -H "Authorization: Bearer dtl_live_YOUR_KEY"

Query parameters

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.

Response

repos
Repo[]
Array of repository objects accessible to the authenticated user.
total
integer
Total number of repositories accessible to the user, regardless of limit and offset.

Example response

{
  "repos": [
    {
      "id": "repo_abc123",
      "name": "my-repo",
      "ownerName": "myorg",
      "fullName": "myorg/my-repo",
      "visibility": "private",
      "primaryBranch": "main",
      "orgId": "org_xyz789",
      "orgName": "My Organization"
    },
    {
      "id": "repo_def456",
      "name": "api-service",
      "ownerName": "myorg",
      "fullName": "myorg/api-service",
      "visibility": "private",
      "primaryBranch": "main",
      "orgId": "org_xyz789",
      "orgName": "My Organization"
    }
  ],
  "total": 2
}
If you already know the owner/repo slug for a repository, fetch the full list and filter by fullName client-side to find its repo_id. Alternatively, look up the repo ID in Settings → Repositories in the Detail dashboard.

GET /public/v1/user

Returns the authenticated user’s email address and their Detail organization memberships. This is a useful endpoint to verify that your API key is valid and to inspect which organizations you have access to.
curl https://api.detail.dev/public/v1/user \
  -H "Authorization: Bearer dtl_live_YOUR_KEY"

Response

email
string
The email address associated with the authenticated account.
orgs
Org[]
The Detail organizations this user belongs to.

Example response

{
  "email": "[email protected]",
  "orgs": [
    {
      "id": "org_xyz789",
      "name": "My Organization"
    }
  ]
}