Leaderboard
Materialized leaderboards and session outcomes
| Method | Path | What it does |
|---|---|---|
| GET | /api/players/{slug} | A player's public profile, record and seals |
| GET | /api/teams/{slug} | A team's public profile, record and seals |
| POST | /api/sessions/outcomes | Record a session outcome (escaped/duration) — triggers leaderboard + badge workers |
| GET | /api/leaderboard | Materialized leaderboard (global or per region) |
A player's public profile, record and seals#
/api/players/{slug}PublicParameters
| Name | In | Type | Description |
|---|---|---|---|
slugrequired | path | string |
Responses
| Status | Meaning |
|---|---|
200 | { player } |
404 | Not found |
A team's public profile, record and seals#
/api/teams/{slug}PublicParameters
| Name | In | Type | Description |
|---|---|---|---|
slugrequired | path | string |
Responses
| Status | Meaning |
|---|---|
200 | { team } |
404 | Not found |
Record a session outcome (escaped/duration) — triggers leaderboard + badge workers#
/api/sessions/outcomesSessionRequires a staff (dashboard) session holding at least the host venue role (the lowest staff tier); there is no API key for this route. The venue is resolved from the booking, not from the request body. Once per booking: a second call answers id: null and changes nothing. Hosts: see the dashboard guide at /dashboard/guides/escape-times.
Example request body
{
"bookingId": "BOOKING_ID",
"escaped": true,
"durationSec": 3130
}Responses
| Status | Meaning |
|---|---|
201 | Outcome recorded, or id: null if the booking already had one |
400 | INVALID_JSON or INVALID_INPUT (durationSec 1–86400, whole) |
401 | UNAUTHORIZED: no staff session |
403 | FORBIDDEN: not staff at the booking's venue |
404 | BOOKING_NOT_FOUND |
Example response
{
"id": "3f0c…"
}Materialized leaderboard (global or per region)#
/api/leaderboardPublicplayed counts confirmed bookings whose session is over, logged or not: a booking counts once the host logs an outcome, or once its slot is 24 hours past (as soon as it ends, for a room that does not record escape times). escapes and escapeRate are over logged outcomes only, and bestTimeSec is null until one of those escaped.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
region | query | string |
Example request
curl "https://myescaperoom.eu/api/leaderboard?region=Benelux"Responses
| Status | Meaning |
|---|---|
200 | Ranked entries |
Example response
{
"entries": [
{
"rank": 1,
"id": "team-cipher",
"slug": "team-cipher",
"kind": "team",
"name": "Team Cipher",
"region": "Benelux",
"played": 151,
"escapes": 142,
"escapeRate": 94,
"bestTimeSec": 2180,
"certified": true
}
]
}