API
Tokens, the players and cases endpoints, erasure through the API, rate limits and error format of the Modhelm REST API.
3 min read
The Modhelm API lets your own tools read the moderation data of your server and delete a player's data. It is meant for sheets, internal dashboards and automations. Game servers do not need it: bans are enforced by Roblox and reports go through the MemoryStore queue.
Create a token
- In the dashboard, open Games and there For developers: in-game script, API keys and Roblox webhook.
- Under API tokens, click Create token, give it a name and choose the permissions.
- Copy the token. It is shown only once. Later you only see the last four characters.
A server can have up to 5 active tokens. You can revoke a token in the same place or on the Connections page with Revoke. Tools using it stop working immediately. Creation and revocation are written to the audit log.
Permissions
| Permission | Allows |
|---|---|
| Read players and reports | GET on players and cases |
| Delete player data | DELETE on a player |
| Create reports | Reserved for a report endpoint that is not open yet. You can leave it off |
A token always belongs to one server and only sees that server's data.
Authentication
Send the token as a bearer token:
GET /api/v1/players/156 HTTP/1.1
Host: modhelm.com
Authorization: Bearer mh_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxTokens start with mh_ followed by 40 characters. Use HTTPS only.
Rate limits
Each token may make 120 requests per minute. Every response carries:
X-RateLimit-Limit: 120
X-RateLimit-Remaining: 117
X-RateLimit-Reset: 1761134400When the limit is reached you get 429 with a Retry-After header in seconds. Wait that long before the next request.
Endpoints
Health
GET /api/v1/healthReturns 200 when the API is up. No token needed.
Get a player
GET /api/v1/players/{robloxUserId}Permission: Read players and reports. Returns the player's profile and everything your server stores about them:
{
"player": {
"robloxUserId": "156",
"username": "builderman",
"displayName": "builderman",
"accountCreatedAt": "2006-03-08T17:17:52.000Z",
"previousUsernames": [],
"profileUrl": "https://www.roblox.com/users/156/profile"
},
"activePunishment": {
"id": "…",
"type": "ban_temp",
"active": true,
"gameId": null,
"caseId": "…",
"reasonPublic": "Banned for harassing other players.",
"reasonPrivate": "Second report this month.",
"durationSeconds": 604800,
"startsAt": "2026-10-20T18:02:11.000Z",
"expiresAt": "2026-10-27T18:02:11.000Z",
"excludeAltAccounts": false,
"createdBy": "discord:…",
"createdAt": "2026-10-20T18:02:11.000Z",
"revokedAt": null,
"revokeReason": null,
"revokedVia": null
},
"punishments": [ … ],
"cases": [ … ],
"appeals": [
{ "id": "…", "number": 3, "status": "rejected", "autoReason": null, "attempt": 1, "punishmentId": "…", "source": "web", "createdAt": "…", "decidedAt": "…", "nextAllowedAt": "…" }
],
"notes": [
{ "id": "…", "body": "Warned in chat on Friday.", "pinned": false, "authorId": "…", "authorName": "…", "createdAt": "…", "updatedAt": "…" }
]
}Punishment types are ban_perm, ban_temp and warn. gameId is null when the punishment covers all games. Unban request statuses are pending, accepted, rejected and auto_rejected; autoReason is too_early, cooldown or max_attempts for automatic rejections. Times are ISO 8601 in UTC.
List cases
GET /api/v1/cases?status=open&robloxUserId=156&limit=50&cursor=…Permission: Read players and reports.
| Parameter | Values | Default |
|---|---|---|
| status | open, actioned, acquitted, all | all |
| robloxUserId | A Roblox user ID | none |
| limit | 1 to 100 | 50 |
| cursor | The nextCursor of the previous page | none |
Response:
{
"items": [
{
"id": "…",
"number": 12,
"status": "open",
"decision": null,
"category": "exploiting",
"source": "discord",
"robloxUserId": "156",
"username": "builderman",
"displayName": "builderman",
"gameId": "…",
"gameName": "Train Boss",
"reporterDiscordId": "…",
"evidenceCount": 2,
"decidedBy": null,
"decidedByStaff": false,
"createdAt": "2026-10-22T09:14:03.000Z",
"decidedAt": null
}
],
"nextCursor": "…"
}Newest first. nextCursor is null on the last page. Statuses are open, actioned and acquitted; decisions are ban_perm, ban_temp and acquit; sources are discord, web, game, manual and staff.
Delete a player's data
DELETE /api/v1/players/{robloxUserId}Permission: Delete player data. Deletes reports with evidence, notes, unban requests and punishments of this player on your server. Active Roblox bans stay in place and are counted in the answer:
{ "robloxUserId": "156", "deleted": { "cases": 2, "evidence": 3, "notes": 1, "appeals": 0, "punishments": 1 }, "activeBans": 1 }The action is written to the audit log with the token's name. See Privacy for server operators for what deletion covers.
Errors
Errors are JSON with a stable code and a translated message. The language follows the Accept-Language header.
{ "error": { "code": "forbidden", "message": "You don't have permission to do that." } }| Status | Code | Meaning |
|---|---|---|
| 400 | validation_failed | A parameter is missing or invalid |
| 401 | unauthorized | Token missing, wrong or revoked |
| 403 | forbidden | Token lacks the permission |
| 404 | not_found | Unknown player or server |
| 429 | rate_limited | Too many requests, see Retry-After |
| 500 | internal | Something went wrong on our side |
Example
curl -H "Authorization: Bearer $MODHELM_TOKEN" \
"https://modhelm.com/api/v1/cases?status=open&limit=10"const res = await fetch("https://modhelm.com/api/v1/players/156", {
headers: { Authorization: `Bearer ${process.env.MODHELM_TOKEN}` },
});
const data = await res.json();
console.log(data.activePunishment);Good practice
- Keep tokens in environment variables or a secret store, never in code or in Discord.
- Create one token per tool with only the permission it needs.
- Delete tokens you no longer use. The Last used column shows which ones are idle.
- Treat the API as read mostly. Decisions belong in the dashboard or in Discord, where the full context and the audit trail live.