API reference
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 and 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). Under a rule with 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 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: 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
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
{
"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, 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:
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"] }
]
}'{
"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:
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" }]
}'{
"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
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
{
"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
curl "https://api.inhouseranks.com/v1/queue/stats?matchmakingRuleId=ranked-1v1" \
-H "x-api-key: $INHOUSE_API_KEY"Response 200
{
"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 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 and what became of it. They are kept for 7 days. Use it to 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
curl "https://api.inhouseranks.com/v1/projects/webhook/deliveries?limit=2" \
-H "x-api-key: $INHOUSE_API_KEY"Response 200
{
"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. |