---
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.

---

[API](https://skmtc.net/teambattles/apis/teambattles-api.md) · [All operations](https://skmtc.net/teambattles/apis/teambattles-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/teambattles/teambattles-api/revisions/2ffe8fb53b7d/schema)
