Get User Matches
Returns matches where the authenticated user is on the roster. Only includes matches where the user was specifically added to the match roster (not just team membership). Supports filtering by status, game, date ranges, and opponent team. Results are paginated.
Documentation Index
Fetch the complete documentation index at: https://teambattles.gg/docs/llms.txt
Use this file to discover all available pages before exploring further.
Permission Required
This endpoint requires thematches.user_matches permission on your API key.
What’s Returned
This endpoint returns matches where you are on the roster - meaning you were specifically added as a player for that match. Being a member of a team is not enough; you must be on the actual match roster.Filtering Options
Status Filtering
You can filter matches by their status using two mutually exclusive parameters:- includeStatuses: Only return matches with these statuses (takes precedence)
- excludeStatuses: Return all matches except those with these statuses
Date Filtering
Filter by scheduled or creation dates using ISO 8601 format:- scheduledAfter / scheduledBefore: Filter by scheduled match time
- createdAfter / createdBefore: Filter by when the match was created
Other Filters
- gameId: Filter by a specific game
- opponentId: Filter by opponent team (accepts team ID or slug)
Pagination
Results are paginated with a default of 25 matches per page (maximum 100).Request Fields
| Parameter | Type | Description |
|---|---|---|
numItems | number | Number of items per page, 1-100, default 25 |
cursor | string | Opaque cursor string from a prior response (optional) |
Response Fields
| Field | Type | Description |
|---|---|---|
page | array | Array of matches for this page |
isDone | boolean | true when there are no more pages to fetch |
continueCursor | string | Pass back as cursor on the next request |
Errors
| Code | HTTP Status | When |
|---|---|---|
error_api_key_required | 401 | Missing Authorization header |
error_api_key_invalid | 401 | API key is unknown, revoked, or expired |
error_api_key_permission_denied | 403 | The key does not hold matches.user_matches: read |
error_invalid_num_items | 400 | numItems is outside the allowed 1-100 range |
error_invalid_limit | 400 | Reserved for limit-style page sizes (registry-level error code) |
error_invalid_cursor | 400 | cursor is malformed or no longer valid |
error_invalid_date_format | 400 | One of the scheduled*/created* filters is not ISO 8601 |
error_team_not_found | 404 | opponentId could not be resolved to a team |
error_internal | 500 | Unhandled server error - retry or contact support |
Match Statuses
| Status | Description |
|---|---|
PENDING | Match is waiting for an opponent to accept |
ACCEPTED | Match has been accepted, waiting for players to be ready |
READY | All players are ready, match can be started |
IN_PROGRESS | Match is currently being played |
COMPLETED | Match has finished normally |
CANCELLED | Match was cancelled before completion |
DISPUTED | Match result is being disputed |
FORFEITED | One team forfeited the match |
Common Use Cases
Get Active Matches Only
Filter out pending and completed matches to show only active ones:Get Matches in a Date Range
Get Matches Against a Specific Opponent
Paginate Through All Matches
Authorizations
API key authentication. Generate an API key from Settings > Developer in the TeamBattles app. Format: tb_xxxxxxxx...
Body
Optional filters and pagination options
Only include matches with these statuses. Takes precedence over excludeStatuses.
Current status of a match
PENDING, ACCEPTED, READY, IN_PROGRESS, COMPLETED, CANCELLED, DISPUTED, FORFEITED Exclude matches with these statuses. Ignored if includeStatuses is provided.
Current status of a match
PENDING, ACCEPTED, READY, IN_PROGRESS, COMPLETED, CANCELLED, DISPUTED, FORFEITED Filter by game ID
Filter to matches scheduled after this date (ISO 8601)
Filter to matches scheduled before this date (ISO 8601)
Filter to matches created after this date (ISO 8601)
Filter to matches created before this date (ISO 8601)
Filter by opponent team (ID or slug)
Maximum number of matches to return (1-100)
1 <= x <= 100Pagination cursor from previous response (opaque Convex cursor string)