Base URL
All API endpoints are available at:Authentication
All API requests require authentication using a Bearer token. Include your API key in theAuthorization header:
Request Format
- All request bodies should be JSON with
Content-Type: application/json - Path parameters use the format
/{org}/{repo}/...whereorgis your organization slug - Query parameters are used for filtering, pagination, and optional settings
Response Format
Most endpoints return JSON responses. However, some endpoints support content negotiation via theAccept header to return alternative formats:
| Endpoint | Default | Alternative |
|---|---|---|
GET /{org}/{repo}/content | application/json (base64 encoded) | application/octet-stream (raw bytes) |
GET /{org}/{repo}/diff | application/json (structured diff) | text/plain (raw unified diff) |
Pagination
List endpoints support cursor-based pagination:| Parameter | Type | Description |
|---|---|---|
limit | number | Maximum items to return (default: 50, max: 100) |
cursor | string | Cursor from previous response for next page |
Error Handling
Errors return a consistent JSON structure with an appropriate HTTP status code:Error Codes
| Code | HTTP Status | Description |
|---|---|---|
UNAUTHORIZED | 401 | Invalid or missing API key |
FORBIDDEN | 403 | Valid key but insufficient permissions |
REPO_NOT_FOUND | 404 | Repository does not exist |
BRANCH_NOT_FOUND | 404 | Branch does not exist |
COMMIT_NOT_FOUND | 404 | Commit SHA not found |
FILE_NOT_FOUND | 404 | File path not found |
REPO_EXISTS | 409 | Repository already exists |
BRANCH_EXISTS | 409 | Branch already exists |
INVALID_REQUEST | 400 | Malformed request body or parameters |
QUOTA_EXCEEDED | 413 | Storage quota exceeded |
Scopes
API keys have scoped permissions that control access:| Scope | Description |
|---|---|
git:read | Read repository content, branches, commits |
git:write | Push commits, create/delete branches |
repo:read | List and view repository metadata |
repo:create | Create new repositories |
repo:delete | Delete repositories |
admin | Full access including API key management |
admin scope grants all permissions. The git:write scope includes git:read.
