One API for your whole ranked community
The Ranked Bedwars API is a JSON-over-HTTPS interface to everything the dashboard and the Discord bot store about your server: players and their profiles, per-season stats and leaderboards, games and their participants, seasons, parties, moderation records, and configuration. Anything you can see on your public portal you can read here, and with the right key you can write it too.
1. Create a key
Pick a permission level in the dashboard and copy the key once.
2. Send it as a Bearer token
Add Authorization: Bearer <key> to every request.
3. Call a route
Use your guild's Discord id in the path and read or write JSON.
export RBW_API_KEY="rbw_live_xxxxxxxxxxxxxxxx"
export GUILD_ID="812345678901234567"
# Top 10 players this season
curl "https://api.myrbw.dev/v1/guilds/$GUILD_ID/leaderboard?limit=10" \
-H "Authorization: Bearer $RBW_API_KEY"Getting and using an API key
Create a key
- Sign in and open your server's dashboard, then go to API Keys (
/dashboard/{guildId}/api-keys). You need dashboard access to the server. - Press Create key, give it a name that says what uses it (for example “Leaderboard website”), and optionally an expiry date.
- Copy the key straight away. It looks like
rbw_live_followed by 48 hex characters. It is shown once: only a one-way hash is stored, so a lost key can't be recovered, only replaced. - Store it as a secret (an environment variable or your host's secret manager). Never put it in front-end code, a public repository, or a Discord message.
Send it on every request
Authorization: Bearer rbw_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxOnly the Authorization header is used. A missing or unknown key is 401 unauthorized; an expired one is 401 key_expired; a key that was turned off is 403 key_disabled.
Key types
A standard or read-only key is bound to one guild: using it on any other guild is 403 guild_access_denied, whether or not that guild exists.
What a non-master key never sees
Responses to read-only and standard keys have credentials removed before they leave the server. Any field whose name contains password, secret, token, api_key, webhook, credential or ciphertext is dropped at any depth, so bot account passwords and stored third-party keys are never returned. The whole store (orders, refunds, payment secrets) and API key management are master-only.
Rotating and revoking
Create the new key first, switch your integration over, then delete the old one from the API Keys page. Deleting a key takes effect immediately. If a key leaks, delete it; you can also deactivate a key temporarily instead of deleting it. Setting an expiry on keys you hand to third parties limits the damage of a leak.
Conventions every route follows
# Register a player, then add a win to their stats
curl -X POST "https://api.myrbw.dev/v1/guilds/$GUILD_ID/players" \
-H "Authorization: Bearer $RBW_API_KEY" \
-H "Content-Type: application/json" \
-d '{"snowflake_id": "712345678901234567", "username": "NightOwl_Kyle"}'
curl -X POST "https://api.myrbw.dev/v1/guilds/$GUILD_ID/players/712345678901234567/stats/increment" \
-H "Authorization: Bearer $RBW_API_KEY" \
-H "Content-Type: application/json" \
-d '{"deltas": {"wins": 1, "games_played": 1, "elo": 25}}'Status codes and error bodies
Failures return a non-2xx status and a small JSON body. Switch on code, which is stable; error is a human-readable message that may change.
{
"error": "API key is not authorized for this guild",
"code": "guild_access_denied"
}Which reference do I need?
Standard API
For community developers. Uses a read-only or standard key from your dashboard and covers everything about your guild: players, stats, games, seasons, parties, moderation, configuration and the audit trail. This is what you want.
Master API
For the platform and for people running their own copy of the Ranked Bedwars database service. A master key spans all guilds, and adds guild administration, API key management, the store, the shop catalogue and plan requests, and developer controls. It is documented here for transparency and self-hosting; the hosted service does not issue master keys.
A master key can call every route in the Standard reference as well. Need help? Reach us on the support page.
Every route, with a live demo
Open a route to see what it does, its parameters, the response you should expect, and a box to try it. The demo runs in a sandbox by default, with sample data and the real access rules. Switch to Live API to call the real service with your own key.
Live demo settings
These apply to the “Try it” box on every route below. Nothing here is saved or sent anywhere except the request you press Send on.
The sandbox never touches a server. It answers with realistic data and applies the same access rules as the real API, so switch the key to see a 401 or 403.
Guild
The server your key belongs to. Changing a guild's tier or enabled flag, deleting it and restoring it are platform operations; see the Master reference.
Configuration
A guild's settings are one configuration row plus a state snapshot. Responses to read-only and standard keys never include credentials: any field whose name contains password, secret, token, api_key, webhook, credential or ciphertext is removed.
Players
A player has one global record (their Discord account) and one record per guild they registered in (username, nickname and privacy toggles). Anywhere a route takes {playerID} you may send the Discord id or the database id.
Stats & leaderboard
Per-season numbers for each player. Every route here takes an optional season_id and uses the guild's active season when you leave it out.
Games
A game moves through waiting › in_progress › completed (or cancelled). Completing a game scores every participant and updates their stats in one transaction.
Seasons
Stats are kept per season and a guild has exactly one active season. Seasons are numbered 1, 2, 3… automatically and a number is never reused.
Parties
Players queue together as a party. Calls that act for a player (create, invite, kick, transfer) need to know who: a key tied to a player is that player; otherwise send the `X-Actor-Player-ID` header with their Discord or database id.
Moderation
Punishments (mutes, bans), strikes, Elo decays and stat wipes. Each can be read per player or guild-wide. The staff member recorded on a write is the `X-Actor` header, else the key's name.
Game setup tables
Ranks, maps, modes, bots, queues, teams and perks are stored one row per entry: a `name` plus a `data` object holding the entry's settings. Bot rows never include the account password for non-master keys.
Raw tables & audit trail
Direct access to the per-player tables and the guild's audit trail. Most integrations should prefer the player routes above.