Base URL
All API endpoints are served from:Authentication
All API requests require authentication using an API key. You can generate API keys from Settings > Developer in the TeamBattles app. Include your API key in theAuthorization header:
Permissions
API keys have granular permissions that control what they can access:| Permission | Description |
|---|---|
matches.user_matches | Access to your match data |
matches.team_matches | Access to matches for teams you’re a member of |
matches.org_matches | Access to matches for organizations you’re a member of |
connections.twitch | Access to Twitch integration (requires Twitch account connection) |
connections.discord | Access to Discord integration |
connections.github | Access to GitHub integration |
connections.battlenet | Access to Battle.net integration |
403 error if the required permission is not enabled.
Rate Limiting
API requests are rate limited to ensure fair usage. Current limits:- 100 requests per minute per API key
429 Too Many Requests response.
Error Responses
All error responses follow a consistent format:Common Error Codes
| Code | HTTP Status | Description |
|---|---|---|
error_api_key_required | 401 | No API key provided in Authorization header |
error_api_key_invalid | 401 | API key is invalid or revoked |
error_api_key_permission_denied | 403 | API key lacks required permission |
error_team_membership_required | 403 | User is not an active member of the team |
error_org_membership_required | 403 | User is not an active member of the organization |
error_team_not_found | 404 | Team ID or slug not found |
error_org_not_found | 404 | Organization ID or slug not found |
error_invalid_request | 400 | Request body or parameters are invalid |
error_invalid_cursor | 400 | Pagination cursor is invalid or expired |
error_invalid_limit | 400 | Limit must be between 1 and 100 |
error_invalid_date_format | 400 | Date parameter is not valid ISO 8601 |
error_internal | 500 | Internal server error |
Available Endpoints
User Matches
Retrieve matches where you’re on the roster
Team Matches
Retrieve matches for a specific team
Organization Matches
Retrieve matches for all teams in an organization
Twitch Badges
Access Twitch badge data for chat overlays