Skip to main content
GET
/
api
/
v1
/
git
/
repos
curl 'https://agent.blackbox.ai/api/v1/git/repos' \
  -H 'Authorization: Bearer YOUR_API_KEY'
{
  "repos": [
    {
      "id": 123456789,
      "name": "my-app",
      "full_name": "octocat/my-app",
      "private": false,
      "html_url": "https://github.com/octocat/my-app",
      "description": "My awesome application",
      "fork": false,
      "default_branch": "main",
      "updated_at": "2026-05-20T10:00:00Z"
    },
    {
      "id": 987654321,
      "name": "private-api",
      "full_name": "my-org/private-api",
      "private": true,
      "html_url": "https://github.com/my-org/private-api",
      "description": "Internal API service",
      "fork": false,
      "default_branch": "main",
      "updated_at": "2026-05-19T08:30:00Z"
    }
  ],
  "total": 2
}
This endpoint returns all GitHub repositories accessible to the connected GitHub account. It fetches both personal repositories and, optionally, repositories from all organizations the user belongs to. Results are deduplicated by full_name.
This endpoint requires a Pro subscription and a connected GitHub account. Connect your GitHub account via POST /api/v1/git/config first.

Authentication

To use this API, you need a BLACKBOX API Key. Follow these steps to get your API key:
  1. Go to app.blackbox.ai/agent-api and click Get an API Key (requires a Pro subscription)
  2. Once provisioning completes, you will be redirected to your Dashboard
  3. From the Dashboard, create an API key to use with all Agent API requests
Your API key will be in the format: sk-xxxxxxxxxxxxxxxxxxxxxx

Headers

Authorization
string
required
API Key of the form Bearer <api_key>.Example: Bearer sk_b41b647ffbfed27f616560

Query Parameters

include_orgs
boolean
default:"true"
Whether to include repositories from organizations the user belongs to.Default: trueExample: include_orgs=false

Response Fields

repos
array
Array of repository objects.
total
number
Total number of repositories returned.
curl 'https://agent.blackbox.ai/api/v1/git/repos' \
  -H 'Authorization: Bearer YOUR_API_KEY'
{
  "repos": [
    {
      "id": 123456789,
      "name": "my-app",
      "full_name": "octocat/my-app",
      "private": false,
      "html_url": "https://github.com/octocat/my-app",
      "description": "My awesome application",
      "fork": false,
      "default_branch": "main",
      "updated_at": "2026-05-20T10:00:00Z"
    },
    {
      "id": 987654321,
      "name": "private-api",
      "full_name": "my-org/private-api",
      "private": true,
      "html_url": "https://github.com/my-org/private-api",
      "description": "Internal API service",
      "fork": false,
      "default_branch": "main",
      "updated_at": "2026-05-19T08:30:00Z"
    }
  ],
  "total": 2
}

Error Codes

Status CodeErrorDescription
200SuccessRepository list returned
401UnauthorizedInvalid or missing API key
403ForbiddenPro subscription required or no GitHub token stored
500Internal Server ErrorFailed to fetch repositories from GitHub