---
title: "Submit or update player stats for a map"
method: POST
path: "/game/matches/{matchId}/player-stats"
tags: ["Game: Rosters & Stats"]
---

# Submit or update player stats for a map

`POST /game/matches/{matchId}/player-stats`

## Request

- Base URL: `https://teambattles.gg/api/v1`
- URL: `https://teambattles.gg/api/v1/game/matches/{matchId}/player-stats`
- Auth: HTTP bearer

Sets per-player stats on an existing map score for the given mapIndex. Requires the game.scores:write permission. Supports an optional `Idempotency-Key` request header: a retry with the same key and body replays the original response, while the same key with a different body returns 409 error_idempotency_key_conflict. The idempotency identity is scoped per match.

## Path parameters

- `matchId` string, required: Match ID.

## Request body

- GamePlayerStatsBody: Request body for submitting or updating player stats for an existing map score.
  - `mapIndex` integer, required: Zero-based index of the map whose stats are being updated.
  - `playerStats` object, required: Per-player stats keyed by user ID. The map score must already exist.

## Response `200`

The player stats were updated.

- GamePlayerStatsResponse: Result of a successful player-stats update.
  - `success` true, required
  - `mapIndex` integer, required: Index of the map whose stats were updated.
  - `action` string, required: Operation performed, always "updated" on success.

## Other responses

- `400`: Bad request (invalid body, cursor, limit, or date).
- `401`: Missing or invalid API key.
- `403`: API key lacks the required permission.
- `404`: Resource not found.
- `409`: Conflict.

## Changes

- **2026-06-24** `fd9c94372431`: 1 info
  - added the non-success response with the status `409`
- **2026-06-10** `82f2480cdb83`: 2 info
  - api tag `Game: Rosters & Stats` added
  - api tag `Game` removed
- **2026-06-04** `f22bd61fd595`: 3 info
  - api tag `Game` added
  - api tag `Game: Rosters & Stats` removed
  - removed the non-success response with the status `409`

[Operation history](https://skmtc.dev/teambattles/apis/teambattles-api/changes/game/matches/:matchId/player-stats/post.md)

---

[API](https://skmtc.dev/teambattles/apis/teambattles-api.md) - [All operations](https://skmtc.dev/teambattles/apis/teambattles-api/llms.txt) - [OpenAPI document](https://skmtc.dev/teambattles/apis/teambattles-api/revisions/75b07daef7dc?raw)
