Get started
Inhouse API
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-keyheader. A key looks likeinhouse-<test|live>-<projectId>-<secret>. - Content type:
application/jsonon 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
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:
{
"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
curl https://api.inhouseranks.com/v1/pool/leaderboard \
-H "x-api-key: $INHOUSE_API_KEY"{
"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 covers team games, draws, scoring as results come in, and safe retries.
Matchmaking flow
How a match moves from queue to rating. Your game server is the only side that talks to Inhouse: it holds the API key, queues parties, receives webhooks and reports results. Game clients never call Inhouse.
- Request you send
- Response
- Webhook Inhouse sends you
party._id that join returned. The result goes back in with the data.matchId from match.found.Step by step
- 1
Queue each party
Call
POST /v1/queue/joinwithplayers: [{mmrEntityExternalId}]. It's one call per party, so a 5v5 of solo players is 10 joins. Keep the returnedparty._id, because webhook events identify parties by it.Join returns
400 webhook-not-configuredif the project has no webhook endpoint that receivesmatch.found, and404 default-matchmaking-rule-not-foundif you didn't passmatchmakingRuleIdand the pool has no rule marked"default": true. - 2
Receive the match by webhook
match.foundcarriesmatchIdand the teams. Each team lists its parties, each party its players ({mmrEntityExternalId, mmrEntity}), and each team has awinProbability. Your receiver must:- check the
Inhouse-Signatureheader,t=<unix>,v1=<hex>, wherev1is the HMAC-SHA256 of"<t>.<raw body>"keyed by the endpoint's signing secret; - answer 2xx within 10 s. A failed attempt is retried after 4, 8, 16, 32 and 60 s (about 2 minutes in all), then dropped;
- dedupe on the event
id, which stays the same across retries.
Also handle
party.expired(the party waited its rule'smaxQueueSecondswithout a match) andparty.cancelled(the queue gave up on the party;reasonsays why). - check the
- 3
Seat the players
This part is entirely yours. Inhouse never hosts a match or connects players.
- 4
Record the result
One call:
POST /v1/match/recordwith the event'sdata.matchId(asmatchId) and the result inscores. It scores the match the matchmaker wrote and rates it in the same call.{ "matchId": "<data.matchId>", "scores": [ { "teamId": "<winningTeamId>", "place": 1 }, { "teamId": "<losingTeamId>", "place": 2 } ] }- A
scoresentry names a team by itsteamIdfrommatch.found, or a player bymmrEntityExternalId, and gives aplaceorpointsScored. - Always send the
matchId. Without it,/match/recordcan't find this match: it answers400 match-result-required, or writes a second match if you sent amatchResult. - Retrying is safe. A match is only rated once: if a
/match/recordtimed out and you send it again,409 match-already-recordedmeans the first call went through.
- A
Mermaid source
The same flow as a Mermaid sequence diagram, for docs of your own that render Mermaid.
sequenceDiagram
participant C as Game clients
participant S as Your game server
participant I as Inhouse
Note over C,I: 1. Queue (one call per party)
C->>S: Party wants to play (your own protocol)
S->>I: POST /v1/queue/join (players[].mmrEntityExternalId)
I-->>S: party._id (keep it)
Note over S,I: Fails with 400 webhook-not-configured or 404 default-matchmaking-rule-not-found
Note over S,I: 2. Match found
Note over I: Matchmaker forms a lobby
I->>S: webhook match.found (data.matchId, teams, winProbability)
Note over S: Check Inhouse-Signature HMAC, dedupe on event id
S-->>I: 2xx within 10 s (else retried for ~2 min, then dropped)
I->>S: webhook party.expired or party.cancelled
Note over C,I: 3. Play
S->>C: Seat players, run the match (entirely yours)
Note over S,I: 4. Record result
S->>I: POST /v1/match/record (matchId = data.matchId, a place per teamId)
Note over I: Scores and rates the match in this one call
I-->>S: match recorded (a repeat gets 409 match-already-recorded)
Note over S: Always send matchId, or record can't find this matchWhere next
| To | Read |
|---|---|
| Learn the five objects the API is built on | Core concepts |
| Record team games, draws and live scores | Record matches |
| Show a top-players board or a player's rating | Leaderboards and ratings |
| Run separate ladders per mode, queue or region | Pools and players |
| Let Inhouse build the lobbies | Matchmaking and Webhooks |
| Name ratings "Gold", hide new ratings, run placement matches | Rank bands, Hidden ratings, Placement matches |
| Bring over players and history from another system | Import and migrate |
| Know the quotas before you ship | Limits and billing |
| Look up an endpoint, a field or an error code | API reference |