GitHub Integration
Connect Github
Validate and store a GitHub personal access token. Enables repository access for agent tasks. Replaces any previously stored token.
POST
This endpoint validates a GitHub personal access token against the GitHub API and stores it for future agent tasks. If a token is already stored, it is replaced.
This endpoint requires a Pro subscription. Required GitHub token scopes:
repo (for private repos) and user (for profile info).Authentication
To use this API, you need a BLACKBOX API Key. Follow these steps to get your API key:- Go to app.blackbox.ai/agent-api and click Get an API Key (requires a Pro subscription)
- Once provisioning completes, you will be redirected to your Dashboard
- From the Dashboard, create an API key to use with all Agent API requests
sk-xxxxxxxxxxxxxxxxxxxxxx
Headers
API Key of the form
Bearer <api_key>.Example: Bearer sk_b41b647ffbfed27f616560Must be
application/json.Request Body
A GitHub personal access token (classic or fine-grained).Example:
"ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"Response Fields
true when the token was validated and stored successfully.GitHub username confirmed by the token.
Error Codes
| Status Code | Error | Description |
|---|---|---|
| 200 | Success | Token validated and stored |
| 400 | Bad Request | Missing githubToken or token rejected by GitHub |
| 401 | Unauthorized | Invalid or missing API key |
| 403 | Forbidden | Pro subscription required |
| 500 | Internal Server Error | Failed to validate or store token |