Skip to main content

Overview

The Match Lifecycle API allows you to query match information including details, rosters, and current status. Game developers with read-write access can also manage match state.

Endpoints

List Matches

POST /api/v1/game/matches
Request Body (JSON):
FieldTypeRequiredDescription
gameIdstringYesFilter by game ID (must match your approved game)
statusstringNoFilter by status: IN_PROGRESS, COMPLETED, CANCELLED, etc.
limitnumberNoResults per page (default: 25, max: 100)
cursorstringNoPagination cursor from previous response
Example:
{
	"gameId": "call_of_duty_black_ops_7",
	"status": "IN_PROGRESS",
	"limit": 25
}
Response:
{
	"matches": [
		{
			"id": "match_123",
			"status": "IN_PROGRESS",
			"gameMode": "hardpoint",
			"bestOf": 3,
			"creatorTeam": { "teamId": "team_abc", "name": "Alpha Squad" },
			"acceptedTeam": { "teamId": "team_def", "name": "Beta Force" },
			"creatorTeamScore": 1,
			"acceptedTeamScore": 0,
			"scheduledAt": null,
			"startedAt": "2026-02-23T10:05:00.000Z",
			"completedAt": null,
			"createdAt": "2026-02-23T10:00:00.000Z"
		}
	],
	"count": 1,
	"pagination": { "cursor": "25", "hasMore": true },
	"timestamp": "2026-02-23T10:30:00.000Z"
}

Get Match Details

GET /api/v1/game/matches/{matchId}
Response:
{
	"id": "match_123",
	"gameId": "call_of_duty_black_ops_7",
	"status": "ACTIVE",
	"settings": {
		"teamSize": 4,
		"gameMode": "hardpoint",
		"map": "skidrow"
	},
	"teams": [
		{
			"teamId": "team_abc",
			"name": "Alpha Squad",
			"side": "home"
		},
		{
			"teamId": "team_def",
			"name": "Beta Force",
			"side": "away"
		}
	],
	"createdAt": "2026-02-23T10:00:00Z",
	"startedAt": "2026-02-23T10:05:00Z"
}

Get Match Rosters

GET /api/v1/game/matches/{matchId}/rosters
Response:
{
	"rosters": [
		{
			"teamId": "team_abc",
			"players": [
				{
					"userId": "user_1",
					"username": "PlayerOne",
					"role": "captain"
				},
				{
					"userId": "user_2",
					"username": "PlayerTwo",
					"role": "member"
				}
			]
		}
	]
}

Get Match Status

GET /api/v1/game/matches/{matchId}/status
Returns the current match status and score information. Response:
{
	"matchId": "match_123",
	"status": "ACTIVE",
	"scores": null,
	"winner": null,
	"completedAt": null
}

Update Match Status

PATCH /api/v1/game/matches/{matchId}/status
Update a match’s status. Only specific transitions are allowed. Request Body (JSON):
{
	"status": "IN_PROGRESS"
}
Allowed status transitions:
FromTo
READYIN_PROGRESS
IN_PROGRESSCOMPLETED, CANCELLED
ACCEPTEDCANCELLED
COMPLETED status is typically set automatically when sufficient map scores are confirmed. To complete a match, submit scores via the score submission endpoints instead of setting the status directly.
Response:
{
	"success": true,
	"matchId": "match_123",
	"previousStatus": "READY",
	"newStatus": "IN_PROGRESS",
	"timestamp": "2026-02-23T10:05:00.000Z"
}

Submit Player Stats

POST /api/v1/game/matches/{matchId}/player-stats
Submit or update player stats for a specific map. The map score must already exist for the given mapIndex. Request Body (JSON):
{
	"mapIndex": 0,
	"playerStats": {
		"userId1": { "kills": 25, "deaths": 15, "assists": 5 },
		"userId2": { "kills": 18, "deaths": 20, "assists": 8 }
	}
}
Response:
{
	"success": true,
	"mapIndex": 0,
	"action": "updated"
}

Permissions

EndpointRequired Permission
List matchesgame.lifecycle: read
Get match detailsgame.lifecycle: read
Get match rostersgame.lifecycle: read
Get match statusgame.lifecycle: read
Update match statusgame.lifecycle: read-write
Submit player statsgame.scores: write