API reference
API reference
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-keyheader. A key sent asAuthorization: Bearer …is read as a session token and fails with401 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.
poolIdis the_idthatPOST /v1/pool/createreturns andGET /v1/poolslists. 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/rankingsandGET /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
poolIdtoo. The<poolId>segment ofGET /v1/pool/<poolId>,.../rankingsand.../leaderboardis the same id. Those routes also take it as?poolId=. - Every endpoint that takes
matchExternalIdalso takesmatchId. Send one of the two. The tables on the following pages list onlymatchExternalId. 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
poolIdis400 invalid-pool-id, and your own id sent asmatchIdormmrEntityIdis a400whose message names the field it belongs in. An Inhouse id sent as an...ExternalIdis taken for an id of yours: usually a404, 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'spositionIdsand a party'sregionIds. - Your own ids are at most 100 characters.
- On an object, Inhouse's id is
_idand yours isexternalId. A player is a rated user, anmmrEntity, which is why the two fields that name one aremmrEntityIdandmmrEntityExternalId. A request, a reply, an event and a stored match all use those names, so amatchResultyou 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, inscores, in theplayersyou queue or migrate, and on the calls that create, correct or rename one.GET /v1/user/ratingstakesuserExternalIdsas well asmmrEntityExternalIds, andGET /v1/poolstakesuserExternalId. Send one name per id. The same value under both is fine, and two different values are400 conflicting-player-ids. - A reply has both, with the same value, and so does every event.
Wherever there is an
mmrEntityIdthere is auserIdbeside it, and wherever there is anmmrEntityExternalId, auserExternalId, at any depth. A list of your ids, such as the players a409 player-in-queuenames, comes asuserExternalIdstoo. 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:
{
"mmrEntityId": "6af2c0c9e1b84a3f9d5e7c21",
"userId": "6af2c0c9e1b84a3f9d5e7c21",
"mmrEntityExternalId": "alice",
"userExternalId": "alice"
// ...
}- The rated user itself comes once, as
mmrEntity, with its own ids as_idandexternalId. userIdis Inhouse's id, never yours. Your own id for a player isuserExternalId. AuserIdthat isn't an Inhouse id is400 invalid-mmr-entity-id, and its message says where your id goes. (Before 18 November 2026userIdheld your own id: see 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/poolsfilters by your own id only, so auserIdthere is400 invalid-player-filter, andPOST /v1/mmr_entities/update, which takes only Inhouse's, answers auserExternalIdalone with400 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.
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).
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.foundhaspoolIdand nogroupId. The rated users inside an event carry both, as they do in a reply. - A few fields that never had a group name: the
poolIdat the top of a leaderboard, a ratings or a queue-stats reply. (GET /v1/poolsalso answers its list aspools.)
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:
{ "code": "invalid-api-key" }Many also carry a message for the person reading the logs. Branch on
code, never on message:
{
"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. |
{
"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. |
| 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. |
| 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. |
| 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. |
| 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. |
Each endpoint lists the errors specific to it. All of them, in one place, are under 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. The ids a server makes up for teams are shown
as <teamAId> and <teamBId>.
Endpoints
Pools
| Call | |
|---|---|
POST /v1/pool/create |
Create a pool |
GET /v1/pool/<poolId>, GET /v1/pool |
Get a pool |
GET /v1/pools |
List pools |
POST /v1/pool/update |
Update a pool |
POST /v1/pool/season/end |
End a season |
Players
| Call | |
|---|---|
POST /v1/user/create |
Create a player |
GET /v1/user/ratings |
Get players' ratings |
POST /v1/user/update-rating |
Correct a rating |
POST /v1/mmr_entities/update |
Rename or archive a player |
POST /v1/user/migrate |
Migrate players |
Leaderboards
| Call | |
|---|---|
GET /v1/pool/<poolId>/leaderboard, GET /v1/pool/leaderboard |
Get the top 100 |
GET /v1/pool/<poolId>/rankings, GET /v1/pool/rankings |
List rankings |
Matches
| Call | |
|---|---|
POST /v1/match/record |
Record a match |
POST /v1/match/score |
Score a match |
POST /v1/match/create |
Create a pending match |
POST /v1/match/update |
Update a match |
POST /v1/match/delete |
Delete a match |
GET /v1/match/get |
Get a match |
GET /v1/match/list |
List matches |
POST /v1/match/import |
Import matches |
Matchmaking
| Call | |
|---|---|
POST /v1/queue/join |
Join the queue |
POST /v1/queue/leave |
Leave the queue |
GET /v1/queue/stats |
Queue stats |
GET /v1/projects/webhook/deliveries |
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). 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. |
groupId on POST /v1/pool/create |
Removed. |
Your own id for a pool in a URL (/v1/pool/ranked-1v1) |
/v1/pool/<poolId> |
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. |
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. |
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:
{
"code": "renamed-field",
"field": "groupId",
"renamedTo": "poolId",
"message": "\"groupId\" is now \"poolId\". Send \"poolId\" instead."
}What a request with an old name gets:
- A
...Midfield,groupIdwherever a pool is named,externalIdorruleIdon a queue call,userIds, or a player'spositionsunder a rule with positions:400 renamed-field. groupIdorpoolIdon/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
matchIdormmrEntityId:400 Validation failed, with a message naming the field it goes in. On a player inside amatchResultorscoresit is400 invalid-mmr-entity-id. - Your own id in
userId, anywhere, a player in amatchResult,scores,/v1/queue/joinor/v1/user/migrateincluded:400 invalid-mmr-entity-id, with"field": "userId"and a message saying your id goes inuserExternalId. Since 20 November 2026userIdis Inhouse's id, the user name ofmmrEntityId.
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/<poolId> |
GET /v1/pool/<poolId> |
POST /v1/mmr_entities/create |
POST /v1/user/create |
GET /v1/mmr_entities/<poolId> |
GET /v1/pool/<poolId>/rankings |
/v1/matches/... |
/v1/match/... |