My Account
Upsert One Of The API Key Owner's Game Ranks
Create or overwrite the API key owner’s rank for a single game and mode.
POST
Permission Required
This endpoint requiresgame.ranks:read-write on your API key. The user is always the API key owner, derived from the key itself - it is never accepted as a body field, so a key can only write its own ranks. A free (api_free) key receives 403 error_api_feature_required; this requires an api_pro+ plan.
Access / Membership Rules
This is a self-write route. The owner is always derived fromprincipal.user._id, so there is no membership or participant gating - the key writes exactly the owner’s own rank. The upsert targets a single (gameId, mode) slot, creating it or overwriting it in place, and forces the rank’s source to "api". The gameId and mode are validated against the playable-game and playlist catalog; junk values are rejected with 400 INVALID_INPUT (re-enforced in the data layer as INVALID_GAME_RANK).
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
gameId | string | Yes | Game definition ID to set the rank for (a playable game). |
mode | string | Yes | Game mode / playlist the rank applies to (a valid playlist ID). |
sr | number | Yes | Skill rating (integer, 0-100000). |
isTop250 | boolean | No | Whether the player is in the Top 250 ladder. |
top250Rank | number | No | Top 250 ladder position (1-250); only meaningful when isTop250. |
winstreak | number | No | Current win streak count (0-99). |
What’s Returned
Returns an object with theid of the upserted game rank row and a timestamp. Mintlify renders the full schema from the spec below.
Authorizations
Send your API key as: Authorization: Bearer tb_
Body
application/json
Upsert the API key owner's rank for one (gameId, mode) slot.
Game definition ID to set the rank for (a playable game).
Available options:
call_of_duty_black_ops_7, valorant, league_of_legends, counter_strike_2 Game mode / playlist the rank applies to (a valid playlist ID).
Required string length:
1 - 64Skill rating (integer, 0-100000).
Required range:
0 <= x <= 100000Whether the player is in the Top 250 ladder.
Top 250 ladder position (1-250); only meaningful when isTop250.
Required range:
1 <= x <= 250Current win streak count (0-99).
Required range:
0 <= x <= 99