# Inhouse API Page: https://inhouseranks.com/docs Hosted skill ratings for multiplayer games. You send match results, and Inhouse keeps Elo or Glicko-2 ratings, win/loss records and leaderboards. It can also matchmake your players. The API is server-to-server. Call it from your game server with a project API key, never from a game client. - **Base URL:** `https://api.inhouseranks.com` - **Auth:** send your key in the `x-api-key` header. A key looks like `inhouse---`. - **Content type:** `application/json` on every POST. Send `{}` rather than an empty body. - **Get a key:** the Inhouse Build portal → Credentials. A key belongs to one project. Treat it as a secret. ## Quickstart Two calls take you from an API key to a ranked leaderboard. There is nothing to set up first: every project has a default pool, and a player is created the first time a recorded match names them. ### 1. Record a match ```bash curl -X POST https://api.inhouseranks.com/v1/match/record \ -H "x-api-key: $INHOUSE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "matchExternalId": "m_1042", "ranked": true, "name": "Grand Final", "matchResult": { "teams": [ { "place": 1, "constituents": [{ "mmrEntityExternalId": "alice" }] }, { "place": 2, "constituents": [{ "mmrEntityExternalId": "bob" }] } ] } }' ``` `place` 1 is the winner. `matchExternalId` and each `mmrEntityExternalId` are your own ids. **`"ranked": true` is what makes the match move ratings**: it defaults to `false`. The reply is the recorded match and each player's rating change: ```jsonc { "match": { "_id": "6b01eb7991a8d0c2e72af670", "status": "recorded", "ranked": true, "externalId": "m_1042", "recordedAt": "2026-11-21T19:05:29.463796Z" // ... }, "matchPlayers": [ { "mmrEntityId": "6b01eb7991a8d0c2e72af66e", "mmrChanges": [{ "before": 1500, "after": 1516 /* ... */ }], "outcome": "win" // ... }, { "mmrEntityId": "6b01eb7991a8d0c2e72af66f", "mmrChanges": [{ "before": 1500, "after": 1484 /* ... */ }], "outcome": "lose" // ... } ] } ``` ### 2. Read the leaderboard ```bash curl https://api.inhouseranks.com/v1/pool/leaderboard \ -H "x-api-key: $INHOUSE_API_KEY" ``` ```jsonc { "poolId": "6b01eb7991a8d0c2e72af66b", "leaderboard": [ { "rank": 1, "mmrEntityExternalId": "alice", "mmrEntity": { "name": "alice", "stats": [ { "mmr": { "value": 1516 /* ... */ }, "wins": 1, "losses": 0 // ... } ] // ... } // ... }, { "rank": 2, "mmrEntityExternalId": "bob", "mmrEntity": { "name": "bob", "stats": [ { "mmr": { "value": 1484 /* ... */ }, "wins": 0, "losses": 1 // ... } ] // ... } // ... } ], "page": 1, "pageSize": 25, "totalCount": 2, "hasMore": false } ``` That's a working integration. [Record matches](https://inhouseranks.com/docs/guides/matches) covers team games, draws, scoring as results come in, and safe retries. ## Where next | To | Read | |---|---| | Learn the five objects the API is built on | [Core concepts](https://inhouseranks.com/docs/concepts) | | Record team games, draws and live scores | [Record matches](https://inhouseranks.com/docs/guides/matches) | | Show a top-players board or a player's rating | [Leaderboards and ratings](https://inhouseranks.com/docs/guides/leaderboards) | | Run separate ladders per mode, queue or region | [Pools and players](https://inhouseranks.com/docs/guides/pools) | | Let Inhouse build the lobbies | [Matchmaking](https://inhouseranks.com/docs/guides/matchmaking) and [Webhooks](https://inhouseranks.com/docs/guides/webhooks) | | Name ratings "Gold", hide new ratings, run placement matches | [Rank bands](https://inhouseranks.com/docs/guides/rank-bands), [Hidden ratings](https://inhouseranks.com/docs/guides/hidden-ratings), [Placement matches](https://inhouseranks.com/docs/guides/placement-matches) | | Bring over players and history from another system | [Import and migrate](https://inhouseranks.com/docs/guides/import-and-migrate) | | Know the quotas before you ship | [Limits and billing](https://inhouseranks.com/docs/guides/limits) | | Look up an endpoint, a field or an error code | [API reference](https://inhouseranks.com/docs/api) | --- # Core concepts Page: https://inhouseranks.com/docs/concepts The whole API is built on five objects. | Object | What it is | |---|---| | **Organization** | Your account. It owns your projects, API keys and teammates. | | **Project** | An environment. Every organization has **exactly two**, `test` and `live`, created with it. An API key belongs to one of them, and its prefix says which. | | **Pool** | An independent set of ratings: one per game mode, queue or region. Ratings never cross pools. | | **Player** | One person's rating and record inside one pool, called a **rated user**. Someone who plays in three pools has three, all keyed by the `mmrEntityExternalId` you give them. | | **Match** | A result: teams, their places, and who was on them. Recording a ranked match moves the rating of everyone in it. | [Matchmaking](https://inhouseranks.com/docs/guides/matchmaking) adds two more: | Object | What it is | |---|---| | **Matchmaking rule** | A queue a pool offers: the lobby shape it builds, and how fast it trades match quality for wait time. | | **Party** | One or more players queued together under a rule. A solo player is a party of one. Every lobby the matchmaker forms becomes a pending match. | ## Names in requests and responses A pool and a player have more than one name in the API. They are the same things. | In these docs | In requests and responses | |---|---| | Pool | `poolId` is its id, in what you send and in what comes back. Inhouse stores a pool as a group, so the pool object in a reply is `group`, its id is also sent as `groupId`, and the settings you send for it are `groupConfig`. | | Player, rated user | `mmrEntity`: the ids are `mmrEntityId` and `mmrEntityExternalId`, and the object comes back as `mmrEntity` or `mmrEntities`. The paths say `user`, as in `/v1/user/create`, and the two ids have user names too: `userId` and `userExternalId` (see [user names](https://inhouseranks.com/docs/api#a-players-ids-also-have-user-names)). | | Rating | `mmr` | More on the two names of a pool: [A pool is also called a group](https://inhouseranks.com/docs/api#a-pool-is-also-called-a-group). ## Your ids and ours Everything has an id Inhouse gives it. A match, a player and a queue party can also have an id of your own. A field's name says which one it takes. | | Inhouse's id | Your own id | You set yours | |---|---|---|---| | A pool | `poolId` | none | | | A match | `matchId` | `matchExternalId` | When you record, score or create the match. | | A player | `mmrEntityId` | `mmrEntityExternalId` | Whenever you first name them: in a match, a score or a queue party. | | A queue party | `partyId` | `partyExternalId` | When the party joins the queue. | For matches, players and parties you never need to store an Inhouse id. Give each your own id and use it everywhere. On the object itself, Inhouse's id is `_id` and yours is `externalId`. **A pool is the exception: it has only Inhouse's id.** Creating a pool returns it as `group._id`. Keep it, and send it as `poolId` wherever a call names that pool. Send the **same `mmrEntityExternalId` for the same person in every pool**. That is how Inhouse knows them across your pools, and how billing counts each person once a month. The field rules are in [Identifiers](https://inhouseranks.com/docs/api#identifiers). ## The default pool Every project has a pool from the moment it exists, and **any call that takes a pool uses it when you leave the pool out**. A game with one ladder never creates, names or references a pool. In `GET /v1/pools` it's the pool whose `externalId` is `_default_`. The one exception is `/v1/user/migrate`, which needs a pool named explicitly. ## Test and live A key for the `test` project only ever touches test data. Nothing you do with it affects live ratings. | | Test keys | Live keys | |---|---|---| | Plan allowances | Never counted, never refused with `402` | Counted | | Rate limit | Per IP, plus a much tighter limit per test project | Per project: 100 requests a second, unless your organization has another rate | Build and test against the test project, then serve players from the live one. The numbers are in [Limits and billing](https://inhouseranks.com/docs/guides/limits). ## Rules to rely on 1. **Pools rate individuals.** Every pool created through the API is solo-mode, and a team-mode pool is refused with `400 project-pools-must-be-solo`. A "team" in a match is just the players who shared a place. 2. **Ratings are per pool.** There is no global rating, and no endpoint adds up across pools. To show a player's ratings everywhere, ask each pool. 3. **Your project sees only its own pools.** A key belongs to its whole project, not to a person: every key of a project can manage every pool created in that project, by any of its keys or in the portal. A project can have 50 pools. Another project's pool, or a consumer app's, is `403 unauthorized-action`. The exception is `GET /v1/pools`, which lists your whole organization's pools, test and live. 4. **Matches snapshot their config.** A match is rated with the pool's rating settings as they were when the match was created. That's when it's recorded, for a one-call `/match/record`, or when `/match/score`, `/match/create` or the matchmaker opened it. Changing a pool's settings later never rewrites history. 5. **Two projects per organization, forever.** Don't build logic that creates or archives projects. 6. **Every player carries your id for them.** Your `mmrEntityExternalId` is stored as the rated user's `externalId`. It's required: `/v1/user/create` without one is `400 user-id-required`, and it can be changed in the portal but never removed. The one call that creates players without it is [`/v1/match/import`](https://inhouseranks.com/docs/guides/import-and-migrate#import-match-history). --- # Record matches Page: https://inhouseranks.com/docs/guides/matches Recording a match is what moves ratings. One call writes the match and rates it. ## Record a match ```bash curl -X POST https://api.inhouseranks.com/v1/match/record \ -H "x-api-key: $INHOUSE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "matchExternalId": "m_1042", "ranked": true, "name": "Grand Final", "matchResult": { "teams": [ { "place": 1, "constituents": [{ "mmrEntityExternalId": "alice" }] }, { "place": 2, "constituents": [{ "mmrEntityExternalId": "bob" }] } ] } }' ``` - **A team is a placement bucket.** Everyone who shared a result goes in one team. Teams need no id or name: send them in a list and the server labels them. - **`place` 1 is the winner.** Lower is better. - **The ids are yours.** `matchExternalId` names the match and `mmrEntityExternalId` names each player. An `mmrEntityExternalId` the pool hasn't seen gets a player created for it. - **No pool means the default pool.** Add `"poolId": ""` to record in another one: the `_id` it was created with. The reply is `{ match, matchPlayers }` with the match `recorded`. Each row of `matchPlayers` carries that player's rating before and after. The full reply is in the reference: [Record a match](https://inhouseranks.com/docs/api/matches#record-a-match). ### Send ranked true **`ranked` defaults to `false`.** An unranked match is an exhibition. It goes into history and adds to each player's `matchCount`, but it changes no rating, wins or losses, and its players stay off `/leaderboard`. Send `"ranked": true` for every match that should count. ### Match shapes | Game | Send | |---|---| | 1v1 | Two teams with one player each, places 1 and 2. | | Free-for-all | One team per player, places 1 to N. | | Team game | One team per side, with every member in its `constituents`. One place per side. | | Draw | The same `place` on the tied teams. | A 2v2: ```bash curl -X POST https://api.inhouseranks.com/v1/match/record \ -H "x-api-key: $INHOUSE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "matchExternalId": "m_1044", "ranked": true, "matchResult": { "teams": [ { "place": 1, "constituents": [ { "mmrEntityExternalId": "alice" }, { "mmrEntityExternalId": "carol" } ] }, { "place": 2, "constituents": [ { "mmrEntityExternalId": "bob" }, { "mmrEntityExternalId": "dave" } ] } ] } }' ``` **Teammates share the result, not the size of the change.** A side's chance of winning comes from its players' average rating, so everyone on a side is expected to win or lose together. How far each player then moves is their own: their K-factor on Elo (from their own rating or match count), or their own rating deviation on Glicko-2. A new player moves further than the veterans they win with. Teammates whose numbers match move the same. ## Retry safely **Your `matchExternalId` names the match**, and `/match/record` looks it up first: | Your `matchExternalId` names | What happens | |---|---| | No match yet, or you sent none | The match is created from `matchResult`, then rated. | | A match that isn't rated yet | It's rated. It was opened by [`/match/score`](#score-players-as-results-come-in) or made by the [matchmaker](https://inhouseranks.com/docs/guides/matchmaking). | | A match already recorded | `409 match-already-recorded`. Nothing changes. | A recorded match is final, so nothing is ever rated twice. That makes retries simple: - **Always send a `matchExternalId`.** Without one, a retry writes a second match. - **After a timeout, send the same call again.** `409 match-already-recorded` means the first one went through. - **After `409 rating-update-conflict` or a `5xx`, retry with only the `matchExternalId`:** `{ "matchExternalId": "m_1042" }`. A new match is written first and rated second, so the match may exist unrated. Sending its `matchResult` again answers `400 match-not-pending`. A new match needs a `matchResult`. A `matchExternalId` that names no match, sent without one, is `404 match-not-found`. A result whose teams have neither places nor points is `400 match-has-unplaced-teams`, and nothing is written. ## Score players as results come in When you don't know the outcome up front (a race, a tournament round, a score-attack session), don't wait. Post each player's score when it lands, then record the match once everyone is in. **There is no setup call**: the first `/score` for an unseen `matchExternalId` opens the match as `pending`. ```bash curl -X POST https://api.inhouseranks.com/v1/match/score \ -H "x-api-key: $INHOUSE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "matchExternalId": "m_1043", "ranked": true, "scores": [ { "mmrEntityExternalId": "alice", "pointsScored": 12, "caption": "clean run" } ] }' ``` Repeat as results arrive. Players you don't mention keep what they have: ```bash curl -X POST https://api.inhouseranks.com/v1/match/score \ -H "x-api-key: $INHOUSE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "matchExternalId": "m_1043", "scores": [{ "mmrEntityExternalId": "bob", "pointsScored": 7 }] }' ``` Then record it. Places are worked out from the scores: ```bash curl -X POST https://api.inhouseranks.com/v1/match/record \ -H "x-api-key: $INHOUSE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "matchExternalId": "m_1043" }' ``` How scoring behaves: - **`/score` never rates and never sets a place.** It records `pointsScored` and `caption` only. - **Only the players named in `scores` are touched.** Everyone else keeps their score and caption. Scores are per team, so scoring one player sets their whole team's score and caption. - **A player who wasn't in the match is added**, as a team of their own. - **The pool's `winCondition` ranks the teams** when the match is recorded. `mostPoints`, the default on every pool, puts the highest score first. `leastPoints` (golf, say) puts the lowest first. - **Equal scores share a place**: a draw. A player with no score, or a score of 0, comes in tied last, behind every scored player. The first `/score` can also carry the pool, `ranked`, `name` and `description` of the match it opens. See [Score a match](https://inhouseranks.com/docs/api/matches#score-a-match). To use `leastPoints`, set it when you create the pool, or later with `/v1/pool/update`. It applies to matches opened after that: ```bash curl -X POST https://api.inhouseranks.com/v1/pool/update \ -H "x-api-key: $INHOUSE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "poolId": "6b01eb7991a8d0c2e72af67e", "gameConfig": { "teams": {}, "positions": {}, "winCondition": "leastPoints" } }' ``` ## Record a match that already exists `/match/record` also takes `scores`: who placed where, set on the match just before it's rated. For a match the matchmaker made, or one `/match/score` opened, that is the whole result in one call: ```bash curl -X POST https://api.inhouseranks.com/v1/match/record \ -H "x-api-key: $INHOUSE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "matchId": "6b01eb7991a8d0c2e72af694", "scores": [ { "teamId": "", "place": 1 }, { "teamId": "", "place": 2 } ] }' ``` - **An entry names one team or one player.** A team by `teamId` (the `match.found` event gives it), a player by `mmrEntityExternalId`. Results are per team, so a player's entry sets their team's result. In a team game, one entry per team is enough. - **Give every team a `place`**, the same one for tied teams. Or give `pointsScored` and let the pool's `winCondition` place them. - **Entries must name someone already in the match.** - **A refused entry writes no scores and rates nothing.** Fix the body and send it again. The fields and refusals are under [Scores](https://inhouseranks.com/docs/api/objects#scores). ## Rename a match or change its result `/match/update` patches a match. Every field is optional and **only the fields you send are written**: ```bash curl -X POST https://api.inhouseranks.com/v1/match/update \ -H "x-api-key: $INHOUSE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "matchExternalId": "m_1045", "name": "Grand Final (replay)" }' ``` | Field | Can change | How | |---|---|---| | `name`, `description` | In any status, even after the match is recorded | Send a value to overwrite, `null` or `""` to clear, or leave the field out to keep it. | | `matchResult`, `ranked` | Only while the match is `pending` | Afterwards it's `400 match-not-pending`. `matchResult` replaces the whole result. | `name` and `description` are labels and behave the same everywhere they appear, including `/match/record`, `/match/create` and `/match/score`. Leaving one out never clears the other. A `name` is at most 80 characters and a `description` at most 300. To add to an unfinished result one player at a time, use `/match/score` instead. ## Other match calls | To | Call | |---|---| | Write a match now and rate it later | [`POST /v1/match/create`](https://inhouseranks.com/docs/api/matches#create-a-pending-match). Optional: `/match/score` opens a match by itself. | | Delete a match | [`POST /v1/match/delete`](https://inhouseranks.com/docs/api/matches#delete-a-match). Pending matches only: a recorded match can't be deleted. | | Read one match with its players | [`GET /v1/match/get`](https://inhouseranks.com/docs/api/matches#get-a-match) | | Page through a pool's history | [`GET /v1/match/list`](https://inhouseranks.com/docs/api/matches#list-matches). Pages start at **0** here. | | Record many old matches at once | [`POST /v1/match/import`](https://inhouseranks.com/docs/guides/import-and-migrate#import-match-history) | --- # Leaderboards and ratings Page: https://inhouseranks.com/docs/guides/leaderboards Three reads cover every screen that shows a rating. | You want | Call | |---|---| | A "top players" board with ranks | [`GET /v1/pool/leaderboard`](#top-100-with-ranks) | | Everyone in the pool, page by page | [`GET /v1/pool/rankings`](#everyone-in-the-pool) | | The ratings of players you name | [`GET /v1/user/ratings`](#specific-players) | All three read the default pool as written here. For another pool, put its id in the path (`/v1/pool//leaderboard`) or pass `poolId` as a query parameter. Ratings never cross pools. ## Top 100 with ranks The pool's best 100 players, paged within those 100. Every row carries its absolute rank. ```bash curl https://api.inhouseranks.com/v1/pool/leaderboard \ -H "x-api-key: $INHOUSE_API_KEY" ``` ```jsonc { "poolId": "6b01eb7991a8d0c2e72af66b", "leaderboard": [ { "rank": 1, "mmrEntityExternalId": "carol", "mmrEntity": { "name": "Carol C.", "stats": [ { "mmr": { "value": 1600 /* ... */ }, "wins": 1, "losses": 0, "matchCount": 1 // ... } ], "externalId": "carol" // ... } // ... }, { "rank": 2, "mmrEntityExternalId": "alice", "mmrEntity": { "name": "alice", "stats": [ { "mmr": { "value": 1545.086633573829 /* ... */ }, "wins": 3, "losses": 0, "matchCount": 3 // ... } ], "externalId": "alice" // ... } // ... } // ... 2 more ], "page": 1, "pageSize": 25, "totalCount": 4, "hasMore": false } ``` - **Nobody below rank 100 is ever returned.** `page` starts at 1 and `pageSize` is 1–100 (default 25). Page 2 at the default size starts at `rank` 26. - **Only players with a ranked result appear**: at least one win, loss or tie. Players who were created but never played, whose matches are all still pending, or who have only played unranked matches are left off. Archived players never appear. - **`rank` is the position on this board**: 1, 2, 3. Tied players don't share a rank. Equal ratings rank whoever played first higher. - **The board is read live.** A rating that changes between two page requests can move a player across a page boundary. For one consistent board, fetch it in a single call with `pageSize=100`. `rank` is the player's place on the board. The band their rating falls in ("Gold") is a [rank band](https://inhouseranks.com/docs/guides/rank-bands). ## Everyone in the pool `/rankings` lists every active player in the pool, best first, 25 per page. Unlike the top-100 board it includes players who have never played a ranked match, and it has no ranks or totals. ```bash curl "https://api.inhouseranks.com/v1/pool/rankings?page=1" \ -H "x-api-key: $INHOUSE_API_KEY" ``` ```jsonc { "mmrEntities": [ { "mmrEntity": { "name": "Carol C.", "stats": [ { "mmr": { "value": 1600 /* ... */ }, "wins": 1, "losses": 0, "matchCount": 1 // ... } ], "externalId": "carol" // ... } // ... } // ... 3 more ], "page": 1 } ``` - **Each element wraps the player.** It is `{ "mmrEntity": {...}, "groupMembers": [] }`, so a rating is `mmrEntities[i].mmrEntity.stats[0].mmr.value`. `groupMembers` is always empty. - **There is no `totalCount`.** Pages start at 1, and a full page of 25 means "ask for the next one". ## Specific players For a scoreboard, a lobby or a profile screen, ask for the players by id instead of paging the ladder looking for them. ```bash curl "https://api.inhouseranks.com/v1/user/ratings?mmrEntityExternalIds=alice,bob,zoe" \ -H "x-api-key: $INHOUSE_API_KEY" ``` ```jsonc { "poolId": "6b01eb7991a8d0c2e72af66b", "ratings": [ { "mmrEntityExternalId": "alice", "mmrEntity": { "name": "alice", "stats": [ { "mmr": { "value": 1545.086633573829 /* ... */ }, "wins": 3, "losses": 0, "matchCount": 3 // ... } ], "externalId": "alice" // ... } // ... } // ... 1 more ], "missing": ["zoe"] } ``` - **`mmrEntityExternalIds` is a comma-separated list of your player ids**, at most 100 per call. An id that itself contains a comma can't be asked for here. - **`ratings` comes back in the order you asked**, not in rating order. Repeated ids collapse to one row. - **Ids with no player in this pool land in `missing`.** That is how you tell "hasn't played yet" from "wrong id". This call never creates the players it doesn't find. ## Read a rating Every call above returns the same rated user object, so one client model reads them all. The parts you'll use: | Field | Meaning | |---|---| | `externalId` | Your id for the player: the `mmrEntityExternalId` you sent. | | `name` | Their display name. It's the `mmrEntityExternalId` until you set one. | | `stats[]` | One block per position. The block with `positionId: null` is the overall rating. | | `stats[].mmr.value` | The rating. | | `stats[].wins`, `losses`, `ties`, `matchCount` | The record. `matchCount` includes unranked matches. | | `stats[].lastPlayedAt` | When the block last played a ranked match. `null` before the first. | | `stats[].groupRank` | The [rank band](https://inhouseranks.com/docs/guides/rank-bands) the rating falls in. `null` in a pool without bands. | | `stats[].hideRating` | `true` when the pool says not to show this rating yet. See [Hidden ratings](https://inhouseranks.com/docs/guides/hidden-ratings). | Every field is listed under [Rated user](https://inhouseranks.com/docs/api/objects#rated-user). A pool whose game declares positions keeps a stats block per position. A match played in a position moves that block and the overall one. Add `positionId=` to `/leaderboard` or `/rankings` to rank by that block instead of the overall one. --- # Pools and players Page: https://inhouseranks.com/docs/guides/pools A pool is one independent ladder. Most games need exactly one, and already have it. ## The default pool Every project starts with a default pool. Every call that takes a pool uses it when you leave the pool out, so a single-ladder game can skip this page. Create more pools only when you need separate ratings: one per game mode, queue or region. ## Create a pool ```bash curl -X POST https://api.inhouseranks.com/v1/pool/create \ -H "x-api-key: $INHOUSE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Ranked 1v1", "kind": "community", "groupConfig": {} }' ``` | Field | What to send | |---|---| | `name` | The pool's display name, at most 50 characters. | | `kind` | `friends`, `community` or `competitive`. | | `groupConfig` | `{}` is correct and sufficient. It's also where [rank bands](https://inhouseranks.com/docs/guides/rank-bands) go. | Leave out `mmrConfig` and the pool rates with Elo, starting everyone at 1500. The reply has the new pool, and its id: ```jsonc { "group": { "_id": "6b01eb7991a8d0c2e72af67e", "name": "Ranked 1v1" // ... } // ... } ``` **Keep `group._id`.** It's the pool's `poolId`, the name every later call knows it by: in a body (`"poolId": "..."`), a query (`?poolId=`) or a URL (`/v1/pool/`). A pool has no id of your own, so store this one next to whatever the pool is for: a game mode, a queue, a region. ### Use Glicko-2 or another starting rating Send `mmrConfig`: ```bash curl -X POST https://api.inhouseranks.com/v1/pool/create \ -H "x-api-key: $INHOUSE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Arena", "kind": "competitive", "groupConfig": {}, "mmrConfig": { "kind": "glicko2", "initialMmr": 1500, "glicko2": { "tau": 0.5, "initialRatingDeviation": 350, "initialVolatility": 0.06 } } }' ``` - `glicko2.tau` must be between 0.2 and 1.2. Anything else is refused with `400 Validation failed`. - To change only the starting rating, send `kind` and `initialMmr`, and the engine's defaults fill in the rest: `{ "kind": "elo", "initialMmr": 1200 }`. The same goes for a Glicko-2 config sent without its `glicko2` block. Not sure which to pick? Elo is simpler. Glicko-2 tracks how sure it is of each rating, so new players settle faster, and it's what [placement matches](https://inhouseranks.com/docs/guides/placement-matches) and confidence-based [hidden ratings](https://inhouseranks.com/docs/guides/hidden-ratings) need. ## Read and list pools | To | Call | |---|---| | Read one pool | `GET /v1/pool/` | | Read the default pool | `GET /v1/pool` | | List your organization's pools | `GET /v1/pools` | | List the pools one player is rated in | `GET /v1/pools?mmrEntityExternalId=` | `GET /v1/pools` returns every pool in your organization, test and live, each with its `_id`. That makes it the place to look a `poolId` up again. If your players each own pools, that is the wrong list for a player's screen. Pass `mmrEntityExternalId` to get only the pools that player is rated in: ```bash curl "https://api.inhouseranks.com/v1/pools?mmrEntityExternalId=bob" \ -H "x-api-key: $INHOUSE_API_KEY" ``` A player is rated in a pool from the moment a match they're in is recorded there, or you create them in it. Being scored in a match that isn't recorded yet doesn't count. So a pool a player just made shows up **only if you seeded them into it**: creating a pool does not put its creator in it. Call `/v1/user/create` right after `/v1/pool/create`: ```bash curl -X POST https://api.inhouseranks.com/v1/user/create \ -H "x-api-key: $INHOUSE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "poolId": "6b01eb7991a8d0c2e72af67e", "mmrEntityExternalId": "bob", "name": "Bob" }' ``` An unknown `mmrEntityExternalId` returns an empty list, never the unfiltered one. ## Add players ahead of time **You can skip this.** A player is created the first time a recorded match names their `mmrEntityExternalId`. Call `/v1/user/create` only to set a display name that differs from the id, or to put a player in a pool before their first match. ```bash curl -X POST https://api.inhouseranks.com/v1/user/create \ -H "x-api-key: $INHOUSE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "mmrEntityExternalId": "carol", "name": "Carol" }' ``` - `mmrEntityExternalId` is your id for the player, the same value you send in match results. It's required, and at most 100 characters. - A player created by a match uses their `mmrEntityExternalId` as their name until you rename them. Calling `/v1/user/create` again with a `name` renames them: the call is idempotent per `mmrEntityExternalId`. - Use the same `mmrEntityExternalId` for a person in every pool. That's how they count as one player for billing. Later changes to a player: | To | Call | |---|---| | Correct a rating by hand | [`POST /v1/user/update-rating`](https://inhouseranks.com/docs/api/players#correct-a-rating) | | Rename, archive or restore a player | [`POST /v1/mmr_entities/update`](https://inhouseranks.com/docs/api/players#rename-or-archive-a-player) | | Bring players over with their ratings | [`POST /v1/user/migrate`](https://inhouseranks.com/docs/guides/import-and-migrate#migrate-your-players) | ## Change a pool's settings `/v1/pool/update` changes a pool: its name, rating settings, rank bands, matchmaking rules and game settings. Two things to know: - **Changes apply from now on.** Existing ratings keep their values, and matches already created keep the settings they were created with. - **`mmrConfig`, `groupConfig`, `gameConfig` and `matchmakingRules` each replace the whole value.** Send all of it, not only the part you're changing. The fields are under [Update a pool](https://inhouseranks.com/docs/api/pools#update-a-pool). ## End a season `/v1/pool/season/end` ends a pool's season and starts the next one. - **Every rating resets.** Each player goes back to `resetSkillRating`, or to the pool's starting rating when you leave it out. - **Records stay all-time.** Wins, losses and match counts are kept. Each stats block notes where they stood when the season began (`seasonStartWins`, `seasonStartMatchCount`), so "this season" is the difference. - **The ended season keeps the standings.** The reply's `endedSeason` holds every player as they stood before the reset. - **In a Glicko-2 pool, every rating deviation resets too**, and open [rating windows](https://inhouseranks.com/docs/guides/placement-matches) close first. See [End a season](https://inhouseranks.com/docs/api/pools#end-a-season). --- # Matchmaking Page: https://inhouseranks.com/docs/guides/matchmaking Let Inhouse pick the opponents. You queue players, Inhouse forms a lobby and tells your server by webhook, and you record the result. There is nothing to poll. ## How it works 1. **Queue a party** with `POST /v1/queue/join`. 2. **Receive `match.found`** at your webhook when the party's lobby forms. The lobby is an ordinary **pending match**. 3. **Play the match.** That part is entirely yours. 4. **Record the result** with one `POST /v1/match/record`, using the event's `matchId`. The [overview](https://inhouseranks.com/docs#matchmaking-flow) draws this as a sequence diagram. ## Before you start - **Add a webhook endpoint** in the portal (the Webhooks page) that receives `match.found`. Test and live each have their own. `/queue/join` refuses a project without one, because a formed match is announced only by webhook. - **Pick a rule.** Every pool starts with a rule, `ranked-1v1`: one player per side, and the pool's default. Its skill gap starts at 100, widens 10 per second and stops at 400, and a party expires after 300 seconds. For anything but 1v1, [add your own](#custom-rules). ## Queue a party A party is one player, or several who will play on one team. ```bash curl -X POST https://api.inhouseranks.com/v1/queue/join \ -H "x-api-key: $INHOUSE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "partyExternalId": "party-alice", "players": [{ "mmrEntityExternalId": "alice" }] }' ``` - Leave out `matchmakingRuleId` to join the pool's default rule. - `partyExternalId` is optional: your own id for the party, up to 100 characters. It comes back beside the party's `_id` in every response and event, and `/queue/leave` takes it, so you never need to keep Inhouse's id. ```jsonc { "party": { "_id": "6b01eb7991a8d0c2e72af691", "matchmakingRuleId": "ranked-1v1", "externalId": "party-alice", "players": [ { "mmrEntityExternalId": "alice", "mmrEntity": { "_id": "6b01eb7991a8d0c2e72af66e", "stats": [ { "mmr": { "value": 1545.086633573829 /* ... */ } // ... } ] // ... } // ... } ], "status": "searching" // ... } } ``` Each player comes back as `{ mmrEntityExternalId, mmrEntity }`: their rated user as it is now. That is the rating the matchmaker will use. **Joining the queue never creates anyone.** A player new to the pool is shown at the pool's starting rating with `_id: null`, and is created when the match is recorded. ## Handle match.found One event per match, listing every party in it, team by team: ```jsonc { "id": "6b01eb7991a8d0c2e72af695", "type": "match.found", "createdAt": "2026-11-21T19:05:29.771091Z", "data": { "matchId": "6b01eb7991a8d0c2e72af694", "poolId": "6b01eb7991a8d0c2e72af66b", "matchmakingRuleId": "ranked-1v1", "regionId": null, "teams": [ { "teamId": "", "winProbability": 0.3681855893462594, "parties": [ { "partyId": "6b01eb7991a8d0c2e72af692", "partyExternalId": null, "players": [ { "mmrEntityExternalId": "bob", "mmrEntity": { "_id": "6b01eb7991a8d0c2e72af66f", "name": "bob", "stats": [ { "positionId": null, "mmr": { "value": 1451.2775372294423 /* ... */ }, "wins": 0, "losses": 3, "ties": 0, "matchCount": 3, "groupRank": { "lower": 1000, "upper": 1500, "rank": "Silver", "tier": 2, "image": null }, "hideRating": false // ... } ], "externalId": "bob" // ... } // ... } ] } ] } // ... 1 more ] } } ``` - **Find your players** by `partyId`, or by the `partyExternalId` you joined with. Everyone else in the lobby is listed too, so you can seat the whole match. - **Keep each `teamId`.** You send it back when you record the result. - **`winProbability`** is the team's predicted chance of winning. See [How lobbies are chosen](#how-lobbies-are-chosen). - **`regionId`** is the region to host the match in, or `null` when the queue has no regions. See [Regions](#regions). Verify the signature, answer `2xx` within 10 seconds, and dedupe on the event's `id`. [Webhooks](https://inhouseranks.com/docs/guides/webhooks) covers all three, and the two other events a party can end with: `party.expired` and `party.cancelled`. ## Record the result Play the match, then record it in one call: the event's `matchId`, and each team's place by its `teamId`. ```bash curl -X POST https://api.inhouseranks.com/v1/match/record \ -H "x-api-key: $INHOUSE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "matchId": "6b01eb7991a8d0c2e72af694", "scores": [ { "teamId": "", "place": 1 }, { "teamId": "", "place": 2 } ] }' ``` **Always send the event's `matchId`.** It names the match the matchmaker wrote, so `/match/record` rates that one. Without it, `/match/record` answers `400 match-result-required`, or writes a second match if you sent a `matchResult`. A matchmade match is already `ranked`. You can also score players by `mmrEntityExternalId` instead of teams by `teamId`. See [Record a match that already exists](https://inhouseranks.com/docs/guides/matches#record-a-match-that-already-exists). ## Leave the queue **When players stop matchmaking, take their party out.** If they disconnect, close the game or back out and you don't, they can be placed in a match nobody plays. ```bash curl -X POST https://api.inhouseranks.com/v1/queue/leave \ -H "x-api-key: $INHOUSE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "partyExternalId": "party-frank" }' ``` Name the party by its `partyId`, or by the `partyExternalId` it joined with. Leaving sends no event: you made the call yourself. A party that is no longer waiting answers `404 party-not-found`. ## Custom rules Give a pool your own rules when you create it (`/v1/pool/create` takes `matchmakingRules`) or later: ```bash curl -X POST https://api.inhouseranks.com/v1/pool/update \ -H "x-api-key: $INHOUSE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "poolId": "6b01eb7991a8d0c2e72af687", "matchmakingRules": [ { "id": "ranked-5v5", "default": true, "minTeams": 2, "maxTeams": 2, "targetTeams": 2, "minPlayersPerTeam": 5, "maxPlayersPerTeam": 5, "targetPlayersPerTeam": 5, "maxPartySize": 5, "initialSkillGap": 100, "skillGapGrowthPerSecond": 5, "maxSkillGap": 500, "maxTeamWinProbability": 0.6, "maxQueueSeconds": 300 } ] }' ``` - **`/v1/pool/update` replaces the whole list**, the starting 1v1 rule included. `null` clears it. At creation, `[]` creates the pool with no rules. - **Required:** `id`, the three team counts, the three per-team counts, `initialSkillGap` and `skillGapGrowthPerSecond`. A rule missing one, or an inconsistent one, is `400 invalid-matchmaking-rule`. - **Removing a rule cancels the parties queued under it.** Each gets a `party.cancelled` event whose `reason` is `rule-removed`. - The portal edits the same rules. Every field is described under [Matchmaking rule](https://inhouseranks.com/docs/api/objects#matchmaking-rule). ## Positions A rule can make every team fill named slots: one top, one jungle, one mid and so on. Players then queue with the positions they're willing to play, and the matchmaker only ever gives them one of those. **1. Give the rule `teamPositions`:** each position, and how many players a team has in it. ```bash curl -X POST https://api.inhouseranks.com/v1/pool/create \ -H "x-api-key: $INHOUSE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Ranked 5v5", "kind": "competitive", "groupConfig": {}, "matchmakingRules": [ { "id": "ranked-5v5", "default": true, "minTeams": 2, "maxTeams": 2, "targetTeams": 2, "minPlayersPerTeam": 5, "maxPlayersPerTeam": 5, "targetPlayersPerTeam": 5, "maxPartySize": 5, "initialSkillGap": 100, "skillGapGrowthPerSecond": 5, "maxSkillGap": 500, "teamPositions": { "top": 1, "jungle": 1, "mid": 1, "bot": 1, "support": 1 } } ] }' ``` - **The team size is the number of slots.** Set all three per-team counts to their total (5 here). - **`minPositionsPerPlayer`** is how many positions each player has to list. Left out, it is 1. - **Saving the rule adds its positions to the pool's game**, so every player also gets a rating of their own in each position they play. **2. Queue each player with `positionIds`**, first choice first: ```bash curl -X POST https://api.inhouseranks.com/v1/queue/join \ -H "x-api-key: $INHOUSE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "poolId": "6b01eb7991a8d0c2e72af69b", "partyExternalId": "party-ivy", "players": [ { "mmrEntityExternalId": "ivy", "positionIds": ["mid", "support"] } ] }' ``` ```jsonc { "party": { "_id": "6b01eb7991a8d0c2e72af69e", "matchmakingRuleId": "ranked-5v5", "externalId": "party-ivy", "players": [ { "mmrEntityExternalId": "ivy", "positionIds": ["mid", "support"] // ... } ], "status": "searching" // ... } } ``` **3. Read each player's `positionId` in `match.found`:** the position they were given. It is always one they listed. ```jsonc { "id": "6b01eb7991a8d0c2e72af6a9", "type": "match.found", "data": { "matchId": "6b01eb7991a8d0c2e72af6a8", "matchmakingRuleId": "ranked-5v5", "teams": [ { "teamId": "", "winProbability": 0.5, "parties": [ { "partyId": "6b01eb7991a8d0c2e72af69e", "players": [ { "mmrEntityExternalId": "ivy", "positionIds": ["mid", "support"], "positionId": "mid" // ... } ] // ... }, { "partyId": "6b01eb7991a8d0c2e72af69f", "players": [ { "mmrEntityExternalId": "jack", "positionIds": ["top", "jungle"], "positionId": "top" // ... } ] // ... }, { "partyId": "6b01eb7991a8d0c2e72af6a1", "players": [ { "mmrEntityExternalId": "liam", "positionIds": ["bot", "mid"], "positionId": "bot" // ... } ] // ... }, { "partyId": "6b01eb7991a8d0c2e72af6a2", "players": [ { "mmrEntityExternalId": "mona", "positionIds": ["support", "bot"], "positionId": "support" // ... } ] // ... }, { "partyId": "6b01eb7991a8d0c2e72af6a4", "players": [ { "mmrEntityExternalId": "olga", "positionIds": ["jungle", "support"], "positionId": "jungle" // ... } ] // ... } ] } // ... 1 more ] // ... } // ... } ``` **4. Record the result as usual**, with the event's `matchId`. The match already holds each player's position, so recording it moves two of their ratings: the overall one, and the one for that position. ```jsonc { "match": { "_id": "6b01eb7991a8d0c2e72af6a8", "status": "recorded", "ranked": true, "matchmaking": { "matchmakingRuleId": "ranked-5v5", "playerCount": 10 } // ... }, "matchPlayers": [ { "teamId": "", "mmrEntityId": "6b01eb7991a8d0c2e72af6aa", "mmrChanges": [ { "positionId": null, "multiplier": null, "advantage": null, "before": 1500, "after": 1516, "bonus": null }, { "positionId": "mid", "multiplier": null, "advantage": null, "before": 1500, "after": 1516, "bonus": null } ], "outcome": "win" // ... }, { "teamId": "", "mmrEntityId": "6b01eb7991a8d0c2e72af6ab", "mmrChanges": [ { "positionId": null, "multiplier": null, "advantage": null, "before": 1500, "after": 1516, "bonus": null }, { "positionId": "top", "multiplier": null, "advantage": null, "before": 1500, "after": 1516, "bonus": null } ], "outcome": "win" // ... } // ... 8 more ] } ``` What to know: - **A position is a hard requirement.** A player is never given a position they didn't list, however long they wait, and a lobby that can't fill every slot doesn't form. - **Players are matched on their overall rating**, the block of their `stats` with `positionId: null`, whichever positions they list. A position decides where a player sits, not what they're rated. - **Every ranked match moves the overall rating.** A match played in a position also moves that position's own rating, which starts from the overall one the first time they play it. A position's rating is yours to show, on a [leaderboard per position](https://inhouseranks.com/docs/guides/leaderboards#read-a-rating) for example. The matchmaker doesn't read it. - **The more positions players list, the shorter the wait.** With one position each, the least popular position decides how many players ever get a match: when a tenth of your players queue for a position that fills a fifth of the slots, only half of them can be placed. With two positions each, nearly everyone is. Set `minPositionsPerPlayer` to 2 if your game runs short of one position. - **First choices come first where they can.** A round prefers lobbies in which more players get the first position on their list. A position the queue is short of is filled first, though, so listing it second often means playing it. - **A party shares a team**, so its players need different slots. Two players who both list only `mid` can't queue together under a rule with one `mid` per team: `400 party-positions-conflict`. - **A join is refused** with `400 positions-required` when a player lists too few positions, and `400 invalid-position` for one the rule doesn't have. ## Regions A queue with regions only puts parties together that accept the same region, and `match.found` says which region the match is in. Region ids are your own names for them, such as `eu-west`. **1. List the queue's regions.** They come from three places, and the first one that is set wins: - the rule's `regionIds` - the pool's `matchmakingRegionIds`, on `/v1/pool/create` or `/v1/pool/update` - the project's, set in the portal (Matchmaking → Regions) ```bash curl -X POST https://api.inhouseranks.com/v1/pool/create \ -H "x-api-key: $INHOUSE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Regional 1v1", "kind": "community", "groupConfig": {}, "matchmakingRegionIds": ["eu-west", "us-east"] }' ``` - **Left out or `null`, a level uses the one above it.** A pool without `matchmakingRegionIds` uses the project's. - **`[]` is set too: it turns regions off** for that level and below. A rule with `regionIds: []` matches everyone together, whatever the pool or the project lists. - **With no regions anywhere, matchmaking works as it always has.** - The rules for an id are under [Matchmaking rule](https://inhouseranks.com/docs/api/objects#matchmaking-rule). **2. Queue each party with `regionIds`:** the regions it will play in. The party lists them once, for all its players. ```bash curl -X POST https://api.inhouseranks.com/v1/queue/join \ -H "x-api-key: $INHOUSE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "poolId": "6b01eb7991a8d0c2e72af6be", "partyExternalId": "party-sam", "regionIds": ["eu-west"], "players": [{ "mmrEntityExternalId": "sam" }] }' ``` - **Leave it out, or send `[]`, to accept any region** the queue offers, including regions added while the party waits. - **A region the queue doesn't offer**, or one listed twice, is `400 invalid-region`. A queue without regions ignores the list. **3. Read `regionId` in `match.found`:** the region to host the match in. Every party in the lobby accepted it. ```jsonc { "id": "6b01eb7991a8d0c2e72af6c4", "type": "match.found", "data": { "matchId": "6b01eb7991a8d0c2e72af6c3", "matchmakingRuleId": "ranked-1v1", "regionId": "eu-west", "teams": [ { "teamId": "", "parties": [ { "partyId": "6b01eb7991a8d0c2e72af6c1", "partyExternalId": "party-sam", "players": [{ "mmrEntityExternalId": "sam" /* ... */ }] } ] // ... }, { "teamId": "", "parties": [ { "partyId": "6b01eb7991a8d0c2e72af6c2", "partyExternalId": null, "players": [{ "mmrEntityExternalId": "tess" /* ... */ }] } ] // ... } ] // ... } // ... } ``` What to know: - **A region is a hard requirement.** A party is never matched outside its regions, however long it waits. - **The more regions parties accept, the shorter the wait.** The matchmaker plans each region over the parties that listed it, the region with the fewest players first, so a party that lists several is placed where players are scarce. - **A party that lists none usually fills in first.** The matchmaker prefers to match it with parties that listed a region before matching it with other parties that listed none. A lobby made only of parties that listed none plays in the first region of the queue's list. - **A party is cancelled when none of its regions is left.** If the project's, the pool's or the rule's regions change while it waits, it gets a `party.cancelled` event whose `reason` is `region-removed`. A party with one of its regions left keeps waiting. - **The match keeps its region** as `matchmaking.regionId`. - **`/v1/queue/stats` counts every region together.** ## How lobbies are chosen A lobby must fit its rule. Two numbers decide whether it does: - **Skill gap:** the highest-rated player in the lobby minus the lowest-rated, in rating points. Every player counts individually, party members included. The allowed gap starts at `initialSkillGap`, widens by `skillGapGrowthPerSecond` for each second of waiting, and stops at `maxSkillGap`. The wait that counts is the lobby's longest unless the rule says otherwise: see [Whose wait opens the gap](#whose-wait-opens-the-gap). - **Win probability:** each lobby is split into the most even teams possible. If the favored team's chance is still above `maxTeamWinProbability`, the lobby is refused. Win probability is the number the rating engine itself uses when the match is rated. A team's rating is its players' average, and the pool's formula gives its chance of beating each other team. On Elo that is `1 / (1 + 10^((theirs − yours) / 400))` on the pool's scale. Glicko-2 also discounts for how uncertain the opposing team's average rating is, `√(sum of RD²) / players`. A team's value is that chance averaged over its opponents. With two teams it is simply P(A beats B): on the default scale, team averages about 70 points apart give 0.6. ### Whose wait opens the gap A lobby holds parties that have waited different times. The rule's `skillGapOpenedBy` says whose wait its allowed gap comes from: | `skillGapOpenedBy` | The gap comes from | What you get | |---|---|---| | `longestWait` (default) | The party in the lobby that has waited longest. | A party that just joined can be placed at once in a wide lobby an older party opened. Shorter waits, wider lobbies. | | `shortestWait` | The party in the lobby that has waited least. | Every party is inside the gap its own wait allows. Closer matches, longer waits. | Take a 1v1 rule that starts at 100 points and widens by 10 a second, up to 400. Player A has waited 30 s, so A's gap is 400. Player B joins 350 points away, with a gap of 100. By the longest wait they are matched at once. By the shortest wait they are matched 25 s later, when B's own gap reaches 350, unless someone closer joins first. The two differ most when few players are queuing. In our simulations, a 5v5 queue with one player joining a second went from an average gap of about 280 points to about 165 by the shortest wait, and from an average wait of about 20 s to about 39 s. A 1v1 queue with twenty players joining a second came out the same either way. Only the skill gap follows this setting. `relaxLobbySizeAfterSeconds` always counts the lobby's longest wait. ### How a round chooses lobbies The queue is matched every few seconds. Each round plans a rule's whole queue at once instead of filling one lobby at a time. It lines the waiting players up by rating and cuts lobbies from neighbors in that line: 1. **Only lobbies the rule allows.** The right number of players, every party whole on one of the equal teams, a skill gap inside what the lobby's wait allows, and the most even split inside `maxTeamWinProbability`. 2. **As few players left waiting as possible.** If a lobby can form, it does. A player is never held back to make someone else's lobby better. 3. **Then the lowest cost.** Between plans that place as many players: - each lobby costs `(1 − waitWeight) × lobbyCost` - each player left waiting costs `waitWeight × (wait ÷ T)²` `lobbyCost` runs from 0 (everyone rated the same, even teams) to 1 (the worst the rule could ever allow). It's the average of three parts: the lobby's skill gap as a share of the widest gap the rule ever allows, how lopsided it is (how far the favored team's win probability is above 0.5, doubled), and, in pools with [rating windows](https://inhouseranks.com/docs/guides/placement-matches), the share of its parties still being placed beyond the first. `T` is the rule's own measure of a long wait: the seconds its allowed gap takes to reach `maxSkillGap`, or `maxQueueSeconds` when it never gets there. The wait is squared, so a few seconds between new arrivals barely count and a long wait counts for a lot. `waitWeight` sets the balance: | `waitWeight` | Effect | |---|---| | `0` | Forms the closest-rated, most even lobbies. Time waited only breaks ties. | | `0.5` (default) | Counts both the same. Once a player has waited `T` (30 s on the default rule), they're placed ahead of a newcomer whatever that does to match quality. | | `1` | Places whoever has waited longest. Match quality only breaks ties. | No lobby outside the rule's limits ever forms, whatever the weight. A lobby that can't form yet is tried again on the next round, with a wider gap. Under a rule with [positions](#positions), players are lined up by the same rating, and a lobby is allowed only if every slot of every team is filled by a player who listed that position. So a lobby isn't always a run of neighbors: the round reaches past players whose positions are already taken. `lobbyCost` then has a fourth part: the share of the lobby's players who didn't get the first position on their list. ### How many lobbies a round considers A round doesn't try every possible set of players. It takes each waiting party in turn as the lowest-rated in a lobby, and walks up the line until it has enough players: that is the closest-rated lobby with the party at the bottom. Then it walks on a little further, so that someone just above who has waited much longer can take a newcomer's seat. `lobbyOptionsPerParty` is how many lobbies it collects from each party this way, 1 to 8. A stretch of players that makes no allowed lobby doesn't count toward it. The default, 3, suits nearly every game. More options rarely place more players, because every party's own walk finds most of the same lobbies, and a lobby one round misses usually forms on the next. In our simulations, 5 and 8 placed as many players as 3, give or take a few lobbies in tens of thousands of players, with about the same waits and gaps, while each round took about 1.5 and 2 times as long to plan. At 1, each party is offered only its closest-rated lobby. ## What to know about the queue - **The queue isn't stored.** A party exists only while it waits. Once it's placed, expires or is cancelled it's gone, and its event says what became of it. - **A server restart empties the queue, and tells you.** Every party that was waiting gets a `party.cancelled` event whose `reason` is `server-shutdown`: queue it again. While the server restarts, `/v1/queue/join` can answer `503 server-restarting` for a few seconds; retry after its `Retry-After`. - **Queue a party again when you've heard nothing for its rule's `maxQueueSeconds`.** The restart events are best effort: a server that stops without warning sends none, and an event that fails to reach you is in the [delivery log](https://inhouseranks.com/docs/api/matchmaking#list-webhook-deliveries). - **A player can be in one searching party per pool.** A second join is `409 player-already-queued`. - **A `partyExternalId` names one party per pool at a time.** Another join with it answers `409 party-external-id-taken` until that party is placed, expires, is cancelled or leaves. - **Queued players can't be put in a match.** While a player waits in a pool's queue, no match in that pool can take them in: not a new one (`/match/record`, `/match/create`, `/match/import`, or `/match/score` opening one), and not an existing one they aren't in yet (`/match/update` or `/match/score` adding them). Each answers `409 player-in-queue`, naming them in `mmrEntityExternalIds`. Take their party out with `/queue/leave` first. - **A match they're already in is never held up.** Players can queue for their next game while their last match is still open, and that match can still be scored, updated and recorded. Their queued rating is the one they had when they joined, so record a match before queueing its players again when you can: the matchmaker then places them on their latest rating. - **A formed match remembers where it came from.** It keeps `matchmaking: { matchmakingRuleId, playerCount }`, plus `regionId` in a queue with regions. - **Every lobby spends a match.** It counts against your plan the moment it's formed. See [Limits and billing](https://inhouseranks.com/docs/guides/limits#plan-allowances). ## Show queue activity `GET /v1/queue/stats` says how busy a pool's queue is, for showing players things like "42 players in queue": how many are waiting, how their ratings are spread, and how far their searches have widened. ```bash curl "https://api.inhouseranks.com/v1/queue/stats?matchmakingRuleId=ranked-1v1" \ -H "x-api-key: $INHOUSE_API_KEY" ``` ```jsonc { "now": "2026-11-21T19:05:29.765580Z", "poolId": "6b01eb7991a8d0c2e72af66b", "matchmakingRuleId": "ranked-1v1", "ratingBucketSize": 100, "skillGapBucketSize": 50, "parties": 2, "players": 2, "oldestEnqueuedAt": "2026-11-21T19:05:29.758581Z", "rating": { "min": 1451.2775372294423, "max": 1545.086633573829 }, "ratingBuckets": [ { "from": 1400, "to": 1500, "players": 1 }, { "from": 1500, "to": 1600, "players": 1 } ], "allowedSkillGap": { "min": 100.03999, "max": 100.06999 }, "allowedSkillGapBuckets": [{ "from": 100, "to": 150, "players": 2 }] } ``` - **It's aggregates only.** It never names a party or a player, so it can't tell you what became of your party. The webhook event does. - **With `matchmakingRuleId`**, the numbers are that rule's queue only. **Without it**, they're the whole pool, every rule's queue together, and `matchmakingRuleId` is `null`. - **Call it from your game server**, never from the game client: the API key must stay secret. The queue is matched every few seconds, so polling more often than that adds nothing. Poll once and pass the numbers on to your players. Every field is under [Queue stats](https://inhouseranks.com/docs/api/matchmaking#queue-stats). --- # Webhooks Page: https://inhouseranks.com/docs/guides/webhooks Inhouse tells your server what the matchmaker did by sending events to your project's webhook endpoints. Add them in the portal, on the Webhooks page. Test and live each have their own. ## Endpoints An endpoint is a URL on your server, the events it receives, and a signing secret of its own. A project has up to 5. - **Each endpoint receives the event types you choose**, or all of them. An endpoint set to all events also gets any type added later. - **An event goes to every endpoint that receives its type.** Each gets the same body, with the same `id`, signed with that endpoint's secret. - **Each endpoint is sent, retried and logged on its own.** One that is down or slow doesn't hold back the others. - **`/queue/join` needs one endpoint that receives `match.found`.** Without one it answers `400 webhook-not-configured`: a formed match is announced no other way. The portal shows each endpoint's deliveries, and its **Event catalog** lists every field of every event with its type and meaning. ## Events | `type` | Sent when | `data` | |---|---|---| | `match.found` | A lobby formed. One event per match. | The match, and its teams, parties and players. See [Handle match.found](https://inhouseranks.com/docs/guides/matchmaking#handle-matchfound). | | `party.expired` | A party waited its rule's `maxQueueSeconds` without a lobby. | The party. | | `party.cancelled` | The queue gave up on a party. | The party, plus `reason`. | | `webhook.test` | You pressed **Send test event** on an endpoint in the portal. It goes to that endpoint only, whatever events it receives. | `{ projectId, webhookId }`. Never retried. | Every event has the same envelope: `id`, `type`, `createdAt` and `data`. ```jsonc { "id": "6b01eb7991a8d0c2e72af699", "type": "party.expired", "createdAt": "2026-11-21T19:15:29.812613Z", "data": { "partyId": "6b01eb7991a8d0c2e72af698", "partyExternalId": "party-erin", "poolId": "6b01eb7991a8d0c2e72af66b", "matchmakingRuleId": "ranked-1v1", "regionIds": [], "players": [{ "mmrEntityExternalId": "erin", "userExternalId": "erin" }] } } ``` `party.cancelled` carries the same `data` plus a `reason`: ```jsonc { "id": "6b01eb7991a8d0c2e72af68b", "type": "party.cancelled", "createdAt": "2026-11-21T19:05:29.707698Z", "data": { "partyId": "6b01eb7991a8d0c2e72af68a", "partyExternalId": "squad-7", "poolId": "6b01eb7991a8d0c2e72af687", "matchmakingRuleId": "ranked-5v5", "regionIds": [], "players": [ { "mmrEntityExternalId": "gina", "userExternalId": "gina" }, { "mmrEntityExternalId": "hugo", "userExternalId": "hugo" } ], "reason": "rule-removed" } } ``` | `reason` | Meaning | |---|---| | `rule-removed` | The rule or its pool is gone. | | `region-removed` | The queue no longer offers any of the regions the party listed: the project's, the pool's or the rule's regions changed while it waited. See [Regions](https://inhouseranks.com/docs/guides/matchmaking#regions). | | `over-plan-limit` | Your plan couldn't take the lobby's match. Either the match allowance ran out while the parties waited, or the lobby's players not yet counted this month didn't fit in the active-player allowance. Parties that each fit on their own can still overflow it together. | | `server-shutdown` | The server restarted while the party waited, and the queue isn't stored. Queue the party again. See [What to know about the queue](https://inhouseranks.com/docs/guides/matchmaking#what-to-know-about-the-queue). | Six things to know about the payloads: - **An event names its pool `poolId` and its rule `matchmakingRuleId`.** Those are the ids you send to `/queue/join`. - **`match.found` lists each player as `{ mmrEntityExternalId, mmrEntity }`**, the `party.*` events as `{ mmrEntityExternalId }` only. Every event also carries a player's ids under their [user names](https://inhouseranks.com/docs/api#a-players-ids-also-have-user-names), so `userExternalId` is there too, with the same value. `mmrEntity` is the player's [rated user](https://inhouseranks.com/docs/api/objects#rated-user) as it was when they joined the queue, the same object a reply carries. A player with no rated user in the pool yet gets a default one at the pool's starting rating, with `_id: null`. - **Under a rule with positions, each `match.found` player also has `positionIds` and `positionId`:** the positions they listed, and the one they were given. See [Positions](https://inhouseranks.com/docs/guides/matchmaking#positions). - **`match.found` has `regionId`:** the region to host the match in, or `null` when the queue has no regions. The `party.*` events carry the party's `regionIds`, the regions it listed, or `[]` for any. See [Regions](https://inhouseranks.com/docs/guides/matchmaking#regions). - **`teamId` is one of your game's declared teams** when it declares enough of them. Otherwise it's an id the server made up for this match. Either way, send it back as `scores[].teamId` when you record the result. - **`partyExternalId` is the id you joined the party with**, or `null` when you sent none. Leaving with `/queue/leave` sends no event: you made that call yourself. ## Receive an event Every event is a `POST` with a JSON body and these headers: | Header | Value | |---|---| | `Inhouse-Event` | The event type, such as `match.found`. | | `Inhouse-Delivery` | The event's `id`. | | `Inhouse-Attempt` | `1` for the first try, up to `6`. | | `Inhouse-Signature` | `t=,v1=`. | It also carries `Content-Type: application/json` and `User-Agent: Inhouse-Webhooks/1.0`. **Answer 2xx within 10 seconds** to acknowledge it. Then: - **Answer `2xx` to event types you don't handle**, `webhook.test` included. - **Handle each event idempotently.** An event can arrive more than once (a retry after your answer timed out) and not necessarily in order. A retry carries the same `id`. - **Answer quickly.** Your endpoint is sent at most 100 events at a time, and the rest wait their turn, oldest first. An endpoint that answers within 100 ms gets events as fast as they're made, several hundred a second. One that takes a second gets 100 a second, and everything behind those waits, your `match.found`s included. Acknowledge first, then do the work. - **An event is only sent to endpoints that receive its type.** With no such endpoint, nothing is sent and nothing goes in the log. A lobby formed after you remove your last `match.found` endpoint is written with no event. ## Retries Anything but a `2xx` in time (another status, a timeout, a refused connection) is retried up to 5 times, waiting 4 s, 8 s, 16 s, 32 s and then 60 s between attempts. The last retry goes out about 2 minutes after the first attempt. If it fails too, the event is dropped. **An attempt that waits 2 minutes for its turn isn't sent.** Every attempt takes a turn, a retry like a first attempt, and your endpoint has at most 100 at a time. An attempt still waiting for one after 2 minutes is given up on: its delivery is logged as `failed`, with a `lastError` that begins `Not sent`. That is what keeps events from piling up behind an endpoint that has stopped answering. It can also reach an endpoint that does answer, when events arrive faster than they can be sent for two minutes on end: one that takes seconds over each event during a large burst, for example. Answering quickly is what keeps it from coming up. Redirects aren't followed. Each attempt reads the endpoint's URL and secret afresh, so retries after you rotate the secret are signed with the new one. Retries to an endpoint you delete stop, and its deliveries are logged as failed. ## Verify the signature Check the signature before trusting an event. Compute HMAC-SHA256 of `.` with the endpoint's signing secret (`whsec_…`, shown in the portal; each endpoint has its own), compare it to `v1` in constant time, and reject a `t` more than 5 minutes old: ```js import crypto from 'node:crypto'; function isFromInhouse(rawBody, signatureHeader, secret) { const parts = Object.fromEntries( signatureHeader.split(',').map((part) => part.split('=')), ); const expected = crypto .createHmac('sha256', secret) .update(`${parts.t}.${rawBody}`) .digest('hex'); const fresh = Math.abs(Date.now() / 1000 - Number(parts.t)) < 300; return ( fresh && typeof parts.v1 === 'string' && parts.v1.length === expected.length && crypto.timingSafeEqual(Buffer.from(parts.v1), Buffer.from(expected)) ); } ``` ## Catch up after downtime Every event sent to your project's endpoints, and what became of it, is kept for 7 days. Read the ones an endpoint missed: ```bash curl "https://api.inhouseranks.com/v1/projects/webhook/deliveries?status=failed" \ -H "x-api-key: $INHOUSE_API_KEY" ``` | A delivery's `status` | Meaning | |---|---| | `delivered` | The endpoint acknowledged it. | | `failed` | The endpoint never acknowledged it: it was down for longer than the retries, it was deleted, the server shut down mid-retry, or an attempt waited over 2 minutes for its turn to be sent. | | `pending` | A retry is waiting (`nextAttemptAt`). If `nextAttemptAt` is in the past, the server crashed between retries. | Each delivery's `body` is the exact JSON that was sent. Process the `body` of a `failed` delivery, or of a `pending` one whose `nextAttemptAt` has passed, as if it had just arrived. A delivery is one event to one endpoint. With several endpoints an event is listed once for each, with the same `eventId` (the `id` in its `body`), so handle each `eventId` once. Add `webhookId=` to read one endpoint's deliveries. The portal shows the same log, endpoint by endpoint, on its Webhooks page. The query parameters and fields are under [List webhook deliveries](https://inhouseranks.com/docs/api/matchmaking#list-webhook-deliveries). --- # Rank bands Page: https://inhouseranks.com/docs/guides/rank-bands Name a pool's ratings and give them badges: "Bronze" below 1000, "Silver" from 1000, "Gold" from 1500. Each **rank band** covers a range of ratings. Once a pool has bands, every stats block the API returns carries the band its rating falls in, as `groupRank`. Your game shows the badge without mapping numbers to names itself. ## Set the bands Send them in `groupConfig`, when you create the pool or later: ```bash curl -X POST https://api.inhouseranks.com/v1/pool/update \ -H "x-api-key: $INHOUSE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "groupConfig": { "rankMode": "rank", "groupRanks": [ { "rank": "Gold", "lower": 1500, "upper": null, "image": "https://assets.example.com/ranks/gold.png" }, { "rank": "Silver", "lower": 1000, "upper": 1500, "tier": 2 }, { "rank": "Bronze", "lower": null, "upper": 1000 } ] } }' ``` This call names no pool, so it sets the default pool's bands. Add `"poolId"` for another pool. **`groupConfig` replaces the pool's whole config.** Send `rankMode` and `groupRanks` together. What comes back has the same names: the bands are the pool's `config.groupRanks`, and a rating's band is its `groupRank`. A band is `{ rank, lower, upper, tier, image }`: | Field | Meaning | |---|---| | `rank` | The band's name. | | `lower` | Where the band starts, inclusive. `null` means no lower bound. | | `upper` | Where the band ends, exclusive. `null` means no upper bound. | | `tier` | Optional whole number your UI can show after the name. | | `image` | Optional badge URL. | With `"rankMode": "rank"`, the bands must cover every rating exactly once: the lowest has `lower: null`, the highest has `upper: null`, and each starts exactly where the one below it ends. Otherwise the call answers `400` with a [`group-rank…` code](https://inhouseranks.com/docs/api/errors#pools). Bands sent without `rankMode` are stored as they are, and a rating that no band covers reads `groupRank: null`. The portal edits the same bands (open a pool, then **Ranks**) and uploads badge images for you. ## Read a player's band A stats block in a pool with bands: ```jsonc { "positionId": null, "mmr": { "value": 1600, "ratingDeviation": null, "volatility": null, "lastRatedAt": null }, "wins": 1, "losses": 0, "ties": 0, "matchCount": 1, "winStreak": 1, "currentStreak": 1, "loseStreak": 0, "streakIgnoringTies": 1, "seasonStartWins": null, "seasonStartMatchCount": null, "lastPlayedAt": "2026-11-21T19:05:29.559434Z", "groupRank": { "lower": 1500, "upper": null, "rank": "Gold", "tier": null, "image": "https://assets.example.com/ranks/gold.png" }, "hideRating": false } ``` - **`groupRank` is on every stats block, wherever a rated user is returned**: both leaderboards, `/v1/user/ratings`, `/v1/pool`, `/v1/user/create`, `/v1/user/update-rating`, the players in `/v1/match/list` and `/v1/match/get`, each player of a `/queue/join` party, and each player in a `match.found` event. The per-match rating changes in `matchPlayers[].mmrChanges` don't carry it. - **It's `null`** when the pool has no bands, or when none covers the rating. - **Each block gets the band for its own rating**, so a position's block can sit in a different band from the overall one. - **The band is looked up on every read.** It is never stored with the player. Renaming a band or moving its bounds relabels every rating at once, and nobody has to play a match. --- # Hidden ratings Page: https://inhouseranks.com/docs/guides/hidden-ratings A new player's rating says little. A pool can mark ratings **hidden** until the player has proven them. **The rating is still returned**, with every other field. Each stats block just says `hideRating: true` or `false`, and your game decides what a hidden rating looks like: "Unranked", say, or "3 more matches". ## Set the thresholds They go in the pool's `mmrConfig`, when you create the pool or later: ```bash curl -X POST https://api.inhouseranks.com/v1/pool/update \ -H "x-api-key: $INHOUSE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "poolId": "6b01eb7991a8d0c2e72af687", "mmrConfig": { "kind": "glicko2", "initialMmr": 1500, "hideRatingUnderMatchCount": 10, "hideRatingUnderWinCount": 1, "glicko2": { "tau": 0.5, "initialRatingDeviation": 350, "initialVolatility": 0.06, "hideRatingUnderConfidencePercent": 50 } } }' ``` **`mmrConfig` replaces the pool's whole rating config.** Send all of it. | Setting | Hides a rating while | Rating systems | |---|---|---| | `hideRatingUnderMatchCount` | the player has played fewer matches than this **this season**, ranked or not | all | | `hideRatingUnderWinCount` | the player has won fewer **ranked** matches than this **this season** (an unranked match is never a win) | all | | `glicko2.hideRatingUnderConfidencePercent` | the system's **confidence** in the rating, 0–100%, is below this | Glicko-2 | - **Any one threshold is enough** to hide a rating. - **Leave a setting out, or send `null`, to turn it off.** Counts must be 0 or more and the percentage 0–100, or the call answers `400`. - **It's judged on every read** with the pool's current settings, so changing a threshold reveals or hides ratings at once. - **Each stats block is judged on its own**, so a position's block can be hidden while the overall one is shown. ## This season "This season" means since the pool's last [season end](https://inhouseranks.com/docs/guides/pools#end-a-season), or ever if it has never ended one. Records stay all-time: each stats block also carries `seasonStartWins` and `seasonStartMatchCount`, its `wins` and `matchCount` when the season began (`null` if it hasn't been through a season end). This season's count is the difference. ## Confidence Confidence is Glicko-2's **rating deviation** (RD, `mmr.ratingDeviation`: how far the true rating may be from the one shown) as a percentage: ``` confidence % = (RDmax − RD) / (RDmax − RDmin) × 100, clamped to 0–100 ``` - RDmax is the pool's `initialRatingDeviation` (350 by default), where every new player starts: 0%. - RDmin is 40: an RD of 40 or lower is 100%. RD shrinks as a player plays, so confidence rises. On the defaults, `hideRatingUnderConfidencePercent: 50` hides a rating until its RD is 195 or lower. The check uses the RD the response reports. ## Where hideRating appears On every stats block of every response that returns a rating. Matchmaking carries it too: each player in a `/queue/join` party, and in a `match.found` event, comes with their `mmrEntity`, whose stats blocks carry `hideRating`. Those stats are as of when the player joined, judged with the pool's settings when the reply or event is sent. A [rating window](https://inhouseranks.com/docs/guides/placement-matches) can hide a rating too, while it's open. --- # Placement matches Page: https://inhouseranks.com/docs/guides/placement-matches A **rating window** rates a run of a player's matches as one period: their first 10 matches, say, or their first 5 of each season. The player gets one settled rating at the end instead of a number that jumps after every game. Rating windows are for Glicko-2 pools only. ## What a window does While a window is open: - **The stored rating waits.** `mmr` in the player's stats block doesn't move. Wins, losses, streaks and match counts still update every match. - **The window rating moves.** The window's own `mmr`, `ratingDeviation` and `volatility` (in `mmrEntity.ratingWindowMmrs`) are solved again after every match, from all of the window's matches together. Each match is judged against every opponent's **current** rating, so a loss to a player who was new at the time counts as a loss to the player they turned out to be. - **The window rating is the one in use.** Matchmaking pairs the player on it, and opponents' ratings and team ratings are computed from it. When someone in a window queues, the matchmaker prefers settled opponents (the lowest RD) inside the allowed skill gap. **When it closes, the stored rating takes it.** The window's `mmr`, `ratingDeviation` and `volatility` are written to the stats block, and the window is removed. ## Set up windows They go in the pool's `mmrConfig`, under `glicko2.ratingWindows`, when you create the pool or later: ```bash curl -X POST https://api.inhouseranks.com/v1/pool/update \ -H "x-api-key: $INHOUSE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "poolId": "6b01eb7991a8d0c2e72af687", "mmrConfig": { "kind": "glicko2", "initialMmr": 1500, "glicko2": { "tau": 0.5, "initialRatingDeviation": 350, "initialVolatility": 0.06, "ratingWindows": [ { "trigger": "hoursSinceLastPlayed", "hours": 720, "matchCount": 10 }, { "trigger": "seasonStart", "matchCount": 5, "winCount": 3 } ] } } }' ``` **`mmrConfig` replaces the pool's whole rating config.** Send all of it. | Field | Meaning | |---|---| | `trigger` | What opens the window at a player's next ranked match. `seasonStart`: their first match of the season. `hoursSinceLastPlayed`: at least `hours` since their last ranked match. `always`: rolling, so as soon as one window closes the next match opens another. A player who has never played sets off all three. | | `hours` | For `hoursSinceLastPlayed` only, and required there: 1–87600. | | `matchCount` | Close after this many matches: 1–100. | | `winCount` | Close after this many wins (a win is sole 1st place): at least 1, and no more than `matchCount` when both are set. | | `durationHours` | Close this many hours after the window's first match: 1–87600. | | `overwriteExisting` | When this window's trigger fires while the player already has one open, close that one (its result is kept) and start this one fresh. Otherwise the open window carries on. Default `false`. Not allowed with `always`. | Rules for the list: - **A window closes on whichever limit comes first**, so each needs at least one of `matchCount`, `winCount` or `durationHours`. A window holds at most 100 matches, whatever its limits. - **Each trigger can be used once per pool.** When several fire at one match, the first in the list wins. - **Limits are read from the pool's live config.** An edit applies to open windows at once, and removing a window closes the open ones at their next match. ## How windows open and close - **Only ranked matches open a window**, one per stats block (`positionId`) at most. Nothing is created in bulk, and unranked matches never open or count toward one. - **Matches are never lost.** A window that closes early, on time or because its trigger was removed keeps the matches it has: they're rated, never thrown away. - **A window whose time ran out, or whose trigger was removed, reads as closed straight away.** Its block shows the window's result, the same value the player's next match stores. - **Season end closes every open window first**, so the ended season's standings include them, and the new season starts with none. On Glicko-2 a season end also resets every RD, to `resetRatingDeviation` (at least 40) or the pool's `initialRatingDeviation`: a reset rating with a small RD would barely move again. ## Hidden while placing A window that opens before the player has a rated match this season marks the block `hideRating: true` and keeps the player off `/leaderboard` until it closes. The window itself says `hidesRating: true`. A window that opens on a rating already earned this season (a returning player, or the next rolling window) hides nothing. Reads and the board show the stored rating, the last one the player earned. ## Read a window A player one match into a window. The stored rating hasn't moved, and the window's rating has: ```jsonc { "stats": [ { "positionId": null, "mmr": { "value": 1500, "ratingDeviation": null, "volatility": null, "lastRatedAt": null }, "wins": 1, "losses": 0, "matchCount": 1, "hideRating": true // ... } ], "externalId": "alice", "ratingWindowMmrs": [ { "positionId": null, "trigger": "hoursSinceLastPlayed", "startedAt": "2026-11-21T19:05:29.738553Z", "lastPlayedAt": "2026-11-21T19:05:29.738553Z", "hidesRating": true, "matchIds": ["6b01eb7991a8d0c2e72af68e"], "matchCount": 1, "wins": 1, "startMmr": 1500, "startRatingDeviation": 350, "startVolatility": 0.06, "mmr": 1663.9483363044524, "ratingDeviation": 294.6523787689481, "volatility": 0.05999967537233814 } ] // ... } ``` Each `/match/record` reply also reports the window, on the `matchPlayers` row of every player who was in one: ```jsonc { "mmrEntityId": "6b01eb7991a8d0c2e72af68c", "mmrChanges": [ { "positionId": null, "multiplier": null, "advantage": null, "before": 1500, "after": 1500, "bonus": null } ], "outcome": "win", "ratingWindow": { "trigger": "hoursSinceLastPlayed", "matchCount": 1, "wins": 1, "mmrBefore": 1500, "mmr": 1663.9483363044524, "ratingDeviation": 294.6523787689481, "volatility": 0.05999967537233814, "closed": false } // ... } ``` `ratingWindow` carries `trigger`, `matchCount`, `wins`, `mmrBefore`, `mmr`, `ratingDeviation`, `volatility` and `closed`. The row's `mmrChanges` shows the **stored** rating, so it reads no change until the match that closes the window. --- # Streak bonuses Page: https://inhouseranks.com/docs/guides/streak-bonuses A pool can give extra rating for win streaks, and take extra away for lose streaks. A bonus is added **on top of** the rating change the pool's rating system works out, after it has rated the match. It can be a fixed amount, or a multiple of that change. It works with Elo and Glicko-2. ## Set bonuses They go in the pool's `mmrConfig`, under `bonuses`, when you create the pool or later: ```bash curl -X POST https://api.inhouseranks.com/v1/pool/update \ -H "x-api-key: $INHOUSE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "poolId": "6b01eb7991a8d0c2e72af6c5", "mmrConfig": { "kind": "elo", "initialMmr": 1500, "bonuses": [ { "kind": "winStreak", "mmr": 5, "minStreak": 3, "maxStreak": 4 }, { "kind": "winStreak", "mmr": 10, "minStreak": 5 }, { "kind": "loseStreak", "mmrMultiplier": 1.5, "minStreak": 3, "tiesBreakStreaks": false } ] } }' ``` **`mmrConfig` replaces the pool's whole rating config.** Send all of it. With these settings, a player's third and fourth wins in a row each add 5 on top of the usual gain, and every win after that adds 10 until the streak ends. From the third loss in a row, each loss costs one and a half times what it normally would, and ties don't interrupt that count. | Field | Meaning | |---|---| | `kind` | `winStreak` or `loseStreak`. | | `mmr` | A fixed amount of rating, added as written. A negative value takes rating away: `-5` on a `loseStreak` bonus costs 5 more per loss, while `5` would soften each loss by 5. | | `mmrMultiplier` | Multiplies the rating change the match gave, in place of `mmr`. `1.5` makes a win gain, or a loss cost, half as much again. `0.5` halves it, and `0` cancels it. It must be 0 or more. | | `streak` | Pay only on a streak of exactly this length. | | `minStreak`, `maxStreak` | Pay on streaks from `minStreak` to `maxStreak`, both included. Leave either out for no limit on that side. | | `tiesBreakStreaks` | Whether a tie ends the streak this bonus counts. `true` (the default): win, win, tie, win is a 1-win streak. `false`: a tie neither ends nor extends it, so the same run is a 3-win streak. | Rules for the list: - **Each bonus sets `mmr` or `mmrMultiplier`**, not both. - **Each bonus sets `streak`, or `minStreak` and/or `maxStreak`**, not both. Lengths are 1 or more. - **Ranges can overlap. The first bonus in the list that fits pays**, and only that one, so put the more specific bonuses first. - **At most 50 bonuses.** A list that breaks a rule is refused with `400 Validation failed`. - **A match is rated with the settings it was created with**, like the rest of `mmrConfig`. ## How streaks count - **The streak includes the match being rated.** A player who has won twice in a row and wins again is on a 3-win streak, so a bonus for streak 3 pays on that match. - **A win bonus pays only on a win, and a lose bonus only on a loss.** A tie never pays. In a free-for-all, sole first place is a win, a shared first place is a tie, and every other place is a loss. - **Unranked matches don't count.** They pay nothing and leave the streak where it was. - **Each rating has its own streak.** A match played in a position moves the player's overall rating and that position's rating, and each is paid only when its own streak fits: `currentStreak`, or `streakIgnoringTies` for a bonus with `tiesBreakStreaks: false`, on its [stats block](https://inhouseranks.com/docs/api/objects#stats-block). - **A rating in a [rating window](https://inhouseranks.com/docs/guides/placement-matches) gets no bonus**, including on the match that closes the window. Its streak still counts, so the first match after the window can pay. ## What a match records Each player's `mmrChanges` entry has the bonus the match paid on that rating, and `after` includes it. Here Alice wins her third match in a row against Bob, who loses his third. Alice gets the fixed 5. Bob's loss is multiplied by 1.5, and his `mmr` is the extra rating that cost him: ```jsonc { "matchPlayers": [ { "mmrEntityId": "6b01eb7991a8d0c2e72af6c8", "mmrChanges": [ { "positionId": null, "multiplier": null, "advantage": null, "before": 1530.5304984710244, "after": 1548.6660950559597, "bonus": { "kind": "winStreak", "streak": 3, "mmr": 5, "mmrMultiplier": null } } ], "outcome": "win" // ... }, { "mmrEntityId": "6b01eb7991a8d0c2e72af6c9", "mmrChanges": [ { "positionId": null, "multiplier": null, "advantage": null, "before": 1467.6531892200974, "after": 1445.486869983019, "bonus": { "kind": "loseStreak", "streak": 3, "mmr": -7.388773079026123, "mmrMultiplier": 1.5 } } ], "outcome": "lose" // ... } ] // ... } ``` `bonus` is `null` when a match pays none. Its `mmr` is always the rating the bonus added, whichever kind of bonus it was, and `mmrMultiplier` is the multiplier used, or `null` for a fixed bonus. To show something like "+5 streak bonus" in your game, read it from here. The match's own team results (`match.result.teams[].calculations`) never include bonuses. --- # Import and migrate Page: https://inhouseranks.com/docs/guides/import-and-migrate Two ways to arrive with history. **Migrate** brings players over with the ratings they already have. **Import** replays old matches so Inhouse works the ratings out. | You have | Use | |---|---| | Players with ratings from your own system | [Migrate your players](#migrate-your-players) | | A log of past matches and no ratings | [Import match history](#import-match-history) | If you want both, migrate first. Import matches players by name, and migrating first gives each of those names an `mmrEntityExternalId`. ## Migrate your players Bring your players across with their current ratings and records instead of replaying history. They keep playing from where they are. ```bash curl -X POST https://api.inhouseranks.com/v1/user/migrate \ -H "x-api-key: $INHOUSE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "poolId": "6b01eb7991a8d0c2e72af67e", "players": [ { "mmrEntityExternalId": "alice", "name": "Alice", "stats": [{ "mmr": { "value": 1820 }, "wins": 30, "losses": 12 }] }, { "mmrEntityExternalId": "bob" } ] }' ``` ```jsonc { "poolId": "6b01eb7991a8d0c2e72af67e", "createdCount": 1, "updatedCount": 0, "skippedCount": 1, "players": [ { "mmrEntityExternalId": "alice", "userExternalId": "alice", "mmrEntityId": "6b01eb7991a8d0c2e72af682", "userId": "6b01eb7991a8d0c2e72af682", "status": "created" }, { "mmrEntityExternalId": "bob", "userExternalId": "bob", "mmrEntityId": "6b01eb7991a8d0c2e72af681", "userId": "6b01eb7991a8d0c2e72af681", "status": "skipped" } ] } ``` - **The pool must exist first.** `poolId` is required, and there is no default-pool fallback here. Create the pool with its `mmrConfig` and positions before you migrate. An unknown pool is `404 group-not-found`. - **Up to 1000 players per call.** Send more in several calls. - **Players that already exist are skipped**, so re-running a migration is safe. Send `"overwrite": true` to replace their stats with what you send, and their name if you send one. Overwrite replaces. It doesn't merge. - **All or nothing.** Every player is checked before anything is written. Any problem answers `400 invalid-migration` with one entry per bad row in `errors`. Unknown fields are refused, so a typo can't quietly migrate everyone at the starting rating. - **Migrating is free.** A migrated player counts toward your monthly players only once a match they're in is recorded. ### What to send for each player `stats` takes the shape `mmrEntity.stats[]` comes back in: one block per position, where the block without a `positionId` is the overall rating. Every field is optional, and a field you leave out takes the **pool's default**: | Field | Default when left out | |---|---| | `name` | The `mmrEntityExternalId`. | | `mmr.value` | The pool's `initialMmr`. | | `mmr.ratingDeviation`, `mmr.volatility` | The pool's Glicko-2 starting values. Glicko-2 only: an Elo pool refuses them. | | `mmr.lastRatedAt` | Unset. An ISO 8601 time, used for idle confidence decay. Glicko-2 only. | | `wins`, `losses`, `ties` | 0. | | `matchCount` | `wins` + `losses` + `ties`. | | `winStreak`, `loseStreak`, `currentStreak` | 0. Send any of them and the others are derived. `currentStreak` is signed: +3 is three wins, −3 three losses. | | `seasonStartWins`, `seasonStartMatchCount` | Unset, so the whole record counts toward this season. | Every player gets an overall block, sent or not. A block for a position is created only when you send it, and its `positionId` must be one of the pool's positions. A batch with a bad row writes nothing and says why: ```jsonc { "code": "invalid-migration", "message": "Nothing was migrated: 1 of 1 players are invalid. Fix them and send the batch again.", "errors": [ { "index": 0, "mmrEntityExternalId": "erin", "userExternalId": "erin", "code": "unknown-field", "field": "rating", "message": "Unknown field \"rating\". Allowed here: mmrEntityExternalId, name, stats." } ] } ``` ## Import match history One call records **and** rates many matches, oldest first. ```bash curl -X POST https://api.inhouseranks.com/v1/match/import \ -H "x-api-key: $INHOUSE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "poolId": "6b01eb7991a8d0c2e72af67e", "matches": [ { "playDate": "2024-05-01T19:30:00Z", "title": "Week 1", "players": [ { "name": "Alice", "placement": 1, "score": 21 }, { "name": "Bob", "placement": 2, "score": 17 } ] } ] }' ``` ```jsonc { "passedCount": 1, "failedCount": 0, "passed": [ { "index": 0, "matchId": "6b01eb7991a8d0c2e72af683", "playDate": "2024-05-01T19:30:00.000Z" } ], "failed": [] } ``` - **Each match is a free-for-all**: every player is their own team. A match is `{ playDate, title?, players }` with at least two players, and a player is `{ name, placement, score?, role? }`. `placement` decides the result. `score` and `role` only go into the player's caption. - **At most 1000 matches per call.** - **`ranked` defaults to `true` here**, unlike `/match/record`. - **It stops at the first match it can't record and still answers `200`.** Matches before it are in `passed` and kept. The failing one is in `failed` with its `code` (`over-plan-limit` or `player-in-queue`, for example), and every match after it is in `failed` as `not-processed`. Check `failedCount`. - **A body that's wrong in shape writes nothing**: `400 invalid-import`, with one `{index, code}` per bad match in `errors`. - **It bills like live play, in the current month.** Whatever a match's `playDate`, each imported match spends one of this month's matches and counts its players as this month's. ### Imported players have no id of yours **Players are matched by `name`, not `mmrEntityExternalId`.** An imported player is the rated user in the pool whose `name` is theirs. A name the pool doesn't have creates a rated user **with no `mmrEntityExternalId`**. That matters afterwards. Calls that name players by `mmrEntityExternalId` (`/match/record`, `/match/score`, `/v1/user/ratings`) can't reach that rated user. A later match by `mmrEntityExternalId` starts a second one, and each is billed as its own player. To keep rating imported players, create them first with `/v1/user/migrate`, with `name` set to the name you import them under. --- # Limits and billing Page: https://inhouseranks.com/docs/guides/limits What the API counts, where it stops you, and what each refusal means. ## Rate limits | Applies to | Limit | When you exceed it | |---|---|---| | Live keys, per live project | 100 requests a second, counted over 10 s (1,000 per 10 s), across everything made with that project's keys. | `429 rate-limited` | | Test keys, per test project | 20 requests per 10 s, 120 per minute and 5,000 per day, across everything made with that project's keys. On top of the per-IP limits. | `429 rate-limited` | | Everything else, per IP | Roughly 500 requests per 10 s and 1,500 per minute: calls made with a test key, and calls made with no key. | `429 rate-limited` | On a `429`, back off and honor the `Retry-After` header, in whole seconds. **Live keys are limited per project, not per address.** Your game servers can call from one address or from many: the project has the same 100 requests a second either way, and its calls don't count against the per-IP limit. Send the key in the `x-api-key` header. **The rate is set per organization: 100 requests a second unless yours has been changed.** It's counted over ten seconds, so a burst of several hundred calls in one second is fine as long as the ten seconds stay under 1,000. An organization can also have a limit per minute, per hour or per day. None is set by default. The `429`'s `message` says which limit you hit. Ask us if you need more. **Test keys are rate limited per test project, and far harder.** The limit is sized for development and CI, not for players. Live keys don't have it. - Windows are fixed and aligned to the clock, so the daily 5,000 resets at 00:00 UTC, and a live project's 1,000 every 10 seconds. - A refused request still counts. For a test key, retrying before `Retry-After` uses up the day's budget. ## Plan allowances **Plan allowances are monthly and reset on the 1st, UTC.** They apply to your live project only: test keys never count against them. There are two: | Allowance | Counts | Spent when | |---|---|---| | Matches per month | Every match written. | The match is **written**: `/match/record` of a new match, `/match/create`, a `/match/score` that opens one, each match of `/match/import`, and each lobby the matchmaker forms. | | Players per month | Distinct players who played at least one match that month. | A match they're in is **rated**: at once for a new match on `/match/record` or `/match/import`, and at `/match/record` for a match opened by `/match/create`, `/match/score` or the matchmaker. | Going over either answers `402 over-plan-limit`. Its `message` says which one ran out. - **Treat a `402` as "upgrade or wait", never as retryable.** Retries fail the same way until the month rolls over or the plan changes. - **Nothing was written or rated.** Players new to the pool may already exist as rated users at the starting rating, which is free. - **Enforcement is near-real-time, not exact.** Under load, usage can run a little past an allowance before `402`s begin. ### How players are counted - **A player is your own `mmrEntityExternalId`**, so the same person in several pools counts once, as long as you send the same `mmrEntityExternalId` in each. - **A player counts once a match they're in is recorded**, and only once per month however many they play. Creating pools and rated users is free. - **Players already counted this month don't count again**, in any pool. A match between them still goes through when the player allowance is full. One with a new player won't. - **A rated user with no `mmrEntityExternalId` counts on its own.** Those come from `/match/import`, or from before `mmrEntityExternalId` was required. Give it one in the portal. ### How matches are counted - **A match you create and then delete still counts.** The allowance is spent when the match is written, not when it's rated. - **Matchmaking spends matches.** Every lobby the matchmaker forms writes a pending match, which counts the moment it's formed. A lobby nobody plays still counts. - **`/queue/join` checks both allowances** before it queues a party. A queued match's players are only counted when the match is recorded, so `/match/record` can still refuse. - **`/match/import` bills in the current month**, whatever each match's `playDate`. A refusal partway through comes back in `failed` inside a `200`, not as a `402`. ## Size limits | What | Limit | |---|---| | Pools in a project | 50, the default pool included. Archived pools don't count. Ask us if you need more. | | Your ids: `mmrEntityExternalId`, `matchExternalId`, `partyExternalId` | 100 characters | | Pool `name`, player `name` | 50 characters | | Match `name` | 80 characters | | Match `description` | 300 characters | | Teams in a match | 100 | | Players in a team | 50 | | Players in a matchmaking lobby | 200 | | Parties waiting in a project's matchmaking queues | 5,000, across all its pools and rules. Ask us if you need more. | | A matchmaking rule's `maxQueueSeconds` | 3,600 (an hour) | | Players per `/v1/user/migrate` call | 1000 | | Matches per `/v1/match/import` call | 1000 | | Ids per `/v1/user/ratings` call | 100 | A 51st pool is `400 max-groups-reached`, whether it's created or restored from the archive. A `/queue/join` while 5,000 of the project's parties are waiting is `429 queue-full`. Unlike a rate limit, it isn't about how fast you call: room comes back as parties are matched, expire or leave, so retry after the `Retry-After` header. A party you stop waiting on stays in the queue until it expires, so take it out with `/queue/leave`. A string over its cap is `400 Validation failed`. One exception: an `mmrEntityExternalId` inside `matchResult` or `scores` isn't checked, so keep it under 100 characters yourself. A longer one can't be used with `/v1/user/create` or `GET /v1/pools?mmrEntityExternalId=`. --- # API reference Page: https://inhouseranks.com/docs/api Every endpoint takes your project API key and speaks JSON. This page covers what they all share. The pages after it list each endpoint with its parameters, a real request and response, and its errors. ## Requests - **Base URL:** `https://api.inhouseranks.com` - **Auth:** your API key in the `x-api-key` header. A key sent as `Authorization: Bearer …` is read as a session token and fails with `401 invalid-token`. - **POST:** a JSON object body with `Content-Type: application/json`. Send `{}` rather than an empty body. - **GET:** parameters go in the query string. ## Identifiers Everything has an id Inhouse gives it. A match, a player and a queue party can also have an id of your own. **A field's name says which one it takes.** `xId` is Inhouse's id, and `xExternalId` is yours. | | Inhouse's id | Your own id | |---|---|---| | A pool | `poolId` | none | | A match | `matchId` | `matchExternalId` | | A player | `mmrEntityId` | `mmrEntityExternalId` | | A queue party | `partyId` | `partyExternalId` | - **Use your own ids for matches, players and parties and you never have to store one of ours for them.** You set a match's when you record, score or create it, a party's when it joins the queue, and a player's the first time you name them. - **A pool has only Inhouse's id.** `poolId` is the `_id` that `POST /v1/pool/create` returns and `GET /v1/pools` lists. Keep it next to your own settings for that pool. - **Leave the pool out and the call goes to your default pool**, which every project has. On the GET routes with the pool in the path, that means dropping the segment: `GET /v1/pool`, `GET /v1/pool/rankings` and `GET /v1/pool/leaderboard`. The one exception is `/v1/user/migrate`, which has no default (`400 group-id-required`). - **A pool in a URL is its `poolId` too.** The `` segment of `GET /v1/pool/`, `.../rankings` and `.../leaderboard` is the same id. Those routes also take it as `?poolId=`. - **Every endpoint that takes `matchExternalId` also takes `matchId`.** Send one of the two. The tables on the following pages list only `matchExternalId`. For players, each table lists the fields its endpoint takes. - **Neither field takes the other kind of id.** An Inhouse id is 24 hex characters. Anything else sent as `poolId` is `400 invalid-pool-id`, and your own id sent as `matchId` or `mmrEntityId` is a `400` whose message names the field it belongs in. An Inhouse id sent as an `...ExternalId` is taken for an id of yours: usually a `404`, and on a call that creates what it names, the new match's or player's own id. When both fields are sent, Inhouse's id is the one used. - **A matchmaking rule, a position and a region have one id each, the one you gave them** when you set them up: `matchmakingRuleId`, a player's `positionIds` and a party's `regionIds`. - **Your own ids are at most 100 characters.** - **On an object, Inhouse's id is `_id` and yours is `externalId`.** A player is a rated user, an `mmrEntity`, which is why the two fields that name one are `mmrEntityId` and `mmrEntityExternalId`. A request, a reply, an event and a stored match all use those names, so a `matchResult` you read can be sent back as it is. Those two ids also have shorter names: see the next section. ### A player's ids also have user names `userId` is another name for `mmrEntityId`, and `userExternalId` another name for `mmrEntityExternalId`. Use whichever reads better in your code. | A player's id | Name | Also called | |---|---|---| | Inhouse's | `mmrEntityId` | `userId` | | Yours | `mmrEntityExternalId` | `userExternalId` | - **A request takes either name** wherever it names a player: in a `matchResult`, in `scores`, in the `players` you queue or migrate, and on the calls that create, correct or rename one. `GET /v1/user/ratings` takes `userExternalIds` as well as `mmrEntityExternalIds`, and `GET /v1/pools` takes `userExternalId`. Send one name per id. The same value under both is fine, and two different values are `400 conflicting-player-ids`. - **A reply has both, with the same value, and so does every event.** Wherever there is an `mmrEntityId` there is a `userId` beside it, and wherever there is an `mmrEntityExternalId`, a `userExternalId`, at any depth. A list of your ids, such as the players a `409 player-in-queue` names, comes as `userExternalIds` too. These pages use the mmrEntity names. Most examples cut the user names, as fields a `...` stands for, and an example printed whole shows them. A match player row, cut to its ids: ```jsonc { "mmrEntityId": "6af2c0c9e1b84a3f9d5e7c21", "userId": "6af2c0c9e1b84a3f9d5e7c21", "mmrEntityExternalId": "alice", "userExternalId": "alice" // ... } ``` - **The rated user itself comes once**, as `mmrEntity`, with its own ids as `_id` and `externalId`. - **`userId` is Inhouse's id, never yours.** Your own id for a player is `userExternalId`. A `userId` that isn't an Inhouse id is `400 invalid-mmr-entity-id`, and its message says where your id goes. (Before 18 November 2026 `userId` held your own id: see [Field names before 18 November 2026](#field-names-before-18-november-2026).) - **Where a call takes only one kind of id, send that kind.** Sent on its own, under either name, the other kind is refused, never read as the right one: `GET /v1/pools` filters by your own id only, so a `userId` there is `400 invalid-player-filter`, and `POST /v1/mmr_entities/update`, which takes only Inhouse's, answers a `userExternalId` alone with `400 Validation failed`. ## Responses Success is `2xx`, and the body **is** the payload: a flat JSON object with **no `data` envelope**. Read the documented key straight off the body. A pool's id is `body.group._id`, never `body.data.group._id`. Objects come back as the full stored document. Their fields are listed once, under [Objects](https://inhouseranks.com/docs/api/objects). ### A pool is also called a group Inhouse stores a pool as a group, and a reply shows it. **A pool's objects come back under their group names:** | In a reply | What it is | |---|---| | `group` | The pool. | | `groupRank`, `groupRanks` | A rating's rank band, and a pool's list of bands. | | `groupSeason` | The pool's season. | | `groupMembers` | Always empty: a pool has no members. | **A pool's id is sent under both names**, as a player's ids are (see [A player's ids also have user names](#a-players-ids-also-have-user-names)). Nothing else is. Wherever a reply has `groupId` it has `poolId` beside it, with the same value, at any depth: a rated user inside a match inside a list carries both. These pages use `poolId`, and in the examples `groupId` is one of the fields a `...` stands for. Three things have `poolId` only: - **What you send**. - **An event's own fields**: a `match.found` has `poolId` and no `groupId`. The rated users inside an event carry both, as they do in a reply. - **A few fields that never had a group name**: the `poolId` at the top of a leaderboard, a ratings or a queue-stats reply. (`GET /v1/pools` also answers its list as `pools`.) The settings you send when you create or update a pool have group names too: `groupConfig`, with `groupRanks` in it. ## Errors A failure is a non-2xx status with a stable, machine-readable `code` at the top level of the body: ```jsonc { "code": "invalid-api-key" } ``` Many also carry a `message` for the person reading the logs. Branch on `code`, never on `message`: ```jsonc { "code": "match-already-recorded", "message": "This match is already recorded, and a recorded match never changes. Record a new match under a new matchExternalId." } ``` Three failure bodies carry `error` instead of `code`: | Status | Body | When | |---|---|---| | 400 | `{"error": "Validation failed", "issues": [...]}` | The body or query failed schema validation: a missing required field, a wrong type, a string over its cap, an id that must be 24 hex characters, or a `matchResult` that isn't the documented shape. Each issue's `path` names the field. | | 400 | `{"error": "Invalid JSON"}` | The body isn't a JSON object. | | 500 | `{"error": "Internal server error"}` | Something failed on our side. | ```jsonc { "error": "Validation failed", "issues": [ { "message": "Expected a boolean value", "type": "type_error", "path": "ranked", "value": "yes" } ] } ``` ### Errors any endpoint can return | Status | `code` | Meaning and what to do | |---|---|---| | 400 | `renamed-field` | You sent a field under a name it had before 18 November 2026. `field` is what you sent and `renamedTo` is its name now. See [Field names before 18 November 2026](#field-names-before-18-november-2026). | | 400 | `conflicting-player-ids` | You sent one of a player's ids under both of its names, with two different values: `userId` and `mmrEntityId`, or `userExternalId` and `mmrEntityExternalId`. `field` is the user name. Send one of them. See [user names](#a-players-ids-also-have-user-names). | | 400 | `invalid-mmr-entity-id` | With `"field": "userId"`: a `userId` that isn't an Inhouse id (24 hex characters). `userId` is Inhouse's id for a player; your own goes in `userExternalId`. | | 401 | `no-auth-header` | No `x-api-key` header. Without a key, a GET is treated as anonymous and can instead answer `400 group-id-required`, `401 auth-required` or a `404`. | | 401 | `invalid-api-key` | Unknown, revoked or archived key. Don't retry. | | 402 | `over-plan-limit` | Your plan can't take this. `message` says which monthly allowance ran out. Not retryable: see [Plan allowances](https://inhouseranks.com/docs/guides/limits#plan-allowances). | | 403 | `unauthorized-action` | You named a pool, match, rated user or party by Inhouse's id, and it belongs to another project. A key reaches only its own project's pools. | | 403 | `api-key-not-allowed` | A portal or consumer-app endpoint that an API key can't call. `message` says what to use instead. | | 400 | `invalid-pool-id` | A `poolId`, in a body, a query or a URL, that isn't an Inhouse id (24 hex characters). A pool has no id of your own: send the `_id` that `/v1/pool/create` returned, or that `GET /v1/pools` lists. | | 404 | `group-not-found` | No such pool: a `poolId` that doesn't exist. | | 429 | `rate-limited` | Back off and honor the `Retry-After` header. See [Rate limits](https://inhouseranks.com/docs/guides/limits#rate-limits). | | 5xx | none | Usually transient: retry with backoff. POSTs are not idempotent, so on an ambiguous failure read state back before sending again. For `/match/record`, see [Retry safely](https://inhouseranks.com/docs/guides/matches#retry-safely). | Each endpoint lists the errors specific to it. All of them, in one place, are under [Errors](https://inhouseranks.com/docs/api/errors). ## Pagination Lists don't page the same way. **`GET /v1/match/list` starts at page 0**, and every other numbered list starts at page 1. | Endpoint | First page | Page size | Also returns | |---|---|---|---| | `GET /v1/match/list` | `page=0` | 10 | `pageSize`, `totalCount`, `hasMore` | | `GET /v1/pools` | `page=1` | 25 | `pageSize`, `totalCount`, `hasMore` | | `GET /v1/pool/rankings` | `page=1` | 25 | `page` only. A full page means "ask for the next one". | | `GET /v1/pool/leaderboard` | `page=1` | `pageSize` 1–100, default 25 | `pageSize`, `totalCount`, `hasMore`. Stops at rank 100. | | `GET /v1/projects/webhook/deliveries` | no page: a cursor | `limit` 1–100, default 25 | `next`: pass it as `before` for the next page. | Sending `page=1` to `match/list` silently returns the *second* page, skipping the 10 newest matches. The bug looks like missing data, not an error. On a numbered list, a `page` that isn't a whole number from the list's first page up is `400 invalid-pagination`. ## About the examples Every request and response on these pages is real: captured from a test project. Responses are shortened for reading. A `...` comment marks where fields were left out (`// ...`, or `/* ... */` inside a short object), and `// ... 2 more` where a list was cut. The full objects are under [Objects](https://inhouseranks.com/docs/api/objects). The ids a server makes up for teams are shown as `` and ``. ## Endpoints **Pools** | Call | | |---|---| | `POST /v1/pool/create` | [Create a pool](https://inhouseranks.com/docs/api/pools#create-a-pool) | | `GET /v1/pool/`, `GET /v1/pool` | [Get a pool](https://inhouseranks.com/docs/api/pools#get-a-pool) | | `GET /v1/pools` | [List pools](https://inhouseranks.com/docs/api/pools#list-pools) | | `POST /v1/pool/update` | [Update a pool](https://inhouseranks.com/docs/api/pools#update-a-pool) | | `POST /v1/pool/season/end` | [End a season](https://inhouseranks.com/docs/api/pools#end-a-season) | **Players** | Call | | |---|---| | `POST /v1/user/create` | [Create a player](https://inhouseranks.com/docs/api/players#create-a-player) | | `GET /v1/user/ratings` | [Get players' ratings](https://inhouseranks.com/docs/api/players#get-players-ratings) | | `POST /v1/user/update-rating` | [Correct a rating](https://inhouseranks.com/docs/api/players#correct-a-rating) | | `POST /v1/mmr_entities/update` | [Rename or archive a player](https://inhouseranks.com/docs/api/players#rename-or-archive-a-player) | | `POST /v1/user/migrate` | [Migrate players](https://inhouseranks.com/docs/api/players#migrate-players) | **Leaderboards** | Call | | |---|---| | `GET /v1/pool//leaderboard`, `GET /v1/pool/leaderboard` | [Get the top 100](https://inhouseranks.com/docs/api/leaderboards#get-the-top-100) | | `GET /v1/pool//rankings`, `GET /v1/pool/rankings` | [List rankings](https://inhouseranks.com/docs/api/leaderboards#list-rankings) | **Matches** | Call | | |---|---| | `POST /v1/match/record` | [Record a match](https://inhouseranks.com/docs/api/matches#record-a-match) | | `POST /v1/match/score` | [Score a match](https://inhouseranks.com/docs/api/matches#score-a-match) | | `POST /v1/match/create` | [Create a pending match](https://inhouseranks.com/docs/api/matches#create-a-pending-match) | | `POST /v1/match/update` | [Update a match](https://inhouseranks.com/docs/api/matches#update-a-match) | | `POST /v1/match/delete` | [Delete a match](https://inhouseranks.com/docs/api/matches#delete-a-match) | | `GET /v1/match/get` | [Get a match](https://inhouseranks.com/docs/api/matches#get-a-match) | | `GET /v1/match/list` | [List matches](https://inhouseranks.com/docs/api/matches#list-matches) | | `POST /v1/match/import` | [Import matches](https://inhouseranks.com/docs/api/matches#import-matches) | **Matchmaking** | Call | | |---|---| | `POST /v1/queue/join` | [Join the queue](https://inhouseranks.com/docs/api/matchmaking#join-the-queue) | | `POST /v1/queue/leave` | [Leave the queue](https://inhouseranks.com/docs/api/matchmaking#leave-the-queue) | | `GET /v1/queue/stats` | [Queue stats](https://inhouseranks.com/docs/api/matchmaking#queue-stats) | | `GET /v1/projects/webhook/deliveries` | [List webhook deliveries](https://inhouseranks.com/docs/api/matchmaking#list-webhook-deliveries) | ## Field names before 18 November 2026 Until then a pool was named `groupId`, by Inhouse's id or by an id of your own. `matchId` and `userId` took your own ids, and Inhouse's ids went in fields ending in `Mid`. The old names are gone: a request that still uses one is refused, never read some other way. One came back with a new meaning: since 20 November 2026 `userId` is Inhouse's id for a player, another name for `mmrEntityId` (see [user names](#a-players-ids-also-have-user-names)). Your own id sent there is refused. | Before | Now | |---|---| | `groupMid`, or `groupId` with Inhouse's id | `poolId` | | `groupId` with your own id for the pool | `poolId`, with the pool's `_id`. A pool no longer has an id of your own: see [below](#moving-a-pool-to-its-poolid). | | `groupId` on `POST /v1/pool/create` | Removed. | | Your own id for a pool in a URL (`/v1/pool/ranked-1v1`) | `/v1/pool/` | | `matchMid` | `matchId` | | `matchId` with your own id | `matchExternalId` | | `mmrEntityMid` | `mmrEntityId` | | `userId` with your own id | `mmrEntityExternalId`, or `userExternalId`. `userId` is Inhouse's id now: see [user names](#a-players-ids-also-have-user-names). | | `userIds` on `GET /v1/user/ratings` | `mmrEntityExternalIds`, or `userExternalIds` | | `userId` on `GET /v1/pools` | `mmrEntityExternalId`, or `userExternalId` | | `externalId` on `/v1/queue/join` and `/v1/queue/leave` | `partyExternalId` | | `ruleId` on `/v1/queue/join` and `GET /v1/queue/stats` | `matchmakingRuleId` | | `positions` on a player in `/v1/queue/join` | `positionIds` | | `POST /v1/groups/update`, `POST /v1/groups/season/end` | `POST /v1/pool/update`, `POST /v1/pool/season/end`. The old paths still answer. | Responses and events changed too: | Before | Now | |---|---| | `group`, `groupRank`, `groupRanks`, `groupSeason`, `groupMembers` in a reply | Unchanged. | | `groupId` in a reply | Still there, and also sent as `poolId`: see [A pool is also called a group](#a-pool-is-also-called-a-group). | | `groupId` in a `match.found`, `party.expired` or `party.cancelled` event | `poolId` | | `groupExternalId` in a `match.found` event | Removed. | | `ruleId` in an event, on a party, in `GET /v1/queue/stats` and on a match's `matchmaking` | `matchmakingRuleId` | | `positions` on a player in a party or a `match.found` event | `positionIds` | | `userId` in a ratings row, a leaderboard row, a party's player | `mmrEntityExternalId`, also sent as `userExternalId` | | `userId` on a match's `constituents` | `mmrEntityExternalId`, also sent as `userExternalId` | | `userId` on a row of `matchPlayers` | It held the same id as `mmrEntityId`, and since 20 November 2026 it does again: it is `mmrEntityId`'s user name, sent beside it. A row now has `mmrEntityExternalId` and `userExternalId` too. | | `externalId` on a party in a `match.found`, `party.expired` or `party.cancelled` event | `partyExternalId` | | `userId` in a `/v1/user/migrate` result row | `mmrEntityExternalId`, also sent as `userExternalId`. Its `mmrEntityId` is unchanged. | | `userIds` in a `409 player-in-queue` | `mmrEntityExternalIds`, also sent as `userExternalIds` | | `recentMatches` on a rated user | Removed. A pool's matches are under `GET /v1/match/list`. | A refusal names the field you sent and the one to send instead: ```jsonc { "code": "renamed-field", "field": "groupId", "renamedTo": "poolId", "message": "\"groupId\" is now \"poolId\". Send \"poolId\" instead." } ``` What a request with an old name gets: - A `...Mid` field, `groupId` wherever a pool is named, `externalId` or `ruleId` on a queue call, `userIds`, or a player's `positions` under a rule with positions: `400 renamed-field`. - `groupId` or `poolId` on `/v1/pool/create`: `400 removed-field`. - Your own id for a pool in `poolId`, or in a URL: `400 invalid-pool-id`. - Your own id in `matchId` or `mmrEntityId`: `400 Validation failed`, with a message naming the field it goes in. On a player inside a `matchResult` or `scores` it is `400 invalid-mmr-entity-id`. - Your own id in `userId`, anywhere, a player in a `matchResult`, `scores`, `/v1/queue/join` or `/v1/user/migrate` included: `400 invalid-mmr-entity-id`, with `"field": "userId"` and a message saying your id goes in `userExternalId`. Since 20 November 2026 `userId` is Inhouse's id, the user name of `mmrEntityId`. ### Moving a pool to its poolId If your calls named a pool by an id of your own, they now need its `_id`. Call `GET /v1/pools` once: each pool that had an id of yours still shows it as `externalId`, beside the `_id` to send as `poolId` from now on. Your default pool's `externalId` is `_default_`, and it needs no `poolId` at all: leave the field out. ## Older paths These still answer, for integrations that already use them. New code should use the paths above. | Older path | Same as | |---|---| | `POST /v1/groups/create` | `POST /v1/pool/create` | | `POST /v1/groups/update` | `POST /v1/pool/update` | | `POST /v1/groups/season/end` | `POST /v1/pool/season/end` | | `GET /v1/groups/` | `GET /v1/pool/` | | `POST /v1/mmr_entities/create` | `POST /v1/user/create` | | `GET /v1/mmr_entities/` | `GET /v1/pool//rankings` | | `/v1/matches/...` | `/v1/match/...` | --- # Pools Page: https://inhouseranks.com/docs/api/pools A pool is an independent set of ratings. Every project already has a default pool, so these calls are optional. For when and why, see [Pools and players](https://inhouseranks.com/docs/guides/pools). ## Create a pool `POST /v1/pool/create` Creates a pool with its game and first season. The pool starts with the `ranked-1v1` [matchmaking rule](https://inhouseranks.com/docs/api/objects#matchmaking-rule) unless you send your own. **Body parameters** | Field | Type | Required | Description | |---|---|---|---| | `name` | string | yes | Display name, at most 50 characters. | | `kind` | string | yes | `friends`, `community` or `competitive`. | | `groupConfig` | object | yes | Send `{}`, or `{ rankMode, groupRanks }` to set [rank bands](https://inhouseranks.com/docs/guides/rank-bands). | | `mmrConfig` | object | no | Rating settings. Defaults to Elo starting at 1500. See [Use Glicko-2 or another starting rating](https://inhouseranks.com/docs/guides/pools#use-glicko-2-or-another-starting-rating). | | `matchmakingRules` | array | no | The pool's [matchmaking rules](https://inhouseranks.com/docs/api/objects#matchmaking-rule). `[]` creates the pool with none. | | `matchmakingRegionIds` | array | no | The [regions](https://inhouseranks.com/docs/guides/matchmaking#regions) the pool's queues match in, in place of the project's, as `["eu-west", "us-east"]`. `[]` turns regions off for the pool. Left out, the pool uses the project's. A rule's own `regionIds` overrides both. | | `gameConfig` | object | no | `{ teams, positions, winCondition }`. `winCondition` is `mostPoints` (default) or `leastPoints`. | | `gameName` | string | no | The name of the pool's game. Defaults to `name`. | | `thumbnail` | string | no | An image URL. | | `id` | string | no | The id (24 hex characters) for Inhouse to create the pool with, instead of a generated one. It becomes the pool's `_id`, its `poolId`. | **Request** ```bash curl -X POST https://api.inhouseranks.com/v1/pool/create \ -H "x-api-key: $INHOUSE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Ranked 1v1", "kind": "community", "groupConfig": {} }' ``` **Response** `200` ```jsonc { "group": { "_id": "6b01eb7991a8d0c2e72af67e", "kind": "community", "mmrConfig": { "kind": "elo", "initialMmr": 1500, "elo": { "kFactor": { "priority": "mmr", "mmrRanges": [ { "min": 0, "max": 1500, "value": 36 }, { "min": 1500, "max": 2500, "value": 32 }, { "min": 2500, "max": null, "value": 24 } ], "matchCountRanges": [] }, "scaleFactor": 400, "exponentBase": 10 }, "glicko2": null, "hideRatingUnderMatchCount": null, "hideRatingUnderWinCount": null, "bonuses": [] }, "name": "Ranked 1v1", "description": null, "archived": null, "config": { "trackMode": "solo", "rankMode": null, "groupRanks": [] }, "projectId": "6b01eb7991a8d0c2e72af669", "organizationId": "6b01eb7991a8d0c2e72af668", "matchmakingRules": [ { "id": "ranked-1v1", "default": true, "minTeams": 2, "maxTeams": 2, "targetTeams": 2, "minPlayersPerTeam": 1, "maxPlayersPerTeam": 1, "targetPlayersPerTeam": 1, "maxPartySize": 1, "initialSkillGap": 100, "skillGapGrowthPerSecond": 10, "maxSkillGap": 400, "skillGapOpenedBy": "longestWait", "waitWeight": 0.5, "lobbyOptionsPerParty": 3, "relaxLobbySizeAfterSeconds": null, "maxTeamWinProbability": null, "maxQueueSeconds": 300, "teamPositions": null, "minPositionsPerPlayer": null, "regionIds": null } ], "matchmakingRegionIds": null // ... }, "game": { "_id": "6b01eb7991a8d0c2e72af67f", "name": "Ranked 1v1", "gameConfig": { "teams": {}, "positions": {}, "winCondition": "mostPoints" } // ... }, "groupSeason": { "_id": "6b01eb7991a8d0c2e72af680", "poolId": "6b01eb7991a8d0c2e72af67e", "value": 1, "startDate": "2026-11-21T19:05:29.635849Z", "endDate": null // ... } } ``` | Key | Contains | |---|---| | `group` | The [pool](https://inhouseranks.com/docs/api/objects#pool). **Keep `group._id`**: it's the `poolId` every other call names this pool by. A pool has no id of your own. | | `game` | The pool's game, holding its `gameConfig`. | | `groupSeason` | The pool's first [season](https://inhouseranks.com/docs/api/objects#season). | A pool's objects have group names in a reply. See [A pool is also called a group](https://inhouseranks.com/docs/api#a-pool-is-also-called-a-group). **Errors** | Status | `code` | When | |---|---|---| | 400 | `project-pools-must-be-solo` | `groupConfig.trackMode` is `"team"`. Pools rate individuals: leave it out. | | 400 | `removed-field` | You sent `groupId` or `poolId`. A pool no longer takes an id of your own: leave the field out, and name the pool by the `_id` this call returns. | | 400 | `max-groups-reached` | The project already has 50 pools, the [most a project can have](https://inhouseranks.com/docs/guides/limits#size-limits). Archive one you no longer use. `message` has the count and the limit. | | 400 | `invalid-matchmaking-rule` | A rule is inconsistent or too big, or its `regionIds` isn't a valid list of regions. `message` names the rule and the constraint. | | 400 | `invalid-matchmaking-regions` | `matchmakingRegionIds` isn't a valid list of regions: a bad id, a region listed twice, or more than 20. `message` names the problem. | | 400 | `group-ranks-…` | With `"rankMode": "rank"`, the bands don't cover every rating exactly once. See [the codes](https://inhouseranks.com/docs/api/errors#pools). | | 400 | none | `Validation failed`: a missing or mistyped field, or a `glicko2.tau` outside 0.2–1.2. | ## Get a pool `GET /v1/pool/` `GET /v1/pool` Returns a pool and **every** active rated user, unpaged. For a big pool, read a [leaderboard](https://inhouseranks.com/docs/api/leaderboards) instead. **Parameters** | Parameter | In | Required | Description | |---|---|---|---| | `poolId` | path | no | The pool's id. Leave the segment out for the default pool. | | `poolId` | query | no | The same id, as a query parameter instead. | **Request** ```bash curl https://api.inhouseranks.com/v1/pool/6b01eb7991a8d0c2e72af67e \ -H "x-api-key: $INHOUSE_API_KEY" ``` **Response** `200` ```jsonc { "group": { "_id": "6b01eb7991a8d0c2e72af67e", "kind": "community", "name": "Ranked 1v1", "projectId": "6b01eb7991a8d0c2e72af669" // ... }, "groupMembers": [], "mmrEntities": [ { "_id": "6b01eb7991a8d0c2e72af681", "name": "Bob", "stats": [ { "positionId": null, "mmr": { "value": 1500 /* ... */ }, "wins": 0, "losses": 0, "ties": 0, "matchCount": 0, "groupRank": null, "hideRating": false // ... } ], "externalId": "bob" // ... } ], "game": { "_id": "6b01eb7991a8d0c2e72af67f", "name": "Ranked 1v1", "gameConfig": { "teams": {}, "positions": {}, "winCondition": "mostPoints" } // ... } } ``` | Key | Contains | |---|---| | `group` | The [pool](https://inhouseranks.com/docs/api/objects#pool). | | `groupMembers` | Always `[]`. A pool has no members: its players are the rated users in `mmrEntities`. | | `mmrEntities` | Every active [rated user](https://inhouseranks.com/docs/api/objects#rated-user). Here each element is the rated user itself, unlike `/rankings`. | | `game` | The pool's game. | **Errors** Only the [common errors](https://inhouseranks.com/docs/api#errors-any-endpoint-can-return): `400 invalid-pool-id` for a `poolId` that isn't an Inhouse id, `404 group-not-found` for one that names no pool, and `403 unauthorized-action` for another project's pool. ## List pools `GET /v1/pools` Lists your **organization's** pools, test and live, sorted by name, 25 per page. **Parameters** | Parameter | In | Required | Description | |---|---|---|---| | `mmrEntityExternalId` or `userExternalId` | query | no | Only the pools this player is rated in: your own id for them. An unknown id returns an empty list, never the unfiltered one. | | `projectId` | query | no | Only this project's pools. | | `search` | query | no | Matches the pool's name, ignoring case. | | `archived` | query | no | `true` includes archived pools, which are otherwise left out. | | `page` | query | no | Starts at 1. | The filters combine, and `totalCount` and `hasMore` describe the filtered list. **Request** ```bash curl https://api.inhouseranks.com/v1/pools \ -H "x-api-key: $INHOUSE_API_KEY" ``` **Response** `200` ```jsonc { "pools": [ { "_id": "6b01eb7991a8d0c2e72af687", "kind": "competitive", "name": "Arena", "projectId": "6b01eb7991a8d0c2e72af669", "externalId": null // ... }, { "_id": "6b01eb7991a8d0c2e72af66b", "kind": "community", "name": "Default", "projectId": "6b01eb7991a8d0c2e72af669", "externalId": "_default_" // ... }, { "_id": "6b01eb7991a8d0c2e72af67e", "kind": "community", "name": "Ranked 1v1", "projectId": "6b01eb7991a8d0c2e72af669", "externalId": null // ... } ], "page": 1, "pageSize": 25, "totalCount": 3, "hasMore": false } ``` `externalId` is `_default_` on your default pool, and `null` on any other. A pool created before 18 November 2026 may still show the id you gave it then. No call takes that id any more: send the pool's `_id` as `poolId` ([Moving a pool to its poolId](https://inhouseranks.com/docs/api#moving-a-pool-to-its-poolid)). **Errors** | Status | `code` | When | |---|---|---| | 400 | `invalid-pagination` | `page` isn't a whole number from 1 up. | | 400 | `invalid-player-filter` | You sent `userId` or `mmrEntityId`, Inhouse's id for a player. The list is filtered by your own id only. | | 400 | `invalid-mmr-entity-id` | A `userId` that isn't an Inhouse id: your own id goes in `userExternalId`. | ## Update a pool `POST /v1/pool/update` Changes a pool's name, settings, rank bands, matchmaking rules, regions or game. Changes apply from now on: existing ratings keep their values. **Body parameters** | Field | Type | Required | Description | |---|---|---|---| | `poolId` | string | no | The pool. Defaults to the default pool. | | `name` | string | no | Display name, at most 50 characters. | | `description` | string | no | A description of the pool. | | `kind` | string | no | `friends`, `community` or `competitive`. | | `thumbnail` | string | no | An image URL. | | `archived` | boolean | no | `true` archives the pool, `false` restores it. An archived pool doesn't count toward the project's [50 pools](https://inhouseranks.com/docs/guides/limits#size-limits), so restoring one needs room. | | `mmrConfig` | object | no | **Replaces the whole rating config.** Where [hidden ratings](https://inhouseranks.com/docs/guides/hidden-ratings), [rating windows](https://inhouseranks.com/docs/guides/placement-matches) and [streak bonuses](https://inhouseranks.com/docs/guides/streak-bonuses) are set. | | `groupConfig` | object | no | **Replaces the whole config.** Where [rank bands](https://inhouseranks.com/docs/guides/rank-bands) are set. | | `matchmakingRules` | array | no | **Replaces the whole list.** `null` clears it. Parties queued under a rule that disappears are cancelled, each with a `party.cancelled` event whose `reason` is `rule-removed`. | | `matchmakingRegionIds` | array | no | **Replaces the pool's [regions](https://inhouseranks.com/docs/guides/matchmaking#regions).** `null` clears them, so the pool uses the project's again. `[]` turns regions off for the pool. A rule's own `regionIds` overrides both. A waiting party none of whose regions is left is cancelled, with a `party.cancelled` event whose `reason` is `region-removed`. | | `gameConfig` | object | no | **Replaces the game config**, such as `winCondition`, for matches opened after it. | | `gameName` | string | no | Renames the pool's game. | **Request** ```bash curl -X POST https://api.inhouseranks.com/v1/pool/update \ -H "x-api-key: $INHOUSE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "groupConfig": { "rankMode": "rank", "groupRanks": [ { "rank": "Gold", "lower": 1500, "upper": null, "image": "https://assets.example.com/ranks/gold.png" }, { "rank": "Silver", "lower": 1000, "upper": 1500, "tier": 2 }, { "rank": "Bronze", "lower": null, "upper": 1000 } ] } }' ``` **Response** `200` ```jsonc { "group": { "_id": "6b01eb7991a8d0c2e72af66b", "name": "Default", "config": { "rankMode": "rank", "groupRanks": [ { "lower": 1500, "upper": null, "rank": "Gold", "tier": null, "image": "https://assets.example.com/ranks/gold.png" }, { "lower": 1000, "upper": 1500, "rank": "Silver", "tier": 2, "image": null }, { "lower": null, "upper": 1000, "rank": "Bronze", "tier": null, "image": null } ] } // ... } } ``` `group` is the updated [pool](https://inhouseranks.com/docs/api/objects#pool). Bands come back ordered from the highest down, as `config.groupRanks`. You send them as `groupConfig.groupRanks`: the settings you send keep those names. **Errors** | Status | `code` | When | |---|---|---| | 400 | `invalid-matchmaking-rule` | A rule is inconsistent or too big, or its `regionIds` isn't a valid list of regions. `message` names the rule and the constraint. | | 400 | `invalid-matchmaking-regions` | `matchmakingRegionIds` isn't a valid list of regions: a bad id, a region listed twice, or more than 20. `message` names the problem. | | 400 | `group-ranks-…` | With `"rankMode": "rank"`, the bands don't cover every rating exactly once. See [the codes](https://inhouseranks.com/docs/api/errors#pools). | | 400 | `max-groups-reached` | `archived: false` on an archived pool, when the project already has 50 pools. The pool stays archived. | | 400 | none | `Validation failed`: a mistyped field, or a setting out of its range. | ## End a season `POST /v1/pool/season/end` Ends the pool's season and starts the next. **Every player's rating resets**, and their record is kept. See [End a season](https://inhouseranks.com/docs/guides/pools#end-a-season). **Body parameters** | Field | Type | Required | Description | |---|---|---|---| | `poolId` | string | no | The pool. Defaults to the default pool. | | `resetSkillRating` | number | no | The rating every player starts the new season with. Defaults to the pool's `initialMmr`. | | `resetRatingDeviation` | number | no | Glicko-2 only: the RD every player starts with, 40 or more. Defaults to the pool's `initialRatingDeviation`. | **Request** ```bash curl -X POST https://api.inhouseranks.com/v1/pool/season/end \ -H "x-api-key: $INHOUSE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "poolId": "6b01eb7991a8d0c2e72af67e" }' ``` **Response** `200` ```jsonc { "endedSeason": { "_id": "6b01eb7991a8d0c2e72af680", "poolId": "6b01eb7991a8d0c2e72af67e", "value": 1, "startDate": "2026-11-21T19:05:29.635849Z", "endDate": "2026-11-21T19:05:29.675365Z", "mmrEntities": [ { "_id": "6b01eb7991a8d0c2e72af682", "name": "Alice", "stats": [ { "positionId": null, "mmr": { "value": 1824.3778204353027 /* ... */ }, "wins": 31, "losses": 12, "ties": 0, "matchCount": 43, "groupRank": null, "hideRating": false // ... } ], "externalId": "alice" // ... } // ... 1 more ] // ... }, "currentSeason": { "_id": "6b01eb7991a8d0c2e72af686", "poolId": "6b01eb7991a8d0c2e72af67e", "value": 2, "startDate": "2026-11-21T19:05:29.675365Z", "endDate": null // ... } } ``` | Key | Contains | |---|---| | `endedSeason` | The [season](https://inhouseranks.com/docs/api/objects#season) that just ended. Its `mmrEntities` is every rated user as they stood before the reset, archived ones included. | | `currentSeason` | The new season. | **Errors** | Status | `code` | When | |---|---|---| | 400 | `invalid-reset-rating-deviation` | `resetRatingDeviation` is below 40. | | 409 | `season-already-ended` | Another call ended this season first. Don't send it again unless you mean to end the new season too. | | 409 | `rating-update-conflict` | Matches kept being recorded for the same players while the season ended. Nothing changed. Send it again. | --- # Players Page: https://inhouseranks.com/docs/api/players A player in a pool is a **rated user**: `mmrEntity` in responses. You name a player by `mmrEntityExternalId`, your own id for them, or by `mmrEntityId`, which is Inhouse's (the rated user's `_id`). Their user names, `userExternalId` and `userId`, work anywhere the tables below list those, and a response has both ([user names](https://inhouseranks.com/docs/api#a-players-ids-also-have-user-names)). See [Pools and players](https://inhouseranks.com/docs/guides/pools#add-players-ahead-of-time). ## Create a player `POST /v1/user/create` Creates a rated user at the pool's starting rating. **Optional**: a player is created anyway the first time a recorded match names their `mmrEntityExternalId`. Use it to set a display name, or to put a player in a pool before their first match. The call is idempotent per `mmrEntityExternalId`. Calling it again with a `name` renames the player. **Body parameters** | Field | Type | Required | Description | |---|---|---|---| | `mmrEntityExternalId` or `userExternalId` | string | yes | Your id for the player, at most 100 characters. | | `name` | string | no | Display name, at most 50 characters. Defaults to the `mmrEntityExternalId`. | | `poolId` | string | no | The pool. Defaults to the default pool. | **Request** ```bash curl -X POST https://api.inhouseranks.com/v1/user/create \ -H "x-api-key: $INHOUSE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "mmrEntityExternalId": "carol", "name": "Carol" }' ``` **Response** `200` ```jsonc { "mmrEntity": { "_id": "6b01eb7991a8d0c2e72af676", "archived": null, "name": "Carol", "poolId": "6b01eb7991a8d0c2e72af66b", "stats": [ { "positionId": null, "mmr": { "value": 1500, "ratingDeviation": null, "volatility": null, "lastRatedAt": null }, "wins": 0, "losses": 0, "ties": 0, "matchCount": 0, "winStreak": 0, "currentStreak": 0, "loseStreak": 0, "streakIgnoringTies": null, "seasonStartWins": null, "seasonStartMatchCount": null, "lastPlayedAt": null, "groupRank": null, "hideRating": false } ], "externalId": "carol", "lastActiveMonth": null, "ratingWindowMmrs": [] // ... } } ``` `mmrEntity` is the [rated user](https://inhouseranks.com/docs/api/objects#rated-user). `mmrEntity.externalId` is the `mmrEntityExternalId` you sent, and `mmrEntity._id` is the player's `mmrEntityId`. **Errors** | Status | `code` | When | |---|---|---| | 400 | `user-id-required` | No `mmrEntityExternalId`. Every rated user needs your id for the player. | ## Get players' ratings `GET /v1/user/ratings` Returns the ratings and records of the players you name, in the order you asked. It never creates a player. **Parameters** | Parameter | In | Required | Description | |---|---|---|---| | `mmrEntityExternalIds` or `userExternalIds` | query | yes | Your ids for the players, comma-separated, at most 100. An id that contains a comma can't be asked for here. | | `poolId` | query | no | The pool. Defaults to the default pool. | **Request** ```bash curl "https://api.inhouseranks.com/v1/user/ratings?mmrEntityExternalIds=alice,bob,zoe" \ -H "x-api-key: $INHOUSE_API_KEY" ``` **Response** `200` ```jsonc { "poolId": "6b01eb7991a8d0c2e72af66b", "ratings": [ { "mmrEntityExternalId": "alice", "mmrEntity": { "_id": "6b01eb7991a8d0c2e72af66e", "name": "alice", "stats": [ { "positionId": null, "mmr": { "value": 1545.086633573829 /* ... */ }, "wins": 3, "losses": 0, "ties": 0, "matchCount": 3, "groupRank": null, "hideRating": false // ... } ], "externalId": "alice" // ... } // ... } // ... 1 more ], "missing": ["zoe"] } ``` | Key | Contains | |---|---| | `poolId` | Inhouse's id for the pool. | | `ratings` | One `{ mmrEntityExternalId, userExternalId, mmrEntity }` per player found, in the order asked. Repeated ids collapse to one row. | | `missing` | The ids with no rated user in this pool. A player rated only in another pool is `missing` here. | **Errors** | Status | `code` | When | |---|---|---| | 400 | `user-ids-required` | `mmrEntityExternalIds` is empty or missing. Name at least one player. | | 400 | `too-many-user-ids` | More than 100 ids. Split the batch. `message` names the limit and what you sent. | ## Correct a rating `POST /v1/user/update-rating` Sets a player's **overall** rating by hand: the stats block with `positionId: null`. Blocks for positions are untouched. Only the rating changes. On Glicko-2 the block keeps its rating deviation and volatility. An open [rating window](https://inhouseranks.com/docs/guides/placement-matches) on the block is closed. **Body parameters** | Field | Type | Required | Description | |---|---|---|---| | `mmrEntityExternalId` or `userExternalId` | string | one of these | Your id for the player. | | `mmrEntityId` or `userId` | string | one of these | Inhouse's id for the player: the rated user's `_id`. | | `mmr` | number | yes | The new rating. | | `poolId` | string | no | The pool. Defaults to the default pool. | **Request** ```bash curl -X POST https://api.inhouseranks.com/v1/user/update-rating \ -H "x-api-key: $INHOUSE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "mmrEntityExternalId": "carol", "mmr": 1600 }' ``` **Response** `200` ```jsonc { "mmrEntity": { "_id": "6b01eb7991a8d0c2e72af676", "name": "Carol", "stats": [ { "positionId": null, "mmr": { "value": 1600 /* ... */ }, "wins": 1, "losses": 0, "ties": 0, "matchCount": 1, "groupRank": null, "hideRating": false // ... } ], "externalId": "carol" // ... } } ``` **Errors** | Status | `code` | When | |---|---|---| | 400 | `user-id-required` | Neither `mmrEntityExternalId` nor `mmrEntityId` was sent. | | 404 | `mmr-entity-not-found` | No such rated user in the pool. | ## Rename or archive a player `POST /v1/mmr_entities/update` Renames a rated user, or archives or restores them. The pool is the rated user's own, so no pool is needed. An archived player drops off both leaderboards, `GET /v1/pool` and `/v1/user/ratings` (where they're reported in `missing`). Their `mmrEntityExternalId` is then free: a later match with it starts a new rated user. **Body parameters** | Field | Type | Required | Description | |---|---|---|---| | `mmrEntityId` or `userId` | string | yes | Inhouse's id for the player: the rated user's `_id`. This call doesn't take your own id. | | `name` | string | no | The new display name, at most 50 characters. | | `archived` | boolean | no | `true` archives, `false` restores. | **Request** ```bash curl -X POST https://api.inhouseranks.com/v1/mmr_entities/update \ -H "x-api-key: $INHOUSE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "mmrEntityId": "6b01eb7991a8d0c2e72af676", "name": "Carol C." }' ``` **Response** `200` ```jsonc { "mmrEntity": { "_id": "6b01eb7991a8d0c2e72af676", "name": "Carol C.", "stats": [ { "positionId": null, "mmr": { "value": 1600 /* ... */ }, "wins": 1, "losses": 0, "ties": 0, "matchCount": 1, "groupRank": null, "hideRating": false // ... } ], "externalId": "carol" // ... } } ``` **Errors** | Status | `code` | When | |---|---|---| | 400 | `user-external-id-exists` | Restoring a player whose `mmrEntityExternalId` was taken by a new rated user in the meantime. Each one names one active player per pool. | | 400 | none | `Validation failed`: `mmrEntityId` is missing, or isn't an Inhouse id. | | 404 | `mmr-entity-not-found` | No rated user has this `mmrEntityId`. | ## Migrate players `POST /v1/user/migrate` Brings up to 1000 existing players into a pool with their ratings and records. All or nothing: a batch with a bad row writes nothing. See [Migrate your players](https://inhouseranks.com/docs/guides/import-and-migrate#migrate-your-players). **Body parameters** | Field | Type | Required | Description | |---|---|---|---| | `poolId` | string | yes | The pool, which must already exist. There is no default pool here. | | `players` | array | yes | 1 to 1000 players, each `{ mmrEntityExternalId, name?, stats? }`. | | `players[].mmrEntityExternalId` or `players[].userExternalId` | string | yes | Your id for the player. | | `players[].name` | string | no | Display name. Defaults to the `mmrEntityExternalId`. | | `players[].stats` | array | no | Stats blocks in the shape [`mmrEntity.stats[]`](https://inhouseranks.com/docs/api/objects#stats-block) comes back in. Fields left out take the pool's defaults: see [What to send for each player](https://inhouseranks.com/docs/guides/import-and-migrate#what-to-send-for-each-player). | | `overwrite` | boolean | no | `true` replaces the stats (and name, if sent) of players that already exist. By default they're skipped. | **Request** ```bash curl -X POST https://api.inhouseranks.com/v1/user/migrate \ -H "x-api-key: $INHOUSE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "poolId": "6b01eb7991a8d0c2e72af67e", "players": [ { "mmrEntityExternalId": "alice", "name": "Alice", "stats": [{ "mmr": { "value": 1820 }, "wins": 30, "losses": 12 }] }, { "mmrEntityExternalId": "bob" } ] }' ``` **Response** `200` ```jsonc { "poolId": "6b01eb7991a8d0c2e72af67e", "createdCount": 1, "updatedCount": 0, "skippedCount": 1, "players": [ { "mmrEntityExternalId": "alice", "userExternalId": "alice", "mmrEntityId": "6b01eb7991a8d0c2e72af682", "userId": "6b01eb7991a8d0c2e72af682", "status": "created" }, { "mmrEntityExternalId": "bob", "userExternalId": "bob", "mmrEntityId": "6b01eb7991a8d0c2e72af681", "userId": "6b01eb7991a8d0c2e72af681", "status": "skipped" } ] } ``` `players` is in request order. Each row has your id for the player (`mmrEntityExternalId`), Inhouse's (`mmrEntityId`) and a `status`: `created`, `updated` or `skipped`. The two ids also come as `userExternalId` and `userId`. **Errors** | Status | `code` | When | |---|---|---| | 400 | `group-id-required` | No `poolId`. `message` says what to send. | | 400 | `no-players` | `players` is empty or missing. | | 400 | `too-many-players` | More than 1000 players. `max` is the limit. Split the batch. | | 400 | `invalid-migration` | Some rows are bad, and nothing was written. `errors` holds one `{ index, mmrEntityExternalId, code, field, message }` per bad row. | | 404 | `group-not-found` | The pool doesn't exist. | A row's `code` in `errors` is one of `player-not-an-object`, `user-id-required`, `duplicate-user-id`, `unknown-field`, `invalid-field`, `unknown-position`, `duplicate-position`, `glicko2-only-field`, `conflicting-streaks` or `match-count-too-low`: ```jsonc { "code": "invalid-migration", "message": "Nothing was migrated: 1 of 1 players are invalid. Fix them and send the batch again.", "errors": [ { "index": 0, "mmrEntityExternalId": "erin", "userExternalId": "erin", "code": "unknown-field", "field": "rating", "message": "Unknown field \"rating\". Allowed here: mmrEntityExternalId, name, stats." } ] } ``` --- # Leaderboards Page: https://inhouseranks.com/docs/api/leaderboards Two reads of a pool's standings. For which to use when, see [Leaderboards and ratings](https://inhouseranks.com/docs/guides/leaderboards). ## Get the top 100 `GET /v1/pool//leaderboard` `GET /v1/pool/leaderboard` The pool's best 100 players, each with an absolute `rank`, paged within those 100. Only players with a ranked result appear. Nobody below rank 100 is ever returned. **Parameters** | Parameter | In | Required | Description | |---|---|---|---| | `poolId` | path | no | The pool's id. Leave the segment out for the default pool. | | `poolId` | query | no | The same id, as a query parameter instead. | | `page` | query | no | Starts at 1. Default 1. | | `pageSize` | query | no | 1–100. Default 25. | | `positionId` | query | no | Rank by this position's stats block instead of the overall one. Players with no block for it are left off. | **Request** ```bash curl https://api.inhouseranks.com/v1/pool/leaderboard \ -H "x-api-key: $INHOUSE_API_KEY" ``` **Response** `200` ```jsonc { "poolId": "6b01eb7991a8d0c2e72af66b", "leaderboard": [ { "rank": 1, "mmrEntityExternalId": "carol", "mmrEntity": { "_id": "6b01eb7991a8d0c2e72af676", "name": "Carol C.", "stats": [ { "positionId": null, "mmr": { "value": 1600 /* ... */ }, "wins": 1, "losses": 0, "ties": 0, "matchCount": 1, "groupRank": { "lower": 1500, "upper": null, "rank": "Gold", "tier": null, "image": "https://assets.example.com/ranks/gold.png" }, "hideRating": false // ... } ], "externalId": "carol" // ... } // ... } // ... 3 more ], "page": 1, "pageSize": 25, "totalCount": 4, "hasMore": false } ``` | Key | Contains | |---|---| | `poolId` | Inhouse's id for the pool. | | `leaderboard` | One row per player, best first: `{ rank, mmrEntityExternalId, userExternalId, mmrEntity }`. | | `leaderboard[].rank` | The position on the board: 1, 2, 3. Tied players don't share a rank. | | `leaderboard[].mmrEntityExternalId` | Your id for the player, the same as `mmrEntity.externalId`. `null` for a rated user created without one. Also sent as `userExternalId`. | | `leaderboard[].mmrEntity` | The [rated user](https://inhouseranks.com/docs/api/objects#rated-user). | | `page`, `pageSize` | The page returned. | | `totalCount` | How many players made the board: at most 100, fewer in a smaller pool. | | `hasMore` | Whether another page follows. A page past the end of the board comes back empty. | Order is rating, best first. Equal ratings rank whoever played first higher (the earliest `lastPlayedAt`), and always come back in the same order. **Errors** | Status | `code` | When | |---|---|---| | 400 | `invalid-pagination` | `page` is below 1, `pageSize` is outside 1–100, or either isn't a whole number. `message` names the bounds. | ## List rankings `GET /v1/pool//rankings` `GET /v1/pool/rankings` Every active rated user in the pool, best first, 25 per page. Players who have never played a ranked match are included. Archived players are left out. **Parameters** | Parameter | In | Required | Description | |---|---|---|---| | `poolId` | path | no | The pool's id. Leave the segment out for the default pool. | | `poolId` | query | no | The same id, as a query parameter instead. | | `page` | query | no | Starts at 1. Default 1. | | `positionId` | query | no | Sort by this position's stats block instead of the overall one. | **Request** ```bash curl "https://api.inhouseranks.com/v1/pool/rankings?page=1" \ -H "x-api-key: $INHOUSE_API_KEY" ``` **Response** `200` ```jsonc { "mmrEntities": [ { "mmrEntity": { "_id": "6b01eb7991a8d0c2e72af676", "name": "Carol C.", "stats": [ { "positionId": null, "mmr": { "value": 1600 /* ... */ }, "wins": 1, "losses": 0, "ties": 0, "matchCount": 1, "groupRank": { "lower": 1500, "upper": null, "rank": "Gold", "tier": null, "image": "https://assets.example.com/ranks/gold.png" }, "hideRating": false // ... } ], "externalId": "carol" // ... } // ... } // ... 3 more ], "page": 1 } ``` | Key | Contains | |---|---| | `mmrEntities` | One **wrapper** per player: `{ mmrEntity, groupMembers }`. The [rated user](https://inhouseranks.com/docs/api/objects#rated-user) is `mmrEntities[i].mmrEntity`, so a rating is `mmrEntities[i].mmrEntity.stats[0].mmr.value`. `groupMembers` is always `[]`: a pool has no members. | | `page` | The page returned. There is no `totalCount`: a full page of 25 means "ask for the next one". | Equal ratings rank whoever played first higher. Players who have never played a ranked match come after everyone who has, and the rest is a fixed order, so a tie never repeats or vanishes across pages. **Errors** | Status | `code` | When | |---|---|---| | 400 | `invalid-pagination` | `page` isn't a whole number from 1 up. | --- # Matches Page: https://inhouseranks.com/docs/api/matches A match is a result: teams, their places, and who was on them. Only a **recorded, ranked** match moves ratings. For the flows these calls make up, see [Record matches](https://inhouseranks.com/docs/guides/matches). ## Record a match `POST /v1/match/record` **Rates a match, in one call.** You name the match by `matchExternalId`, your id for it, or by `matchId`, Inhouse's. What the call does depends on what that names: | The id names | Result | |---|---| | No match yet: a `matchExternalId` not seen before, or no id sent | The match is created from `matchResult`, then rated. | | A match that isn't rated yet | Any `matchResult` and `scores` sent are applied, then it's rated. | | A match already recorded | `409 match-already-recorded`. Nothing changes. | A match is only ever created under your own id. A `matchId` that names no match is `404 match-not-found`: Inhouse's ids are made by the server. **Body parameters** | Field | Type | Required | Description | |---|---|---|---| | `matchExternalId` | string | recommended | Your id for the match. It makes a retry safe: without one, a retry writes a second match. | | `matchResult` | object | for a new match | The teams, their places and their players. See [Match result](https://inhouseranks.com/docs/api/objects#match-result). Sent with a match that exists, it replaces that match's result. | | `scores` | array | no | Results to set just before rating. See [Scores](https://inhouseranks.com/docs/api/objects#scores). | | `ranked` | boolean | no | **Defaults to `false`.** Send `true` for the match to move ratings. A matchmade match is already ranked. | | `poolId` | string | no | The pool, for a new match. Defaults to the default pool. | | `name` | string | no | A label, at most 80 characters. | | `description` | string | no | A longer label, at most 300 characters. | When any team has no `place`, places are worked out from `pointsScored` by the pool's `winCondition`. **Request** ```bash curl -X POST https://api.inhouseranks.com/v1/match/record \ -H "x-api-key: $INHOUSE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "matchExternalId": "m_1042", "ranked": true, "name": "Grand Final", "matchResult": { "teams": [ { "place": 1, "constituents": [{ "mmrEntityExternalId": "alice" }] }, { "place": 2, "constituents": [{ "mmrEntityExternalId": "bob" }] } ] } }' ``` To rate a match that already exists, name it: by the `matchId` its `match.found` event gave you, or by your own `matchExternalId`. Send any last results in `scores`: ```bash curl -X POST https://api.inhouseranks.com/v1/match/record \ -H "x-api-key: $INHOUSE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "matchId": "6b01eb7991a8d0c2e72af694", "scores": [ { "teamId": "", "place": 1 }, { "teamId": "", "place": 2 } ] }' ``` **Response** `200` ```jsonc { "match": { "_id": "6b01eb7991a8d0c2e72af670", "poolId": "6b01eb7991a8d0c2e72af66b", "createdAt": "2026-11-21T19:05:29.446480Z", "status": "recorded", "result": { "teams": [ { "id": "", "place": 1, "pointsScored": null, "caption": null, "constituents": [ { "mmrEntityId": "6b01eb7991a8d0c2e72af66e", "mmrEntityExternalId": "alice", "positionId": null, "caption": null // ... } ], "calculations": { "startingMmr": 1500, "originalPlace": 1, "reassignedPlace": 1, "normalizedPlace": 1, "teamAdvantage": 0, "playerAdvantages": 0, "mmrWithAdvantages": 1500, "outcome": "win", "finalMmr": 1516 } } // ... 1 more ] }, "ranked": true, "name": "Grand Final", "externalId": "m_1042", "recordedAt": "2026-11-21T19:05:29.463796Z" // ... }, "matchPlayers": [ { "_id": "6b01eb7991a8d0c2e72af671", "teamId": "", "matchId": "6b01eb7991a8d0c2e72af670", "mmrEntityId": "6b01eb7991a8d0c2e72af66e", "mmrEntityExternalId": "alice", "mmrChanges": [ { "positionId": null, "multiplier": null, "advantage": null, "before": 1500, "after": 1516, "bonus": null } ], "pointsScored": null, "outcome": "win", "ratingWindow": null // ... } // ... 1 more ] } ``` | Key | Contains | |---|---| | `match` | The [match](https://inhouseranks.com/docs/api/objects#match), now `recorded`, with `recordedAt` and each team's `calculations`. | | `matchPlayers` | One [match player](https://inhouseranks.com/docs/api/objects#match-player) per player. `mmrChanges[].before` and `after` are their rating change. | **Errors** | Status | `code` | When | |---|---|---| | 400 | `match-result-required` | No match named and no `matchResult`: there is nothing to create the match from. | | 400 | `match-has-unplaced-teams` | The teams have neither places nor points. A new match is refused before anything is written. | | 400 | `min-two-teams-required` | The match has fewer than two teams, for example after `/match/score` named only one player. It stays pending. | | 400 | `match-not-pending` | You sent a `matchResult` for a match that is written but not rated: retry with only the match's id. Or another call is rating the match right now: retry shortly. | | 400 | `team-not-in-match`, `player-not-in-match` | A `scores` entry names a team or player the match doesn't have. | | 400 | `conflicting-scores` | Two `scores` entries give one team different places or points. | | 400 | others | A malformed `matchResult` or `scores` entry. See [Match results and scores](https://inhouseranks.com/docs/api/errors#match-results-and-scores). | | 402 | `over-plan-limit` | A monthly allowance is spent. Nothing was written or rated. | | 404 | `match-not-found` | A `matchId` that names no match. Or a `matchExternalId` that names none, sent with no `matchResult` to create it from. | | 409 | `match-already-recorded` | The match is already recorded. After a timed-out call, this means the first one went through. | | 409 | `player-in-queue` | A player of a new match is waiting in the pool's matchmaking queue. `mmrEntityExternalIds` (and `userExternalIds`) names them. | | 409 | `rating-update-conflict` | The call kept losing to other writes to the same players. Nothing changed. Send it again. | ## Score a match `POST /v1/match/score` Sets scores on a `pending` match, for one or many players at a time. **Only the players you list change.** It never rates and never assigns places. If `matchExternalId` names a match that doesn't exist yet, this call creates it. It has to be **your** id: Inhouse's ids are made by the server, so a `matchId` that names no match is a `404`. Sending the same body twice is safe. **Body parameters** | Field | Type | Required | Description | |---|---|---|---| | `matchExternalId` | string | yes | Your id for the match. An id not seen before opens a new match. | | `scores` | array | yes | At least one `{ mmrEntityExternalId, pointsScored?, caption? }`. A player can also be named by `mmrEntityId`, or by their [user names](https://inhouseranks.com/docs/api#a-players-ids-also-have-user-names). A player not yet in the match is added as a team of their own. | | `poolId` | string | no | Used when this call creates the match: the pool. Defaults to the default pool. | | `ranked` | boolean | no | Defaults to `false`. On a match that exists, overwrites what's stored. | | `name`, `description` | string | no | Labels. On a match that exists, they overwrite what's stored (`null` or `""` clears). | | `matchResult` | object | no | Used when this call creates the match. Defaults to no teams. Ignored on a match that exists. | **Request** ```bash curl -X POST https://api.inhouseranks.com/v1/match/score \ -H "x-api-key: $INHOUSE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "matchExternalId": "m_1043", "ranked": true, "scores": [ { "mmrEntityExternalId": "alice", "pointsScored": 12, "caption": "clean run" } ] }' ``` **Response** `200` ```jsonc { "match": { "_id": "6b01eb7991a8d0c2e72af673", "status": "pending", "result": { "teams": [ { "id": "", "place": null, "pointsScored": 12, "caption": "clean run", "constituents": [ { "mmrEntityId": "6b01eb7991a8d0c2e72af66e", "mmrEntityExternalId": null, "positionId": null, "caption": null // ... } ], "calculations": null } ] }, "ranked": true, "externalId": "m_1043" // ... } } ``` `match` is the [match](https://inhouseranks.com/docs/api/objects#match), still `pending`. **Errors** | Status | `code` | When | |---|---|---| | 400 | `no-scores` | `scores` is empty. | | 400 | `match-not-pending` | The match is already recorded. | | 400 | `player-not-in-match` | The pool's game declares teams, and a scored player isn't in the match. Adding players on the fly needs the default, team-less pool. | | 400 | others | A malformed `scores` entry. See [Match results and scores](https://inhouseranks.com/docs/api/errors#match-results-and-scores). | | 402 | `over-plan-limit` | Opening the match would exceed your monthly matches. | | 404 | `match-not-found` | A `matchId` that names no match. To open a new match, send your own `matchExternalId`. | | 409 | `player-in-queue` | A player this call would add to a match is waiting in the pool's matchmaking queue. | ## Create a pending match `POST /v1/match/create` Writes a match as `pending`, unrated, so you can edit or score it before `/match/record`. **Optional**: `/match/score` opens a match by itself. **Body parameters** | Field | Type | Required | Description | |---|---|---|---| | `matchResult` | object | yes | See [Match result](https://inhouseranks.com/docs/api/objects#match-result). `{ "teams": [] }` is valid. | | `matchExternalId` | string | no | Your id for the match. | | `poolId` | string | no | The pool. Defaults to the default pool. | | `ranked` | boolean | no | Defaults to `false`. | | `name`, `description` | string | no | Labels. | **Request** ```bash curl -X POST https://api.inhouseranks.com/v1/match/create \ -H "x-api-key: $INHOUSE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "matchExternalId": "m_1045", "ranked": true, "matchResult": { "teams": [ { "place": 1, "constituents": [{ "mmrEntityExternalId": "bob" }] }, { "place": 2, "constituents": [{ "mmrEntityExternalId": "alice" }] } ] } }' ``` **Response** `200` ```jsonc { "match": { "_id": "6b01eb7991a8d0c2e72af67d", "status": "pending", "result": { "teams": [ { "id": "", "place": 1, "pointsScored": null, "caption": null, "constituents": [ { "mmrEntityId": null, "mmrEntityExternalId": "bob", "positionId": null, "caption": null // ... } ], "calculations": null } // ... 1 more ] }, "ranked": true, "externalId": "m_1045" // ... }, "matchPlayers": [] } ``` `matchPlayers` is empty until the match is rated. **Errors** | Status | `code` | When | |---|---|---| | 400 | `match-external-id-exists` | Another match in your project already has this `matchExternalId`. (`/match/record` treats a used `matchExternalId` as that match instead.) | | 400 | others | A malformed `matchResult`. See [Match results and scores](https://inhouseranks.com/docs/api/errors#match-results-and-scores). | | 402 | `over-plan-limit` | The match would exceed your monthly matches. | | 409 | `player-in-queue` | A player is waiting in the pool's matchmaking queue. | ## Update a match `POST /v1/match/update` Patches a match. **Only the fields you send are written.** **Body parameters** | Field | Type | Required | Description | |---|---|---|---| | `matchExternalId` | string | yes | The match. | | `name`, `description` | string or null | no | Labels. Changeable in **any** status. `null` or `""` clears one, and leaving it out keeps it. | | `matchResult` | object | no | Replaces the whole result. `pending` matches only. | | `ranked` | boolean | no | `pending` matches only. | **Request** ```bash curl -X POST https://api.inhouseranks.com/v1/match/update \ -H "x-api-key: $INHOUSE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "matchExternalId": "m_1045", "name": "Grand Final (replay)" }' ``` **Response** `200` ```jsonc { "match": { "_id": "6b01eb7991a8d0c2e72af67d", "status": "pending", "externalId": "m_1045", "name": "Grand Final (replay)" // ... } } ``` **Errors** | Status | `code` | When | |---|---|---| | 400 | `match-id-required` | No `matchExternalId` or `matchId`. | | 400 | `match-not-pending` | `matchResult` or `ranked` sent for a match that is already recorded. Renaming works in any status. | | 400 | others | A malformed `matchResult`. See [Match results and scores](https://inhouseranks.com/docs/api/errors#match-results-and-scores). | | 404 | `match-not-found` | No such match. | | 409 | `player-in-queue` | The new result adds a player who is waiting in the pool's matchmaking queue. | ## Delete a match `POST /v1/match/delete` Deletes a `pending` match. A recorded match can't be deleted. **Body parameters** | Field | Type | Required | Description | |---|---|---|---| | `matchExternalId` | string | yes | The match. | **Request** ```bash curl -X POST https://api.inhouseranks.com/v1/match/delete \ -H "x-api-key: $INHOUSE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "matchExternalId": "m_1045" }' ``` **Response** `200` ```jsonc { "matchId": "6b01eb7991a8d0c2e72af67d" } ``` `matchId` is Inhouse's id for the deleted match. **Errors** | Status | `code` | When | |---|---|---| | 400 | `match-id-required` | No `matchExternalId` or `matchId`. | | 400 | `match-not-pending` | The match is already recorded. | | 404 | `match-not-found` | No such match. | ## Get a match `GET /v1/match/get` Returns one match with its players. **Parameters** | Parameter | In | Required | Description | |---|---|---|---| | `matchExternalId` | query | yes | Your id for the match. | **Request** ```bash curl "https://api.inhouseranks.com/v1/match/get?matchExternalId=m_1042" \ -H "x-api-key: $INHOUSE_API_KEY" ``` **Response** `200` ```jsonc { "match": { "_id": "6b01eb7991a8d0c2e72af670", "name": "Grand Final", "recordedAt": "2026-11-21T19:05:29.463796Z", "status": "recorded", "ranked": true, "result": { "teams": [ { "id": "", "place": 1, "constituents": [ { "mmrEntityId": "6b01eb7991a8d0c2e72af66e", "mmrEntityExternalId": "alice" // ... } ] // ... } // ... 1 more ] }, "externalId": "m_1042", "matchPlayers": [ { "teamId": "", "mmrEntityId": "6b01eb7991a8d0c2e72af66e", "mmrChanges": [ { "positionId": null, "multiplier": null, "advantage": null, "before": 1500, "after": 1516, "bonus": null } ], "outcome": "win", "mmrEntity": { "_id": "6b01eb7991a8d0c2e72af66e", "name": "alice", "externalId": "alice" // ... } // ... } // ... 1 more ] // ... } } ``` `match` is the [match](https://inhouseranks.com/docs/api/objects#match) plus `matchPlayers`: its [match players](https://inhouseranks.com/docs/api/objects#match-player), each with the player's `mmrEntity` as it is now. **Errors** | Status | `code` | When | |---|---|---| | 400 | `match-id-required` | No `matchExternalId` or `matchId`. | | 404 | `match-not-found` | No such match. | ## List matches `GET /v1/match/list` A pool's match history, newest first, 10 per page. **Parameters** | Parameter | In | Required | Description | |---|---|---|---| | `poolId` | query | no | The pool. Defaults to the default pool. | | `page` | query | no | **Starts at 0.** Default 0. `page=1` is the second page. | | `status` | query | no | `recorded` (default), or `pending` for matches not yet rated. | **Request** ```bash curl https://api.inhouseranks.com/v1/match/list \ -H "x-api-key: $INHOUSE_API_KEY" ``` **Response** `200` ```jsonc { "matches": [ { "_id": "6b01eb7991a8d0c2e72af678", "name": null, "recordedAt": "2026-11-21T19:05:29.559434Z", "status": "recorded", "ranked": true, "externalId": "m_1044" // ... }, { "_id": "6b01eb7991a8d0c2e72af673", "name": null, "recordedAt": "2026-11-21T19:05:29.541312Z", "status": "recorded", "ranked": true, "externalId": "m_1043" // ... } // ... 1 more ], "page": 0, "pageSize": 10, "totalCount": 3, "hasMore": false } ``` Each element of `matches` is a match as [Get a match](#get-a-match) returns it. **Errors** | Status | `code` | When | |---|---|---| | 400 | `invalid-pagination` | `page` isn't a whole number from 0 up. | ## Import matches `POST /v1/match/import` Records and rates many old matches in one call, oldest first. Each match is a free-for-all, and **players are matched by `name`**: an unknown name creates a rated user without an `mmrEntityExternalId`. Read [Import match history](https://inhouseranks.com/docs/guides/import-and-migrate#import-match-history) first. **Body parameters** | Field | Type | Required | Description | |---|---|---|---| | `matches` | array | yes | 1 to 1000 matches, each `{ playDate, title?, players }`. | | `matches[].playDate` | string | yes | When the match was played, as an ISO 8601 time. | | `matches[].title` | string | no | A label for the match. | | `matches[].players` | array | yes | At least two `{ name, placement, score?, role? }`. `placement` (or `rank`) decides the result. `score` and `role` only go into the player's caption. | | `poolId` | string | no | The pool. Defaults to the default pool. | | `ranked` | boolean | no | **Defaults to `true`** here. | | `source`, `data` | string, object | no | Instead of `matches`: `"source": "bgstats"` with a BG Stats export in `data`. | **Request** ```bash curl -X POST https://api.inhouseranks.com/v1/match/import \ -H "x-api-key: $INHOUSE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "poolId": "6b01eb7991a8d0c2e72af67e", "matches": [ { "playDate": "2024-05-01T19:30:00Z", "title": "Week 1", "players": [ { "name": "Alice", "placement": 1, "score": 21 }, { "name": "Bob", "placement": 2, "score": 17 } ] } ] }' ``` **Response** `200` ```jsonc { "passedCount": 1, "failedCount": 0, "passed": [ { "index": 0, "matchId": "6b01eb7991a8d0c2e72af683", "playDate": "2024-05-01T19:30:00.000Z" } ], "failed": [] } ``` | Key | Contains | |---|---| | `passedCount`, `passed` | The matches that were recorded and rated. | | `failedCount`, `failed` | The first match that couldn't be recorded, with its `code`, and every match after it as `not-processed`. | **The import stops at the first match that fails and still answers `200`.** Check `failedCount`. **Errors** | Status | `code` | When | |---|---|---| | 400 | `no-matches` | `matches` is missing or empty. | | 400 | `too-many-matches` | More than 1000 matches. `max` is the limit. | | 400 | `invalid-import` | Some matches are malformed, and nothing was written. `errors` holds one `{ index, code }` per bad match. | | 400 | `invalid-source`, `invalid-bgstats-data` | A `source` other than `default` or `bgstats` (`allowed` lists them), or `"source": "bgstats"` without a `data` object. | A bad match's `code` in `errors` is one of `match-not-an-object`, `invalid-play-date`, `min-two-players-required`, `player-not-an-object`, `player-missing-name`, `duplicate-player` or `player-missing-placement`. --- # Matchmaking Page: https://inhouseranks.com/docs/api/matchmaking Queue parties, read how busy a queue is, and replay missed webhook events. What becomes of a party arrives at your webhook, not in a response. See [Matchmaking](https://inhouseranks.com/docs/guides/matchmaking) and [Webhooks](https://inhouseranks.com/docs/guides/webhooks). ## Join the queue `POST /v1/queue/join` Queues a party: one player, or up to the rule's `maxPartySize` together. The project needs a webhook endpoint that receives `match.found`. Each player's rated user is read now, and that rating is the one the matchmaker uses. Nothing is created: a player new to the pool is shown at its starting rating with `_id: null`, and is created when the match is recorded. **Body parameters** | Field | Type | Required | Description | |---|---|---|---| | `players` | array | yes | The party: `[{ "mmrEntityExternalId": "..." }]`, each player by your own id for them (or `userExternalId`, its [user names](https://inhouseranks.com/docs/api#a-players-ids-also-have-user-names)). Under a rule with [positions](https://inhouseranks.com/docs/guides/matchmaking#positions), each player also sends `positionIds`: the ids of the rule's positions they'll play, first choice first, as `[{ "mmrEntityExternalId": "...", "positionIds": ["mid", "support"] }]`. One is enough unless the rule's `minPositionsPerPlayer` asks for more. Other rules ignore it. | | `matchmakingRuleId` | string | no | The `id` of the [matchmaking rule](https://inhouseranks.com/docs/api/objects#matchmaking-rule) to queue under. Defaults to the pool's default rule. | | `partyExternalId` | string | no | Your own id for the party, at most 100 characters. One party per pool can hold it at a time. | | `poolId` | string | no | The pool. Defaults to the default pool. | | `regionIds` | array | no | In a queue with [regions](https://inhouseranks.com/docs/guides/matchmaking#regions): the regions the party will play in, as `["eu-west", "us-east"]`, each one of the queue's. One list for the whole party. Its lobby only forms in one of them, with parties that accept the same region. Left out or `[]`, any region the queue offers, including regions added while the party waits. A queue without regions ignores the list. | **Request** ```bash curl -X POST https://api.inhouseranks.com/v1/queue/join \ -H "x-api-key: $INHOUSE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "partyExternalId": "party-alice", "players": [{ "mmrEntityExternalId": "alice" }] }' ``` **Response** `200` ```jsonc { "party": { "_id": "6b01eb7991a8d0c2e72af691", "poolId": "6b01eb7991a8d0c2e72af66b", "matchmakingRuleId": "ranked-1v1", "externalId": "party-alice", "players": [ { "mmrEntityExternalId": "alice", "mmrEntity": { "_id": "6b01eb7991a8d0c2e72af66e", "name": "alice", "stats": [ { "positionId": null, "mmr": { "value": 1545.086633573829 /* ... */ }, "wins": 3, "losses": 0, "ties": 0, "matchCount": 3, "groupRank": { "lower": 1500, "upper": null, "rank": "Gold", "tier": null, "image": "https://assets.example.com/ranks/gold.png" }, "hideRating": false // ... } ], "externalId": "alice" // ... } // ... } ], "regionIds": [], "enqueuedAt": "2026-11-21T19:05:29.758581Z", "status": "searching" // ... } } ``` `party` is the [party](https://inhouseranks.com/docs/api/objects#party), `searching`. Keep `party._id`, or use your `partyExternalId` (the party's `externalId`), to find the party in events and to leave the queue. Under a rule with positions, each player comes back with the `positionIds` they listed: ```bash curl -X POST https://api.inhouseranks.com/v1/queue/join \ -H "x-api-key: $INHOUSE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "poolId": "6b01eb7991a8d0c2e72af69b", "partyExternalId": "party-ivy", "players": [ { "mmrEntityExternalId": "ivy", "positionIds": ["mid", "support"] } ] }' ``` ```jsonc { "party": { "_id": "6b01eb7991a8d0c2e72af69e", "matchmakingRuleId": "ranked-5v5", "externalId": "party-ivy", "players": [ { "mmrEntityExternalId": "ivy", "positionIds": ["mid", "support"] // ... } ], "status": "searching" // ... } } ``` In a queue with regions, the party comes back with the `regionIds` it listed: ```bash curl -X POST https://api.inhouseranks.com/v1/queue/join \ -H "x-api-key: $INHOUSE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "poolId": "6b01eb7991a8d0c2e72af6be", "partyExternalId": "party-sam", "regionIds": ["eu-west"], "players": [{ "mmrEntityExternalId": "sam" }] }' ``` ```jsonc { "party": { "_id": "6b01eb7991a8d0c2e72af6c1", "matchmakingRuleId": "ranked-1v1", "externalId": "party-sam", "players": [{ "mmrEntityExternalId": "sam" /* ... */ }], "regionIds": ["eu-west"], "status": "searching" // ... } } ``` A party that listed none holds `[]`, and so does every party in a queue without regions. **Errors** | Status | `code` | When | |---|---|---| | 400 | `webhook-not-configured` | The project has no webhook endpoint that receives `match.found`. Add one in the portal. | | 400 | `players-required` | `players` is empty. | | 400 | `player-missing-user-id` | A `players` entry has no usable `mmrEntityExternalId` or `userExternalId` (1–100 characters). Inhouse's id for a player isn't taken here. | | 400 | `duplicate-player` | The same `mmrEntityExternalId` twice in `players`. | | 400 | `party-too-large` | More players than the rule's `maxPartySize`, or than any team can hold (50). | | 400 | `party-skill-gap-too-wide` | The party's own rating spread is already wider than the rule's `maxSkillGap`, so it could never be placed. | | 400 | `positions-required` | The rule has `teamPositions`, and a player listed fewer of its positions than it asks for. | | 400 | `invalid-position` | A player listed a position the rule has no slot for, or the same one twice. | | 400 | `party-positions-conflict` | The party's players can't take different slots on one team with the positions they listed. | | 400 | `invalid-region` | `regionIds` names a region the queue doesn't offer, names one twice, or isn't a list of region ids. | | 402 | `over-plan-limit` | Your plan can't take the party's match or its new players now. | | 404 | `matchmaking-rule-not-found` | The pool has no rule with this `matchmakingRuleId`. | | 404 | `default-matchmaking-rule-not-found` | No `matchmakingRuleId` sent, and no rule in the pool is the default. Send a `matchmakingRuleId`, or mark one rule `"default": true`. | | 409 | `player-already-queued` | A player is already in a searching party in this pool. Leave that party first. | | 409 | `party-external-id-taken` | Another party in this pool's queue has this `partyExternalId`. Leave that party first, or send another id. | | 429 | `queue-full` | The project already has as many parties waiting as it can: 5,000 across all its pools, unless we've raised it. Retry after the `Retry-After` header. | | 503 | `server-restarting` | The server is restarting, and a party queued now would be lost. Retry after the `Retry-After` header (a few seconds). | ## Leave the queue `POST /v1/queue/leave` Takes a waiting party out of the queue and frees its players. It sends no event. Call it whenever players stop matchmaking. **Body parameters** | Field | Type | Required | Description | |---|---|---|---| | `partyId` | string | one of these | The party's `_id` from `/queue/join`. | | `partyExternalId` | string | one of these | The `partyExternalId` the party joined with. Send one or the other, never both. | | `poolId` | string | no | With `partyExternalId`: the pool the party queued in. Defaults to the default pool. | **Request** ```bash curl -X POST https://api.inhouseranks.com/v1/queue/leave \ -H "x-api-key: $INHOUSE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "partyExternalId": "party-frank" }' ``` **Response** `200` ```jsonc { "party": { "_id": "6b01eb7991a8d0c2e72af69a", "poolId": "6b01eb7991a8d0c2e72af66b", "matchmakingRuleId": "ranked-1v1", "externalId": "party-frank", "players": [{ "mmrEntityExternalId": "frank" /* ... */ }], "regionIds": [], "enqueuedAt": "2026-11-21T19:05:29.814613Z", "status": "cancelled" // ... } } ``` `party` comes back with `status: "cancelled"`. **Errors** | Status | `code` | When | |---|---|---| | 400 | `party-ref-required` | Neither `partyId` nor `partyExternalId` was sent, or both were. | | 404 | `party-not-found` | The party isn't waiting: a wrong id, or it was placed, expired, was cancelled or already left (its event says which), or a server restart emptied the queue. | ## Queue stats `GET /v1/queue/stats` How busy a pool's queue is: how many players and parties are waiting, how their ratings are spread, and how far their searches have widened. **Aggregates only**: it never names a party or a player. It answers API keys only, for your own pools. Call it from your game server. **Parameters** | Parameter | In | Required | Description | |---|---|---|---| | `poolId` | query | no | The pool. Defaults to the default pool. | | `matchmakingRuleId` | query | no | Only this rule's queue. Without it, every rule's queue in the pool together. | | `ratingBucketSize` | query | no | Width of a `ratingBuckets` bucket: a whole number from 1 to 10000. Default 100. | | `skillGapBucketSize` | query | no | Width of an `allowedSkillGapBuckets` bucket: a whole number from 1 to 10000. Default 50. | **Request** ```bash curl "https://api.inhouseranks.com/v1/queue/stats?matchmakingRuleId=ranked-1v1" \ -H "x-api-key: $INHOUSE_API_KEY" ``` **Response** `200` ```jsonc { "now": "2026-11-21T19:05:29.765580Z", "poolId": "6b01eb7991a8d0c2e72af66b", "matchmakingRuleId": "ranked-1v1", "ratingBucketSize": 100, "skillGapBucketSize": 50, "parties": 2, "players": 2, "oldestEnqueuedAt": "2026-11-21T19:05:29.758581Z", "rating": { "min": 1451.2775372294423, "max": 1545.086633573829 }, "ratingBuckets": [ { "from": 1400, "to": 1500, "players": 1 }, { "from": 1500, "to": 1600, "players": 1 } ], "allowedSkillGap": { "min": 100.03999, "max": 100.06999 }, "allowedSkillGapBuckets": [{ "from": 100, "to": 150, "players": 2 }] } ``` | Key | Contains | |---|---| | `now` | The server's clock, so you can turn `oldestEnqueuedAt` into a wait without trusting the player's clock. | | `poolId` | The pool's id. | | `matchmakingRuleId` | The rule asked for, or `null` for the whole pool. | | `parties`, `players` | How many are waiting. A party of two counts once in `parties` and twice in `players`. | | `oldestEnqueuedAt` | When the longest-waiting party joined. | | `rating` | The lowest and highest rating waiting. It's the rating the matchmaker compares, as of when the player joined: a [rating window's](https://inhouseranks.com/docs/guides/placement-matches) while one was open, and the pool's starting rating for a player new to it. | | `ratingBuckets` | Players per rating range. | | `allowedSkillGap` | The narrowest and widest search right now. A party's is `min(initialSkillGap + skillGapGrowthPerSecond × wait, maxSkillGap)` under its own rule, and everyone in the party shares it. | | `allowedSkillGapBuckets` | Players per allowed-gap range. | Buckets run from `from` (inclusive) to `to` (exclusive), in ascending order, with `from` a multiple of the bucket size. Buckets with nobody in them are left out: fill those gaps with zeros to draw a histogram. When nobody is waiting, the counts are `0`, the ranges `null` and the bucket lists empty. **Errors** | Status | `code` | When | |---|---|---| | 400 | `invalid-bucket-size` | A bucket size that isn't a whole number from 1 to 10000. | | 404 | `matchmaking-rule-not-found` | The pool has no rule with this `matchmakingRuleId`. | ## List webhook deliveries `GET /v1/projects/webhook/deliveries` Your project's webhook deliveries, newest first: every event sent to each of its [endpoints](https://inhouseranks.com/docs/guides/webhooks#endpoints) and what became of it. They are kept for 7 days. Use it to [catch up after downtime](https://inhouseranks.com/docs/guides/webhooks#catch-up-after-downtime). A delivery is one event to one endpoint. An event that several endpoints receive is listed once for each, with the same `eventId` and `body`. **Parameters** | Parameter | In | Required | Description | |---|---|---|---| | `webhookId` | query | no | One endpoint's id (`wh_…`, shown in the portal), to list only what was sent to it. | | `status` | query | no | `pending`, `delivered` or `failed`. | | `type` | query | no | An event type, such as `match.found`. | | `limit` | query | no | 1–100. Default 25. Values outside the range are clamped. | | `before` | query | no | The `next` of the previous reply, to get the page after it. | **Request** ```bash curl "https://api.inhouseranks.com/v1/projects/webhook/deliveries?limit=2" \ -H "x-api-key: $INHOUSE_API_KEY" ``` **Response** `200` ```jsonc { "deliveries": [ { "_id": "6b01f43c0496078349e0272c", "webhookId": "wh_k3Zq9XvT1mPc7LdHs2aBnQ", "eventId": "6b01f43c0496078349e0272b", "type": "party.expired", "body": "{\"id\":\"6b01f43c0496078349e0272b\",\"type\":\"party.expired\",\"created…", "status": "delivered", "attempts": 1, "nextAttemptAt": null, "lastAttemptAt": "2026-11-21T19:42:52.329Z", "lastStatusCode": 200, "lastError": null, "deliveredAt": "2026-11-21T19:42:52.330Z", "createdAt": "2026-11-21T19:52:52.329Z" // ... } // ... 1 more ], "next": "6b01f43c0496078349e02727" } ``` | Key | Contains | |---|---| | `deliveries[]._id` | The delivery's id: one event to one endpoint. | | `deliveries[].webhookId` | The endpoint it was sent to. | | `deliveries[].eventId` | The event's `id`, the one in `body`. The same on each endpoint's delivery of the event: dedupe on it. | | `deliveries[].type` | The event type. | | `deliveries[].body` | The exact JSON that was sent, as a string. | | `deliveries[].status` | `pending`, `delivered` or `failed`. | | `deliveries[].attempts` | How many times it has been sent. | | `deliveries[].lastStatusCode`, `lastError` | What the endpoint answered on the last attempt, or why the attempt failed. | | `deliveries[].createdAt`, `lastAttemptAt`, `deliveredAt` | When the event was created, last sent and acknowledged. | | `deliveries[].nextAttemptAt` | When the next retry is due, while one is waiting. | | `next` | The `before` for the next page, or `null` on the last page. | **Errors** | Status | `code` | When | |---|---|---| | 400 | `invalid-status` | A `status` other than `pending`, `delivered` or `failed`. | --- # Objects Page: https://inhouseranks.com/docs/api/objects The objects the endpoints return, each described once. Responses carry the full stored document, so an object can hold fields that aren't listed here: those belong to the Inhouse consumer app or the portal. Build on the fields below. ## Pool `group` in responses. A pool's `_id` is its `poolId`: the one id it has, and what every call names it by. Inhouse stores a pool as a group, so the objects on this page that belong to a pool have group names: `group`, `groupRank`, `groupRanks`, `groupSeason`. A pool's id is sent under both names, `poolId` and `groupId`. See [A pool is also called a group](https://inhouseranks.com/docs/api#a-pool-is-also-called-a-group). ```jsonc { "_id": "6b01eb7991a8d0c2e72af67e", "kind": "community", "mmrConfig": { "kind": "elo", "initialMmr": 1500, "elo": { "kFactor": { "priority": "mmr", "mmrRanges": [ { "min": 0, "max": 1500, "value": 36 }, { "min": 1500, "max": 2500, "value": 32 }, { "min": 2500, "max": null, "value": 24 } ], "matchCountRanges": [] }, "scaleFactor": 400, "exponentBase": 10 }, "glicko2": null, "hideRatingUnderMatchCount": null, "hideRatingUnderWinCount": null, "bonuses": [] }, "name": "Ranked 1v1", "description": null, "archived": null, "config": { "trackMode": "solo", "rankMode": null, "groupRanks": [] }, "projectId": "6b01eb7991a8d0c2e72af669", "organizationId": "6b01eb7991a8d0c2e72af668", "externalId": null, "matchmakingRules": [ { "id": "ranked-1v1", "default": true, "minTeams": 2, "maxTeams": 2, "targetTeams": 2, "minPlayersPerTeam": 1, "maxPlayersPerTeam": 1, "targetPlayersPerTeam": 1, "maxPartySize": 1, "initialSkillGap": 100, "skillGapGrowthPerSecond": 10, "maxSkillGap": 400, "skillGapOpenedBy": "longestWait", "waitWeight": 0.5, "lobbyOptionsPerParty": 3, "relaxLobbySizeAfterSeconds": null, "maxTeamWinProbability": null, "maxQueueSeconds": 300, "teamPositions": null, "minPositionsPerPlayer": null, "regionIds": null } ], "matchmakingRegionIds": null // ... } ``` | Field | Meaning | |---|---| | `_id` | The pool's id. Send it as `poolId`. | | `externalId` | `_default_` on your project's default pool, and `null` on any other. A pool created before 18 November 2026 may still hold the id you gave it then, which [no call takes any more](https://inhouseranks.com/docs/api#moving-a-pool-to-its-poolid). | | `name`, `description` | Display name and description. | | `kind` | `friends`, `community` or `competitive`. | | `archived` | `true` once archived. | | `projectId`, `organizationId` | The project and organization that own the pool. | | `mmrConfig` | The rating settings. `kind` is `elo` or `glicko2`, and `initialMmr` is the starting rating. The block for the kind in use (`elo` or `glicko2`) holds that engine's settings. [Hidden-rating thresholds](https://inhouseranks.com/docs/guides/hidden-ratings), [rating windows](https://inhouseranks.com/docs/guides/placement-matches) and [streak bonuses](https://inhouseranks.com/docs/guides/streak-bonuses) (`bonuses`) live here too. | | `config` | What you sent as `groupConfig`: `rankMode`, and the [rank bands](https://inhouseranks.com/docs/guides/rank-bands), highest first, as `groupRanks`. `trackMode` is always `solo`. | | `matchmakingRules` | The pool's [matchmaking rules](#matchmaking-rule). | | `matchmakingRegionIds` | The [regions](https://inhouseranks.com/docs/guides/matchmaking#regions) the pool's queues match in, in place of the project's. `null` means the project's, and `[]` turns regions off for the pool. A rule's own `regionIds` overrides it. The ids follow the same rules as a rule's [`regionIds`](#matchmaking-rule). | ## Rated user `mmrEntity` in responses: one player's rating and record in one pool. Every endpoint that returns a player returns this object. ```jsonc { "_id": "6b01eb7991a8d0c2e72af676", "archived": null, "name": "Carol C.", "poolId": "6b01eb7991a8d0c2e72af66b", "stats": [ { "positionId": null, "mmr": { "value": 1600, "ratingDeviation": null, "volatility": null, "lastRatedAt": null }, "wins": 1, "losses": 0, "ties": 0, "matchCount": 1, "winStreak": 1, "currentStreak": 1, "loseStreak": 0, "streakIgnoringTies": 1, "seasonStartWins": null, "seasonStartMatchCount": null, "lastPlayedAt": "2026-11-21T19:05:29.559434Z", "groupRank": { "lower": 1500, "upper": null, "rank": "Gold", "tier": null, "image": "https://assets.example.com/ranks/gold.png" }, "hideRating": false } ], "externalId": "carol", "lastActiveMonth": null, "ratingWindowMmrs": [] // ... } ``` | Field | Meaning | |---|---| | `_id` | Inhouse's id for the player. Send it as `mmrEntityId` (or `userId`). It's `null` for a player shown before they exist: one queued in matchmaking who hasn't played in the pool yet. | | `externalId` | Your id for the player: what you send as `mmrEntityExternalId` (or `userExternalId`). | | `name` | Display name. The `mmrEntityExternalId` until you set one. | | `poolId` | The id of the player's pool. | | `archived` | `true` once archived. | | `stats` | The ratings and records: one [stats block](#stats-block) per position, plus the overall one. | | `lastActiveMonth` | The billing month (`YYYYMM`, UTC) the player was last counted in. `null` on test projects. | | `ratingWindowMmrs` | Open [rating windows](#rating-window), at most one per stats block. Empty outside a window. | ### Stats block One entry of `stats`. The block with `positionId: null` is the player's overall rating, which every ranked match moves. A pool whose game declares positions keeps one more block per position played: a match played in a position moves that block as well. | Field | Meaning | |---|---| | `positionId` | The position this block rates, or `null` for the overall block. | | `mmr.value` | The rating. | | `mmr.ratingDeviation` | Glicko-2 only: how far the true rating may be from `value`. `null` on Elo. | | `mmr.volatility` | Glicko-2 only: how consistent the player's results are. `null` on Elo. | | `mmr.lastRatedAt` | Glicko-2 only: when the rating last changed. `null` on Elo, and before a first ranked match. | | `wins`, `losses`, `ties` | The all-time ranked record. | | `matchCount` | Matches played, ranked or not. | | `currentStreak` | The current streak, signed: `3` is three wins in a row, `-2` two losses, `0` after a tie. | | `winStreak`, `loseStreak` | The current run of ranked wins, and of ranked losses: `0` when the player isn't on one. A tie ends both. | | `streakIgnoringTies` | Like `currentStreak`, but a tie neither ends nor extends it: win, win, tie, win is `3`. Read by [streak bonuses](https://inhouseranks.com/docs/guides/streak-bonuses) with `tiesBreakStreaks: false`. `null` until the block's first ranked match since this field was added. | | `seasonStartWins`, `seasonStartMatchCount` | `wins` and `matchCount` when the current season began, so this season's count is the difference. `null` on a block that hasn't been through a season end. | | `lastPlayedAt` | When the block last played a ranked match. `null` before the first, or if it hasn't played since this field was added. | | `groupRank` | The [rank band](https://inhouseranks.com/docs/guides/rank-bands) the rating falls in: `{ rank, tier, image, lower, upper }`. `null` when the pool has no bands or none covers the rating. Worked out on every read. | | `hideRating` | `true` when the pool's settings say not to show this rating yet. The rating is still returned. See [Hidden ratings](https://inhouseranks.com/docs/guides/hidden-ratings). | ### Rating window One entry of `ratingWindowMmrs`: an open Glicko-2 [rating window](https://inhouseranks.com/docs/guides/placement-matches). While it's open, `mmr` here moves and the stats block's stored rating waits. ```jsonc { "positionId": null, "trigger": "hoursSinceLastPlayed", "startedAt": "2026-11-21T19:05:29.738553Z", "lastPlayedAt": "2026-11-21T19:05:29.738553Z", "hidesRating": true, "matchIds": ["6b01eb7991a8d0c2e72af68e"], "matchCount": 1, "wins": 1, "startMmr": 1500, "startRatingDeviation": 350, "startVolatility": 0.06, "mmr": 1663.9483363044524, "ratingDeviation": 294.6523787689481, "volatility": 0.05999967537233814 } ``` | Field | Meaning | |---|---| | `positionId` | The stats block the window rates. `null` is the overall block. | | `trigger` | What opened it: `seasonStart`, `hoursSinceLastPlayed` or `always`. | | `startedAt`, `lastPlayedAt` | When the window's first and latest matches were recorded. | | `hidesRating` | `true` when the player's rating is hidden while the window is open. | | `matchIds`, `matchCount`, `wins` | The window's matches so far, oldest first, and how many of them were wins. | | `startMmr`, `startRatingDeviation`, `startVolatility` | The stored rating when the window opened. | | `mmr`, `ratingDeviation`, `volatility` | The window's rating as of its latest match. The stored rating takes these when the window closes. | ## Match `match` in responses. ```jsonc { "_id": "6b01eb7991a8d0c2e72af670", "thumbnail": null, "name": "Grand Final", "description": null, "poolId": "6b01eb7991a8d0c2e72af66b", "gameId": "6b01eb7991a8d0c2e72af66c", "createdAt": "2026-11-21T19:05:29.446480Z", "recordedAt": "2026-11-21T19:05:29.463796Z", "status": "recorded", "ranked": true, "result": { "teams": [ { "id": "", "place": 1, "pointsScored": null, "caption": null, "constituents": [ { "mmrEntityId": "6b01eb7991a8d0c2e72af66e", "mmrEntityExternalId": "alice", "positionId": null, "caption": null // ... } ], "calculations": { "startingMmr": 1500, "originalPlace": 1, "reassignedPlace": 1, "normalizedPlace": 1, "teamAdvantage": 0, "playerAdvantages": 0, "mmrWithAdvantages": 1500, "outcome": "win", "finalMmr": 1516 } } // ... 1 more ] }, "projectId": "6b01eb7991a8d0c2e72af669", "externalId": "m_1042", "matchmaking": null // ... } ``` | Field | Meaning | |---|---| | `_id` | Inhouse's id for the match. Send it as `matchId`. | | `externalId` | Your id for the match: what you send as `matchExternalId`. | | `name`, `description` | Optional labels. | | `poolId` | The id of the match's pool. | | `status` | `pending` until the match is rated, then `recorded`. | | `ranked` | Whether the match moves ratings. | | `createdAt`, `recordedAt` | When the match was written, and when it was rated. | | `result.teams` | The teams as stored: what you sent as a [match result](#match-result), plus each team's server-given `id`. Each player is named by `mmrEntityId` (Inhouse's id for them) and `mmrEntityExternalId` (yours, when you named them by it), and by their [user names](https://inhouseranks.com/docs/api#a-players-ids-also-have-user-names), `userId` and `userExternalId`. Once the match is recorded, each team also has `calculations`: its rating going in (`startingMmr`), its `outcome` and its rating coming out (`finalMmr`). | | `mmrConfig`, `gameConfig` | The pool's rating and game settings as they were when the match was created. The match is rated with these. | | `matchmaking` | `{ matchmakingRuleId, playerCount, regionId }` when the matchmaker formed the match, otherwise `null`. `regionId` is the [region](https://inhouseranks.com/docs/guides/matchmaking#regions) the lobby formed in, and is left out when its queue had no regions. | ### Match result `matchResult` in requests: the teams of a match. ```json { "teams": [ { "place": 1, "pointsScored": 12, "constituents": [ { "mmrEntityExternalId": "alice", "positionId": "optional", "caption": "optional" } ] } ] } ``` A team is a placement bucket: one entry per side, or per player in a free-for-all. **Teams need no id**: the server labels them for you. | Field | Rule | |---|---| | `teams[].place` | Starts at 1, and lower is better. Equal places are a draw. Every team needs a place before the match can be rated, unless places come from `pointsScored`. | | `teams[].pointsScored` | Optional score. Ignored when every team has a `place`. When any team has none, places are worked out from the scores by the pool's `winCondition`, and a missing or 0 score ranks tied last. | | `teams[].caption` | Optional free-form note on the team. It's what `caption` in `scores` sets. Doesn't affect ratings. | | `teams[].constituents` | One entry per player on that side. | | `constituents[].mmrEntityExternalId` | Your id for the player. A player the pool hasn't seen is created when the match is recorded. Also taken as `userExternalId`. | | `constituents[].mmrEntityId` | Instead of `mmrEntityExternalId`: Inhouse's id for the player, the `_id` of their rated user in this pool. Also taken as `userId`. | | `constituents[].positionId` | Optional: the position the player played. Must be one of the positions in the pool's `gameConfig.positions`. The match then moves their rating in that position as well as their overall rating. | | `constituents[].caption` | Optional free-form note on the player, such as "MVP". Doesn't affect ratings. | | `teams[].id` | Leave it out. Only a pool whose `gameConfig.teams` declares teams needs it, set to one of those keys. | A match holds at most 100 teams, and a team at most 50 players. A match you read back names each player by `mmrEntityId` and `mmrEntityExternalId`: the same two ids, under the names they're stored by, and again as `userId` and `userExternalId`. A `matchResult` takes them under those names too, and both names of an id with the same value, so one you read can be sent again as it is. ### Scores `scores` in requests: results set on teams or players that are already in a match, or being added to one. | Field | `/match/record` | `/match/score` | |---|---|---| | `teamId` | Names a team, by the id `match.found` gives it. | Not accepted. | | `mmrEntityExternalId` or `mmrEntityId` (or `userExternalId`, `userId`) | Names a player. The result goes to their team. | The same. A player not in the match is added. | | `place` | Sets the team's place: a whole number from 1 up. | Ignored: `/score` never sets a place. | | `pointsScored` | Sets the team's score, a number. | The same. | | `caption` | Sets the team's caption, a string. | The same. | On `/match/record`: - **Each entry names exactly one team or one player**, and it must already be in the match. An unknown team is `400 team-not-in-match` and an unknown player `400 player-not-in-match`. - **Only what an entry carries is written.** Teams that no entry names keep what they had. - **When any team is left without a place, the places come from the points**, by the pool's `winCondition`. - **Two entries that give one team different places or points** (two teammates reported differently) are `400 conflicting-scores`. - **A refused entry writes no scores and rates nothing.** A `matchResult`, `ranked`, `name` or `description` in the same call is applied before `scores` are checked, so on a match that already exists those stay written. - **On a new match, `scores` apply to the `matchResult`** you send with them. ## Match player One row of `matchPlayers`: one player's part in one match, written when the match is rated. ```jsonc { "_id": "6b01eb7991a8d0c2e72af671", "teamId": "", "positionId": null, "matchId": "6b01eb7991a8d0c2e72af670", "mmrEntityId": "6b01eb7991a8d0c2e72af66e", "mmrEntityExternalId": "alice", "poolId": "6b01eb7991a8d0c2e72af66b", "mmrChanges": [ { "positionId": null, "multiplier": null, "advantage": null, "before": 1500, "after": 1516, "bonus": null } ], "pointsScored": null, "outcome": "win", "ratingWindow": null // ... } ``` | Field | Meaning | |---|---| | `mmrEntityId` | Inhouse's id for the player: the `_id` of their rated user. Every row has it. | | `userId` | The same as `mmrEntityId`: its [user names](https://inhouseranks.com/docs/api#a-players-ids-also-have-user-names). | | `mmrEntityExternalId` | Your id for the player. | | `userExternalId` | The same as `mmrEntityExternalId`. | | `teamId` | The team they were on, as in `match.result.teams[].id`. | | `outcome` | `win`, `tie` or `lose`. | | `mmrChanges` | The rating change, one entry per stats block the match moved: `before` and `after`. The first, with `positionId: null`, is the overall rating. A player who played a position has a second entry for that position's rating. `bonus` is the [streak bonus](https://inhouseranks.com/docs/guides/streak-bonuses) the match paid on that rating, `{ kind, streak, mmr, mmrMultiplier }`, already counted in `after`, or `null` when it paid none. `mmr` is the rating it added, and `mmrMultiplier` the multiplier it used (`null` for a fixed bonus). | | `ratingWindow` | The player's [rating window](https://inhouseranks.com/docs/guides/placement-matches#read-a-window) as this match left it, or `null` when they weren't in one. | | `matchId`, `poolId` | The ids of the match and the pool. | A team's score is on the match, in `match.result.teams[].pointsScored`. A row names its player by both ids: `mmrEntityId`, Inhouse's, and `mmrEntityExternalId`, yours, each also under its user name. Read through [`GET /v1/match/get`](https://inhouseranks.com/docs/api/matches#get-a-match), each row also carries the player's `mmrEntity`. ## Party `party` in responses: players queued together. A party exists only while it waits in the queue. ```jsonc { "_id": "6b01eb7991a8d0c2e72af691", "poolId": "6b01eb7991a8d0c2e72af66b", "matchmakingRuleId": "ranked-1v1", "externalId": "party-alice", "players": [ { "mmrEntityExternalId": "alice", "mmrEntity": { "_id": "6b01eb7991a8d0c2e72af66e", "name": "alice", "stats": [ { "positionId": null, "mmr": { "value": 1545.086633573829 /* ... */ }, "wins": 3, "losses": 0, "ties": 0, "matchCount": 3, "groupRank": { "lower": 1500, "upper": null, "rank": "Gold", "tier": null, "image": "https://assets.example.com/ranks/gold.png" }, "hideRating": false // ... } ], "externalId": "alice" // ... } // ... } ], "regionIds": [], "enqueuedAt": "2026-11-21T19:05:29.758581Z", "status": "searching" // ... } ``` | Field | Meaning | |---|---| | `_id` | The party's id: `partyId` in events and in `/queue/leave`. | | `externalId` | Your id for the party: the `partyExternalId` it joined with, or `null`. | | `poolId` | The id of the pool it queued in. | | `matchmakingRuleId` | The [matchmaking rule](#matchmaking-rule) it queued under: the rule's `id`. | | `players` | One `{ mmrEntityExternalId, userExternalId, mmrEntity }` per player: the [rated user](#rated-user) as it was when they joined. Under a rule with [positions](https://inhouseranks.com/docs/guides/matchmaking#positions), each also has `positionIds`: the ones they listed, first choice first. | | `regionIds` | The [regions](https://inhouseranks.com/docs/guides/matchmaking#regions) the party will play in, as it listed them. Its lobby only forms in one of these. `[]` means any region the queue offers, and is what every party holds in a queue without regions. | | `enqueuedAt` | When the party joined. | | `status` | `searching`, or `cancelled` in the reply to `/queue/leave`. | ## Matchmaking rule One entry of a pool's `matchmakingRules`: a queue the pool offers. This is the rule every pool starts with: ```jsonc { "id": "ranked-1v1", "default": true, "minTeams": 2, "maxTeams": 2, "targetTeams": 2, "minPlayersPerTeam": 1, "maxPlayersPerTeam": 1, "targetPlayersPerTeam": 1, "maxPartySize": 1, "initialSkillGap": 100, "skillGapGrowthPerSecond": 10, "maxSkillGap": 400, "skillGapOpenedBy": "longestWait", "waitWeight": 0.5, "lobbyOptionsPerParty": 3, "relaxLobbySizeAfterSeconds": null, "maxTeamWinProbability": null, "maxQueueSeconds": 300, "teamPositions": null, "minPositionsPerPlayer": null, "regionIds": null } ``` `id`, the three team counts, the three per-team counts, `initialSkillGap` and `skillGapGrowthPerSecond` are required. | Field | Meaning | |---|---| | `id` | Your name for the rule, unique within the pool, at most 50 characters. Parties reference it as `matchmakingRuleId`. | | `default` | `true` makes this the pool's default rule: `/queue/join` without a `matchmakingRuleId` uses it. At most one rule per pool. `false` when left out. | | `minTeams`, `maxTeams`, `targetTeams` | Teams per lobby: at least 2. | | `minPlayersPerTeam`, `maxPlayersPerTeam`, `targetPlayersPerTeam` | Players per team. Every team in a lobby is the same size, and a free-for-all is one player per team. At most 200 players per lobby. | | `maxPartySize` | Most players in one party (default 1). A party always lands on one team, so this can't exceed `maxPlayersPerTeam`. | | `initialSkillGap` | The widest **skill gap** a lobby may have before anyone has waited: the highest-rated player in the lobby minus the lowest-rated, in rating points. Every player counts individually, party members included. | | `skillGapGrowthPerSecond` | Points the allowed gap widens per second of waiting. Whose wait counts is `skillGapOpenedBy`. | | `maxSkillGap` | The widest the gap ever gets. Leave it out to keep widening until parties expire. | | `skillGapOpenedBy` | Whose wait opens a lobby's gap. `longestWait` (the default): the party in the lobby that has waited longest, so a party that just joined can be placed in a wide lobby an older one opened. `shortestWait`: the party that has waited least, so every party in a lobby is inside the gap its own wait allows. See [Whose wait opens the gap](https://inhouseranks.com/docs/guides/matchmaking#whose-wait-opens-the-gap). | | `waitWeight` | How much time in queue counts against match quality when a round chooses which lobbies to form, 0–1 (default 0.5). See [How a round chooses lobbies](https://inhouseranks.com/docs/guides/matchmaking#how-a-round-chooses-lobbies). | | `lobbyOptionsPerParty` | How many lobbies a round considers for each party it builds from, 1–8 (default 3): the closest-rated lobby above the party, then ones that reach a little further up the ratings. Under a rule with several lobby sizes, each size gets this many. The default suits nearly every game. See [How many lobbies a round considers](https://inhouseranks.com/docs/guides/matchmaking#how-many-lobbies-a-round-considers). | | `relaxLobbySizeAfterSeconds` | A lobby keeps the target shape (`targetTeams` × `targetPlayersPerTeam`) until a party in it has waited this long. From then on that lobby may take any shape within the min and max bounds, whichever leaves the fewest players waiting. Leave it out to form only the target shape. | | `maxTeamWinProbability` | Each lobby is split into the most even teams possible, then refused if the favored team's predicted win probability is still above this (0.5–1). Leave it out to skip the check. | | `maxQueueSeconds` | A party still searching after this long ends as `expired` (default 300, at most 3600). | | `teamPositions` | The slots every team must fill: each position id and how many players a team has in it, for example `{ "tank": 1, "damage": 2, "support": 2 }`. The counts add up to the team size, so the three per-team counts must all equal their total. Players then join with the positions they'll play and are only ever given one of those. They're still matched on their overall rating. At most 50 positions; an id is at most 50 characters, with no `.` and no leading `$`. Saving the rule adds its positions to the pool's `gameConfig.positions`. Leave it out for a rule without positions. See [Positions](https://inhouseranks.com/docs/guides/matchmaking#positions). | | `minPositionsPerPlayer` | With `teamPositions`: how many of the rule's positions each player must list to join, from 1 to the number of positions. Left out, it is 1. | | `regionIds` | The regions this queue matches in, in place of the pool's `matchmakingRegionIds` and the project's, for example `["eu-west", "us-east"]`. Left out, the queue uses the pool's, or the project's when the pool sets none. `[]` turns regions off for this queue: it matches everyone together, whatever the pool and the project list. At most 20 regions, none twice. An id is 1–50 characters, with no leading or trailing spaces, no `.` and no leading `$`. See [Regions](https://inhouseranks.com/docs/guides/matchmaking#regions). | A rule with positions: ```jsonc { "id": "ranked-5v5", "default": true, "minTeams": 2, "maxTeams": 2, "targetTeams": 2, "minPlayersPerTeam": 5, "maxPlayersPerTeam": 5, "targetPlayersPerTeam": 5, "maxPartySize": 5, "initialSkillGap": 100, "skillGapGrowthPerSecond": 5, "maxSkillGap": 500, "skillGapOpenedBy": "longestWait", "waitWeight": 0.5, "lobbyOptionsPerParty": 3, "relaxLobbySizeAfterSeconds": null, "maxTeamWinProbability": null, "maxQueueSeconds": 300, "teamPositions": { "top": 1, "jungle": 1, "mid": 1, "bot": 1, "support": 1 }, "minPositionsPerPlayer": null, "regionIds": null } ``` ## Season `groupSeason`, `endedSeason` and `currentSeason` in responses. ```jsonc { "_id": "6b01eb7991a8d0c2e72af686", "poolId": "6b01eb7991a8d0c2e72af67e", "value": 2, "startDate": "2026-11-21T19:05:29.675365Z", "endDate": null // ... } ``` | Field | Meaning | |---|---| | `poolId` | The id of the pool whose season it is. | | `value` | The season's number, starting at 1. | | `startDate`, `endDate` | When the season began and ended. `endDate` is `null` on the current season. | | `mmrEntities` | On an ended season: every [rated user](#rated-user) as they stood when it ended. Empty on the current season. | --- # Errors Page: https://inhouseranks.com/docs/api/errors Every error code the API returns to an API key, by area. A failure is a non-2xx status with a `code` at the top level of the body, often with a `message`. The format is described under [Errors](https://inhouseranks.com/docs/api#errors) on the reference's first page. ## Authentication and access | Status | `code` | Meaning and what to do | |---|---|---| | 401 | `no-auth-header` | No `x-api-key` header. A key sent as `Authorization: Bearer …` is read as a session token and fails with `401 invalid-token`: use `x-api-key`. Without a key, a GET is treated as anonymous and can instead answer `400 group-id-required`, `401 auth-required` or a `404`. | | 401 | `invalid-api-key` | Unknown, revoked or archived key. Don't retry. | | 403 | `unauthorized-action` | You named a pool, match, rated user or party by Inhouse's id (`poolId`, `matchId`, `mmrEntityId`, `partyId`), and it belongs to another project. A key reaches only its own project's pools. | | 403 | `api-key-not-allowed` | A portal or consumer-app endpoint that an API key can't call, such as `/v1/games/update` or `/v1/groups/roles/update`. `message` says what to use instead: change a pool's game with `gameName` and `gameConfig` on `/v1/pool/update`. | ## Plan and rate limits | Status | `code` | Meaning and what to do | |---|---|---| | 402 | `over-plan-limit` | Your plan can't take this. `message` says which monthly allowance ran out: matches, or active players. Nothing was written or rated. Retries fail the same way until the month rolls over (UTC) or the plan changes. See [Plan allowances](https://inhouseranks.com/docs/guides/limits#plan-allowances). | | 429 | `rate-limited` | Back off and honor the `Retry-After` header (whole seconds). A live project has 100 requests a second across all its keys, unless your organization has been set another rate. Test-project keys hit this far sooner, because they have their own, much tighter limit. `message` says when it's your project's limit you hit, and which one. See [Rate limits](https://inhouseranks.com/docs/guides/limits#rate-limits). | ## Requests | Status | `code` | Meaning and what to do | |---|---|---| | 400 | none | `{"error": "Validation failed", "issues": [...]}`: the body or query failed schema validation. That includes a `matchResult` that isn't the documented shape, such as a `place` that isn't a number or `constituents` that isn't a list, and your own id sent as `matchId` or `mmrEntityId`, which take Inhouse's 24-character ids (yours go in `matchExternalId` and `mmrEntityExternalId`). Read `error`, not `code`. Each issue's `path` names the field. | | 400 | `renamed-field` | A field under a name it had before 18 November 2026, such as `groupId` for a pool, `ruleId`, `groupMid` or `matchMid`. `field` is the name you sent and `renamedTo` the one to send. Nothing was read or written. See [Field names before 18 November 2026](https://inhouseranks.com/docs/api#field-names-before-18-november-2026). | | 400 | `conflicting-player-ids` | One of a player's ids under both of its names with two different values: `userId` and `mmrEntityId`, or `userExternalId` and `mmrEntityExternalId` (see [user names](https://inhouseranks.com/docs/api#a-players-ids-also-have-user-names)). `field` is the user name you sent. Send one of them. Nothing was read or written. | | 400 | none | `{"error": "Invalid JSON"}`: the body isn't a JSON object. Send `{}`, never an empty body. | | 400 | `invalid-pagination` | A `page` that isn't a whole number from the list's first page up: below 1 on `/leaderboard`, `/rankings` and `/v1/pools`, below 0 on `match/list`. Also a `/leaderboard` `pageSize` outside 1–100. `message` names the bounds. | | 5xx | none | `{"error": "Internal server error"}`. Usually transient: retry with backoff. POSTs are not idempotent, so on an ambiguous failure read state back before sending again. A failure while a match is being rated leaves it as it was (pending or written, never stuck half-rated), so recording it again is safe. | ## Pools Some of these codes say `group` where these pages say pool. They are about your pools. | Status | `code` | Meaning and what to do | |---|---|---| | 404 | `group-not-found` | No such pool: a `poolId` that doesn't exist. | | 400 | `invalid-pool-id` | A `poolId`, in a body, a query or a URL, that isn't an Inhouse id (24 hex characters). A pool has no id of your own: send the `_id` that `/v1/pool/create` returned, or that `GET /v1/pools` lists. See [Moving a pool to its poolId](https://inhouseranks.com/docs/api#moving-a-pool-to-its-poolid). | | 400 | `invalid-player-filter` | `GET /v1/pools` with `userId` or `mmrEntityId`, Inhouse's id for a player. The list is filtered by your own id for a player only: send `userExternalId` (or `mmrEntityExternalId`). | | 400 | `removed-field` | `/v1/pool/create` with a `groupId` or a `poolId`, which is where an id of your own for the pool used to go. Leave it out. `field` is the name you sent. Nothing was created. | | 400 | `group-id-required` | `/v1/user/migrate` without a `poolId`. It needs a pool that already exists and never falls back to the default pool. `message` says what to send. | | 400 | `project-pools-must-be-solo` | You sent `trackMode: "team"`. Pools rate individuals: leave it out. | | 400 | `max-groups-reached` | The project already has as many pools as it can: 50, unless we've raised it for your organization. From `/v1/pool/create`, and from `/v1/pool/update` restoring an archived pool (`archived: false`). Nothing was created or restored. `message` has the count and the limit. Archive a pool you no longer use (`archived: true` on `/v1/pool/update`), or ask us to raise the limit. | | 400 | `invalid-matchmaking-rule` | A rule in `matchmakingRules` is inconsistent (`targetTeams` outside `minTeams`–`maxTeams`, say, or a duplicate `id`), or forms lobbies bigger than a match can be (`maxTeams` over 100, `maxPlayersPerTeam` over 50), or its `regionIds` isn't a valid list of regions. `message` names the rule and the constraint. | | 400 | `invalid-matchmaking-regions` | A pool's `matchmakingRegionIds`, on `/v1/pool/create` or `/v1/pool/update`, isn't a valid list of regions: an id that is empty, longer than 50 characters, padded with spaces, contains a `.` or starts with `$`, a region listed twice, or more than 20 regions. `message` names the problem. Nothing was saved. | | 400 | `group-ranks-missing-floor` | With `"rankMode": "rank"`: no band has `lower: null`. | | 400 | `group-ranks-missing-ceiling` | With `"rankMode": "rank"`: no band has `upper: null`. | | 400 | `group-ranks-not-contiguous` | With `"rankMode": "rank"`: there is a gap between two bands. | | 400 | `group-ranks-overlap` | With `"rankMode": "rank"`: two bands overlap. | | 400 | `group-rank-invalid-range` | A band's `lower` isn't below its `upper`. | | 400 | `group-rank-name-required` | A band has no name. | | 400 | `group-ranks-empty` | `"rankMode": "rank"` with no bands. | | 400 | `invalid-reset-rating-deviation` | `/v1/pool/season/end` with a `resetRatingDeviation` below 40. | | 409 | `season-already-ended` | Another `/v1/pool/season/end` for this pool ended the season first. Don't send it again unless you mean to end the new season too. | ## Players | Status | `code` | Meaning and what to do | |---|---|---| | 400 | `user-id-required` | A call that names no player: `/v1/user/create` without an `mmrEntityExternalId`, `/v1/user/update-rating` with neither `mmrEntityExternalId` nor `mmrEntityId`, or a portal edit that would remove a player's id. Every rated user needs your id for the player: Inhouse counts each person once a month by it, across your pools. | | 400 | `user-external-id-exists` | Another active rated user in the pool already has that `mmrEntityExternalId`: each one names one player per pool. Returned when restoring an archived rated user (`archived: false` on `/v1/mmr_entities/update`) whose `mmrEntityExternalId` was taken in the meantime. | | 404 | `mmr-entity-not-found` | No such player: an `mmrEntityId` that names no rated user, or on `/v1/user/update-rating` an `mmrEntityExternalId` nobody in the pool has. | | 400 | `user-ids-required` | `/v1/user/ratings` with an empty or missing `mmrEntityExternalIds`. Name at least one player. | | 400 | `too-many-user-ids` | `/v1/user/ratings` with more than 100 ids. Split the batch. `message` names the limit and what you sent. | | 400 | `no-players` | `/v1/user/migrate` with an empty or missing `players` list. | | 400 | `too-many-players` | `/v1/user/migrate` with more than 1000 players. `max` is the limit. Split the batch. | | 400 | `invalid-migration` | `/v1/user/migrate` found bad rows and wrote nothing. `errors` holds one `{index, mmrEntityExternalId, code, field, message}` per bad row, with `code` one of `player-not-an-object`, `user-id-required`, `duplicate-user-id`, `unknown-field`, `invalid-field`, `unknown-position`, `duplicate-position`, `glicko2-only-field`, `conflicting-streaks` or `match-count-too-low`. | ## Matches | Status | `code` | Meaning and what to do | |---|---|---| | 404 | `match-not-found` | No such match: a `matchId` that names none, or a `matchExternalId` you never used. On `/match/record` and `/match/score` an unused `matchExternalId` opens a new match instead, so there it's a `matchId` that names nothing, or a `/match/record` with no `matchResult` to create the match from. | | 400 | `match-id-required` | The call needs a match (`matchExternalId` or `matchId`) you didn't send. | | 400 | `match-result-required` | `/match/record` with no match reference and no `matchResult`: there is nothing to create the match from. | | 400 | `match-not-pending` | `/match/score`, `/match/update` or `/match/delete` on a match that is already recorded. On `/match/update` this only applies to `matchResult` and `ranked`: renaming works in any status. From `/match/record`: you sent a `matchResult` for a match that is written but not rated (retry with only the match's id), or another call is rating the match right now (retry shortly). | | 400 | `match-has-unplaced-teams` | `/match/record` on a match whose teams have neither places nor points. Assign places, or send scores with `/match/score` or in the record call's `scores`. A new match is refused before anything is written. | | 400 | `min-two-teams-required` | Rating a match with fewer than two teams, such as `/match/record` after `/match/score` named only one player. The match stays pending. | | 400 | `match-external-id-exists` | `/match/create` with a `matchExternalId` already used by another match in your project. (`/match/record` treats a used `matchExternalId` as that match.) | | 409 | `match-already-recorded` | `/match/record` on a match that is already recorded. Nothing changed: a recorded match is final. Record a new match under a new `matchExternalId`. After a timed-out `/match/record`, this answer means the first call went through. | | 409 | `rating-update-conflict` | `/match/record` or `/v1/pool/season/end` kept losing to other writes to some of the same players (many matches with one player recorded at the same moment). Nothing changed: send it again. Two or three at once are absorbed without this. | | 409 | `player-in-queue` | A player is waiting in this pool's matchmaking queue, so a match can't take them in: not a new one (`/match/record`, `/match/create`, `/match/import`, `/match/score` opening one), and not an existing one they aren't in yet (`/match/update`, `/match/score`). A match they're already in still records. `mmrEntityExternalIds` names them. Take the party out with `/queue/leave` first. | ## Match results and scores Refusals of a `matchResult` or a `scores` list. | Status | `code` | Meaning and what to do | |---|---|---| | 400 | `team-has-no-constituents` | A team in `matchResult` with an empty `constituents` list. | | 400 | `duplicate-mmr-entity` | The same player twice in one match: on two teams, or twice on one. Naming them once by `mmrEntityExternalId` and once by `mmrEntityId` counts. | | 400 | `constituent-missing-identifier` | A constituent with neither `mmrEntityExternalId` nor `mmrEntityId`, from `/match/create` and `/match/update`. | | 400 | `constituent-missing-mmr-entity-id` | The same, when `/match/record` rates the match. | | 400 | `team-not-found` | Only for pools created with a declared `gameConfig.teams`: a team's `id` isn't one of them. Pools created the default way need no team ids at all. | | 400 | `position-not-found` | A constituent's `positionId` isn't declared in the pool's `gameConfig.positions`. | | 400 | `invalid-mmr-entity-id` | A player's `mmrEntityId`, in a `matchResult` or a `scores` entry, isn't an Inhouse id (24 hex characters). `mmrEntityId` is the `_id` of the player's rated user: your own id for them goes in `mmrEntityExternalId`. The same for a `userId`, its user name, on any call: then `field` is `userId`, and your own id goes in `userExternalId`. Nothing was written. | | 400 | `invalid-mmr-entity-external-id` | A player's `mmrEntityExternalId` isn't a string. | | 400 | `mmr-entity-not-in-pool` | An `mmrEntityId` in a match (its result, or a `/match/score` entry) isn't a rated user of the match's pool. A match only ever names its own pool's players. `/match/record` answers `mmr-entities-length-mismatch` for the same thing. | | 400 | `too-many-teams` | A match has at most 100 teams. | | 400 | `too-many-players-in-team` | A team has at most 50 players. | | 400 | `too-many-scores` | A `scores` list names more players than a full match can hold (100 teams of 50). | | 400 | `no-scores` | `/match/score` with an empty `scores` list. | | 400 | `score-missing-identifier` | A `scores` entry has no `mmrEntityExternalId` or `mmrEntityId` (or, on `/match/record`, `teamId`). | | 400 | `score-multiple-identifiers` | A `/match/record` `scores` entry names a `teamId` and a player. Name one. | | 400 | `invalid-place` | A `/match/record` `scores` entry's `place` isn't a whole number from 1 up. | | 400 | `invalid-points-scored` | A `scores` entry's `pointsScored` isn't a number. | | 400 | `invalid-caption` | A `scores` entry's `caption` isn't a string. | | 400 | `player-not-in-match` | `/match/record` `scores` naming a player who isn't in the match. Or `/match/score` doing so on a pool created with a declared `gameConfig.teams`: adding a player on the fly needs the default, team-less pool. | | 400 | `team-not-in-match` | `/match/record` `scores` naming a `teamId` the match doesn't have. | | 400 | `conflicting-scores` | Two `/match/record` `scores` entries give one team different places or points, such as two teammates reported differently. | ## Imports | Status | `code` | Meaning and what to do | |---|---|---| | 400 | `no-matches` | `/match/import` without a non-empty `matches` list. | | 400 | `too-many-matches` | `/match/import` with more than 1000 matches. `max` is the limit. | | 400 | `invalid-source` | `/match/import` with a `source` other than `default` or `bgstats`. `allowed` lists them. | | 400 | `invalid-bgstats-data` | `/match/import` with `"source": "bgstats"` and no `data` object. | | 400 | `invalid-import` | `/match/import` found bad matches and wrote nothing. `errors` holds `{index, code}` per bad match, with `code` one of `match-not-an-object`, `invalid-play-date`, `min-two-players-required`, `player-not-an-object`, `player-missing-name`, `duplicate-player` or `player-missing-placement`. A match that fails *while* recording comes back in a `200` instead. | ## Matchmaking | Status | `code` | Meaning and what to do | |---|---|---| | 400 | `webhook-not-configured` | `/queue/join` on a project with no webhook endpoint that receives `match.found`. Add one in the portal: a formed match is announced only by webhook. | | 400 | `players-required` | `/queue/join` with an empty `players` list. | | 400 | `player-missing-user-id` | A `players` entry without a usable `mmrEntityExternalId` or `userExternalId` (1–100 characters). The queue takes your own id for a player, never Inhouse's: an `mmrEntityId` or `userId` alone gets this too. | | 400 | `duplicate-player` | The same `mmrEntityExternalId` twice in one `players` list. | | 400 | `party-too-large` | More players than the rule's `maxPartySize`, or than any team can hold (50). | | 400 | `party-skill-gap-too-wide` | The party's own rating spread is already wider than the rule's `maxSkillGap`, so it could never be placed. | | 400 | `positions-required` | `/queue/join` under a rule with `teamPositions`, with a player who listed fewer of its positions than the rule asks for (`minPositionsPerPlayer`: 1 unless the rule says otherwise). `message` names the rule's positions, the number needed and the player. Send `positionIds` for every player, first choice first. | | 400 | `invalid-position` | A player's `positionIds` on `/queue/join` names a position the rule has no slot for, names one twice, or isn't a list of position ids. `message` says which, and lists the rule's positions. | | 400 | `party-positions-conflict` | The party's players can't share a team: between the positions they listed there aren't enough different slots for all of them, such as two players who both list only `mid` under a rule with one `mid` per team. Have one of them list another position, or queue them apart. | | 400 | `invalid-region` | `/queue/join` with a `regionIds` that names a region the queue doesn't offer, names one twice, or isn't a list of region ids. `message` says which. For a region the queue doesn't offer, it also lists the queue's regions. A queue's regions are its rule's `regionIds`, else its pool's `matchmakingRegionIds`, else the project's. | | 409 | `player-already-queued` | A player in the party is already in a searching party in this pool. Leave that party first. | | 409 | `party-external-id-taken` | `/queue/join` with a `partyExternalId` another party in this pool's queue already has. Leave that party first, or send another id. | | 429 | `queue-full` | `/queue/join` while the project already has as many parties waiting as it can: 5,000 across all its pools and rules, unless we've raised it for your organization. Nothing was queued, and the party's players aren't held. Room comes back as parties are matched, expire or leave, so retry after the `Retry-After` header (a few seconds). If you see this, look for parties your game stopped waiting on and never took out with `/queue/leave`. See [Size limits](https://inhouseranks.com/docs/guides/limits#size-limits). | | 503 | `server-restarting` | `/queue/join` while the server restarts. The queue isn't stored, so a party queued now would be lost. Retry after the `Retry-After` header (a few seconds). Parties that were already waiting get a `party.cancelled` event whose `reason` is `server-shutdown`. | | 404 | `matchmaking-rule-not-found` | `/queue/join` or `/queue/stats` with a `matchmakingRuleId` the pool doesn't have. | | 404 | `default-matchmaking-rule-not-found` | `/queue/join` without a `matchmakingRuleId`, in a pool where no rule is `default`. Send a `matchmakingRuleId`, or mark one rule `"default": true`. | | 400 | `party-ref-required` | `/queue/leave` without a `partyId` or `partyExternalId`, or with both. Send one. | | 404 | `party-not-found` | The party isn't waiting in the queue: a wrong id, or it was placed, expired, was cancelled or already left (its event says which), or a server restart emptied the queue. | | 400 | `invalid-bucket-size` | `/queue/stats` with a `ratingBucketSize` or `skillGapBucketSize` that isn't a whole number from 1 to 10000. | ## Webhooks | Status | `code` | Meaning and what to do | |---|---|---| | 400 | `invalid-status` | `/v1/projects/webhook/deliveries` with a `status` other than `pending`, `delivered` or `failed`. |