API v1.0  ·  stable

API Reference

Everything you need to integrate WESK RankBot into your Roblox game. All endpoints accept JSON and return JSON.

Base URL: https://api.wesk.dev/v1

Authentication

All requests must include your API key in the Authorization header. Generate your key from the dashboard.

Never expose your API key in client-side scripts. Always call the WESK API from a server-side Script, not a LocalScript.
-- Lua (server script) local HttpService = game:GetService("HttpService") local response = HttpService:RequestAsync({ Url = "https://api.wesk.dev/v1/rank", Method = "POST", Headers = { ["Authorization"] = "Bearer YOUR_API_KEY", ["Content-Type"] = "application/json" }, Body = HttpService:JSONEncode({ groupId = 9876543, userId = 123456, action = "promote" }) })
POST/setRankAll Plans

Set Rank

Sets a user's rank in the group to the exact rank ID specified. Overwrites their current rank.

ParameterTypeDescription
groupIdrequirednumberRoblox group ID linked to your token.
userIdrequirednumberRoblox User ID to rank.
actionrequiredstring"setRank" for this endpoint.
targetRankrequirednumberTarget rank (1–254) in your group.
{ "success": true, "fromRank": 3, "toRank": 5 }
GET/rank/:groupId/:userIdAll Plans

Get Rank

Returns the current rank and role name for a user in the group.

ParameterTypeDescription
groupIdrequirednumberRoblox group ID (URL param).
userIdrequirednumberRoblox User ID (URL param).
{ "rank": 5, "roleName": "Lieutenant" }
POST/rankAll Plans

Promote

Promotes a user by one rank. Fails gracefully if they are already at the highest rank.

ParameterTypeDescription
groupIdrequirednumberRoblox group ID.
userIdrequirednumberRoblox User ID to promote.
actionrequiredstring"promote"
{ "success": true, "fromRank": 4, "toRank": 5 }
POST/rankPro + Max

Demote

Demotes a user by one rank. Available on Pro and Max plans only.

ParameterTypeDescription
groupIdrequirednumberRoblox group ID.
userIdrequirednumberRoblox User ID to demote.
actionrequiredstring"demote"
GET/group/infoAll Plans

Group Info

Returns metadata about the group linked to your API key.

{ "groupId": 9876543, "name": "WESK Community", "memberCount": 12400, "roleCount": 12 }
GET/group/rolesAll Plans

Group Roles

Returns all roles in the linked group with their IDs and names.

{ "roles": [ { "id": 1, "name": "Guest", "rank": 1 }, { "id": 5, "name": "Lieutenant", "rank": 100 }, { "id": 12, "name": "Commander", "rank": 200 } ] }

Error Codes

All errors return a consistent JSON shape with a machine-readable message.

HTTPDescription
400Missing or malformed request parameters.
401API key missing or invalid.
403Token not authorized for this group or action.
404User is not a member of this group.
429Monthly request limit reached for your plan.
502Roblox API error — upstream issue.

Rate Limits

Limits are per API key per month. Dedicated instances (Max plan) are isolated.

PlanRequests/month
Starter100
Pro5,000
MaxUnlimited
Rate limit headers are included in every response: X-RateLimit-Remaining and X-RateLimit-Reset.

RankService Module

Drop-in Lua module for Roblox. Wraps the HTTP API with automatic retry, error handling, and typed returns.

-- Place in ServerScriptService local RankService = require("wesk.RankService") RankService.init("YOUR_API_KEY") -- Promote a player on join game.Players.PlayerAdded:Connect(function(player) local ok, err = RankService.promote(player.UserId) if not ok then warn("Rank failed: " .. err) end end)

AppCenter Module

Configurable application center. Define questions, set auto-rank on accept, and wire up webhooks.

local AppCenter = require("wesk.AppCenter") AppCenter.init({ apiKey = "YOUR_API_KEY", questions = { "Why do you want to join?", "What rank are you applying for?" }, autoRank = true, acceptRankId = 3, webhookUrl = "https://discord.com/api/webhooks/..." })

Migration Kit

Moving from Blox-Link, RoGold, or a custom solution? The migration kit maps your existing rank IDs, transfers config, and goes live with zero downtime.

Migration Kit is available on the Max plan only.
Blox-Link compatCustom HTTPZero-downtime swapConfig importRank ID mapping