Skip to content

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

  1. In the dashboard, open Games and there For developers: in-game script, API keys and Roblox webhook.
  2. Under API tokens, click Create token, give it a name and choose the permissions.
  3. 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

PermissionAllows
Read players and reportsGET on players and cases
Delete player dataDELETE on a player
Create reportsReserved 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:

HTTP
GET /api/v1/players/156 HTTP/1.1
Host: modhelm.com
Authorization: Bearer mh_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Tokens start with mh_ followed by 40 characters. Use HTTPS only.

Rate limits

Each token may make 120 requests per minute. Every response carries:

HTTP
X-RateLimit-Limit: 120
X-RateLimit-Remaining: 117
X-RateLimit-Reset: 1761134400

When the limit is reached you get 429 with a Retry-After header in seconds. Wait that long before the next request.

Endpoints

Health

HTTP
GET /api/v1/health

Returns 200 when the API is up. No token needed.

Get a player

HTTP
GET /api/v1/players/{robloxUserId}

Permission: Read players and reports. Returns the player's profile and everything your server stores about them:

JSON
{
  "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

HTTP
GET /api/v1/cases?status=open&robloxUserId=156&limit=50&cursor=…

Permission: Read players and reports.

ParameterValuesDefault
statusopen, actioned, acquitted, allall
robloxUserIdA Roblox user IDnone
limit1 to 10050
cursorThe nextCursor of the previous pagenone

Response:

JSON
{
  "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

HTTP
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:

JSON
{ "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.

JSON
{ "error": { "code": "forbidden", "message": "You don't have permission to do that." } }
StatusCodeMeaning
400validation_failedA parameter is missing or invalid
401unauthorizedToken missing, wrong or revoked
403forbiddenToken lacks the permission
404not_foundUnknown player or server
429rate_limitedToo many requests, see Retry-After
500internalSomething went wrong on our side

Example

Shell
curl -H "Authorization: Bearer $MODHELM_TOKEN" \
  "https://modhelm.com/api/v1/cases?status=open&limit=10"
JavaScript
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.