---
title: "Upsert one of the API key owner's game ranks"
method: POST
path: "/user/game-ranks"
tags: ["My Account"]
---

# Upsert one of the API key owner's game ranks

`POST /user/game-ranks`

Creates or overwrites the API key owner's rank for a single (gameId, mode) slot, forcing source to "api". The user is always derived from the API key. Requires game.ranks:read-write and the writes feature (api_pro).

## Request body

- GameRankUpsertBody — Upsert the API key owner's rank for one (gameId, mode) slot.
  - `gameId` 'call_of_duty_black_ops_7' | 'valorant' | 'league_of_legends' | 'counter_strike_2', required — Game definition ID to set the rank for (a playable game).
  - `mode` string, required — Game mode / playlist the rank applies to (a valid playlist ID).
  - `sr` integer, required — Skill rating (integer, 0-100000).
  - `isTop250` boolean — Whether the player is in the Top 250 ladder.
  - `top250Rank` integer — Top 250 ladder position (1-250); only meaningful when isTop250.
  - `winstreak` integer — Current win streak count (0-99).

## Response `200`

The game rank was created or updated.

- GameRankUpsertResponse — Result of upserting a game rank.
  - `id` string, required — ID of the upserted game rank row.
  - `timestamp` string, required — ISO 8601 response timestamp.

## Other responses

- `400` — Bad request (invalid body, cursor, limit, or date).
- `401` — Missing or invalid API key.
- `403` — API key lacks the required permission.
- `429` — Rate limited.
- `500` — Internal server error.

## Changes

- **2026-06-10** `82f2480cdb83` — 2 info
  - api tag `My Account` added
  - api tag `Users` removed
- **2026-06-08** `4bed7522e6f8` — 1 breaking, 1 warning, 5 info
  - request property `gameId` was restricted to a list of enum values
  - the `mode` request property's maxLength was set to `64`
  - added the new `call_of_duty_black_ops_7` enum value to the request property `gameId`
  - added the new `counter_strike_2` enum value to the request property `gameId`
  - …3 more
- **2026-06-08** `33b01a4694a7` — 1 info
  - endpoint added
- **2026-06-04** `f22bd61fd595` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/teambattles/apis/teambattles-api/changes/user/game-ranks/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-service-production.skmtc.workers.dev/v1/apis/teambattles/teambattles-api/revisions/2ffe8fb53b7d/schema)
