Skip to main content
DELETE
/
api
/
v1
/
git
/
clean
curl -X DELETE 'https://agent.blackbox.ai/api/v1/git/clean' \
  -H 'Authorization: Bearer YOUR_API_KEY'
{
  "success": true,
  "message": "GitHub access tokens purged successfully"
}
This endpoint permanently removes all GitHub tokens linked to your BLACKBOX account. After calling this endpoint, agent tasks that require GitHub access will fail until you reconnect via POST /api/v1/git/config.
This action is irreversible. All stored GitHub tokens will be deleted. You will need to provide a new GitHub personal access token to re-enable repository access.
This endpoint requires a Pro subscription.

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

success
boolean
true when all tokens were purged successfully.
message
string
Human-readable confirmation message.
curl -X DELETE 'https://agent.blackbox.ai/api/v1/git/clean' \
  -H 'Authorization: Bearer YOUR_API_KEY'
{
  "success": true,
  "message": "GitHub access tokens purged successfully"
}

Error Codes

Status CodeErrorDescription
200SuccessAll GitHub tokens purged
401UnauthorizedInvalid or missing API key
403ForbiddenPro subscription required
500Internal Server ErrorFailed to purge tokens