Skip to main content
GET
/
api
/
v1
/
git
/
status
curl 'https://agent.blackbox.ai/api/v1/git/status' \
  -H 'Authorization: Bearer YOUR_API_KEY'
{
  "connected": true,
  "login": "octocat",
  "name": "The Octocat",
  "email": "octocat@github.com",
  "avatarUrl": "https://avatars.githubusercontent.com/u/583231",
  "scopes": "repo,user",
  "publicRepos": 8,
  "privateRepos": 3,
  "tokenValid": true
}
This endpoint validates the stored GitHub token by calling the GitHub API and returns the connected account’s profile information. Use this to confirm your GitHub integration is active before creating tasks that work with repositories.
This endpoint requires a Pro subscription. Ensure your BLACKBOX account is on the Pro plan before calling GitHub integration endpoints.

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

Response Fields

Connected

connected
boolean
true when a valid GitHub token is stored.
login
string
GitHub username of the connected account.
name
string | null
Display name of the GitHub user.
email
string | null
Primary email address of the GitHub user (if public).
avatarUrl
string
URL of the GitHub user’s avatar image.
scopes
string
Comma-separated list of OAuth scopes granted by the token (e.g. "repo,user").
publicRepos
number
Number of public repositories owned by the user.
privateRepos
number
Number of private repositories owned by the user.
tokenValid
boolean
Whether the stored token successfully authenticated with GitHub.

Not Connected

connected
boolean
false when no token is stored or the token is invalid.
message
string
Human-readable explanation (e.g. "No GitHub token found").
curl 'https://agent.blackbox.ai/api/v1/git/status' \
  -H 'Authorization: Bearer YOUR_API_KEY'
{
  "connected": true,
  "login": "octocat",
  "name": "The Octocat",
  "email": "octocat@github.com",
  "avatarUrl": "https://avatars.githubusercontent.com/u/583231",
  "scopes": "repo,user",
  "publicRepos": 8,
  "privateRepos": 3,
  "tokenValid": true
}

Error Codes

Status CodeErrorDescription
200SuccessStatus returned (connected or not)
401UnauthorizedInvalid or missing API key
403ForbiddenPro subscription required
500Internal Server ErrorFailed to validate token