Customer API
Your own tools can read your organisation's data with an API key: a Discord bot, a staff panel, a spreadsheet, a script, or your FiveM server itself. The API reads your organisation only. A key never reaches another customer's servers.
- Base URL:
https://api.sculkac.com/v1/api(version 1) - Format: JSON over HTTPS
- OpenAPI 3.1 document: api.sculkac.com/v1/api/openapi.json, also at /docs/api/openapi.json. It is generated from the same contract the dashboard uses.
Make a key
- In the dashboard, open API keys. You need a role that can manage API keys: Owner, Management, Admin or Developer.
- Name the key and pick only what it needs. You can also limit it to some of your servers.
- Confirm with your authenticator code. The full key is shown once. Sculk keeps only a hash of it.
A key can never do more than you can. You can only pick permissions your role has, and only servers you can reach. Each request checks your role and servers again.
A key stops by itself when the person who made it leaves the organisation, or when their role no longer has a permission the key holds. The API keys screen shows that it was revoked, and why. If their servers are narrowed, the key reads only the servers they still reach.
Revoking a key stops it at once. The next request answers 401. To rotate a key, make a new one, switch your tool to it, then revoke the old one. The API keys screen shows when and from which address each key was last used.
| Permission | What the key can read or do |
|---|---|
| workspace.read | Your organisation, its servers and their status, and the detections catalogue |
| cases.read | Cases with an evidence summary, bans (imported ones too), and server events |
| cases.evidence | Every evidence row on a case |
| players.read | Players seen on your servers, and each player's sessions, cases and bans |
| players.identifiers | Personal data, off unless you tick it. The masked identifiers on each player, such as license:…a1b2. Sculk never stores the raw ones, so the API cannot return them |
| appeals.read | Appeals and what the player wrote. Never their email |
| audit.read | Your audit log |
| moderation.kick, moderation.ban, moderation.unban | Kick, ban and lift a ban. Each goes through the same signed command, pause switch, breaker limits and role ban limits as the dashboard |
Send a key
Send the key in the Authorization header. A request with a key needs no cookie and no CSRF token. Keep the key on your server. Never put it in a FiveM client script, a browser page or a public repository.
curl
curl -s "https://api.sculkac.com/v1/api/cases?limit=20" \
-H "Authorization: Bearer $SCULK_API_KEY"
Node
// Node 18+ or any runtime with fetch
const SCULK = 'https://api.sculkac.com/v1/api';
const headers = { Authorization: `Bearer ${process.env.SCULK_API_KEY}` };
const res = await fetch(`${SCULK}/cases?status=needs_review`, { headers });
if (res.status === 429) throw new Error(`Slow down: retry in ${res.headers.get('retry-after')} s`);
if (!res.ok) throw new Error((await res.json()).reason);
const { items, next } = await res.json();
Lua (from your FiveM server)
Call it from a server script only, with the key in a server convar that clients can't read: set sculk_api_key "sculk_…" in server.cfg (set, not setr, so it never reaches players).
-- server.lua
local SCULK = 'https://api.sculkac.com/v1/api'
local KEY = GetConvar('sculk_api_key', '')
local function sculkGet(path, cb)
PerformHttpRequest(SCULK .. path, function(status, body, headers)
if status == 429 then
print(('[sculk] rate limited, retry in %s s'):format(headers['Retry-After'] or headers['retry-after'] or '?'))
return cb(nil)
end
if status ~= 200 then
print(('[sculk] %s answered %d'):format(path, status))
return cb(nil)
end
cb(json.decode(body))
end, 'GET', '', { ['Authorization'] = 'Bearer ' .. KEY })
end
RegisterCommand('sculkbans', function(source)
if source ~= 0 then return end -- console only
sculkGet('/bans?status=active&limit=10', function(page)
if not page then return end
for _, ban in ipairs(page.items) do
print(ban.code, ban.player.name, ban.reason)
end
end)
end, true)
Read routes
All under https://api.sculkac.com/v1/api.
| Route | Permission | Filters |
|---|---|---|
| GET /cases | cases.read | server, from, to, detection, status (needs_review, confirmed, closed), player |
| GET /cases/{id} | cases.read | evidenceRows is filled only when the key holds cases.evidence |
| GET /bans | cases.read | server, from, to, detection, status (active, lifted, expired), source (import for bans you imported, also engine, staff, evasion, sync, discord), player |
| GET /appeals | appeals.read | server, from, to, status |
| GET /players | players.read | server, from, to. The window defaults to 7 days, at most 30 |
| GET /servers/{server}/players/{ref} | players.read | One player: name, first and last seen, up to 50 sessions, case count, bans. identifiers is filled only when the key holds players.identifiers |
| GET /audit | audit.read | server, from, to, action: an exact action, or a prefix ending in a dot, such as moderation. |
| GET /events | cases.read | server, from, to, kind (detection, join, leave), detection, player. The window defaults to 24 hours, at most 7 days |
| GET /detections | workspace.read | The detections catalogue: id, name, category, class, strongest action, status. Never thresholds |
| GET /servers | workspace.read | Each server: online (heard from in the last 90 seconds), last seen, resource version, mode, paused |
Times are ISO 8601 with a time zone: from is inclusive, to is exclusive. Each case carries an evidence summary: how many evidence rows it has, the row furthest over its threshold, how many screenshots it has, and whether it has a replay.
The first version of these routes lived under /v1/org/… (for example /v1/org/cases). Those paths still answer the same, but are deprecated: use /v1/api/….
Write routes
Only with the matching permission. Each one is the dashboard's own action: the same signed command, the same pause switch and breaker, the same role limits. A ban longer than the key creator's role allows becomes a ban request (202) for someone with a higher limit to approve. Every write is in your audit log in full.
| Route | Permission | Body |
|---|---|---|
| POST /servers/{server}/players/{ref}/kick | moderation.kick | { "reason": "…" } (10 to 500 characters) |
| POST /servers/{server}/players/{ref}/ban | moderation.ban | { "reason": "…", "duration_s": 86400 } or "perm": true; "scope": "org" needs the Network plan |
| POST /servers/{server}/bans/{id}/unban | moderation.unban | { "reason": "…", "overturned": false } |
Config and proposals
A key can read a server's config and propose changes to it. A proposal never applies by itself. Sculk replays the last 7 days of the server and stores the change with how many players it would have affected. Someone on your team confirms it under Proposals in the dashboard, with their authenticator code, and can undo it in one click.
| Route | Permission | Body or filters |
|---|---|---|
| GET /me | any | The calling key: name, permissions, servers, expiry. Never the secret |
| GET /servers/{server}/config | config.read | The config in force: version, mode, each detection's preset, action and parameters |
| GET /servers/{server}/config/versions | config.read | History, newest first: who, when, from where, and what changed |
| GET /servers/{server}/proposals | config.read | status (pending, applied, cancelled, expired, undone) |
| POST /servers/{server}/config/proposals | config.propose | { "detection": "aim.snap", "preset": "high", "reason": "…" }, or { "mode": "report", "reason": "…" }. action and params with the custom preset; max_action may lower a ceiling |
| POST /servers/{server}/bans/{id}/unban-proposals | moderation.unban.propose | { "reason": "…" }. The ban stays in force until someone confirms |
| POST /proposals/{id}/cancel | either propose permission | Withdraws a pending proposal this key made |
config.propose needs a role with config.write, and moderation.unban.propose needs moderation.unban, but neither lets the key change anything. At most 20 proposals an hour per key, and 10 waiting per server from keys.
Sculk MCP server
@moomoodevelopments/sculk-mcp puts these routes in front of your agent. It works with MCP-compatible agents. It runs on your machine, reads the key from SCULK_API_KEY, and only offers the tools your key allows. It has no tool to kick, ban, unban, confirm or undo: the agent proposes, you approve, and you can undo it.
{ "command": "npx", "args": ["-y", "@moomoodevelopments/sculk-mcp"], "env": { "SCULK_API_KEY": "sculk_…" } }
Pages
Results come newest first, 50 at a time by default (limit 1 to 200). When there is more, the answer has a next cursor. Send it back as cursor with the same filters. At the end, next is null.
async function* allCases(params = {}) {
let cursor;
do {
const q = new URLSearchParams({ ...params, limit: '200', ...(cursor ? { cursor } : {}) });
const res = await fetch(`https://api.sculkac.com/v1/api/cases?${q}`, { headers: { Authorization: `Bearer ${process.env.SCULK_API_KEY}` } });
if (!res.ok) throw new Error((await res.json()).reason);
const page = await res.json();
yield* page.items;
cursor = page.next;
} while (cursor);
}
for await (const c of allCases({ from: '2026-11-01T00:00:00Z' })) console.log(c.at, c.detection, c.player.name);
Ask only for what changed
Every read answers with an ETag. Send it back as If-None-Match: if nothing changed, the API answers 304 with no body. A 304 still counts towards your limit, but it is fast and small.
curl -s -i "https://api.sculkac.com/v1/api/servers" \
-H "Authorization: Bearer $SCULK_API_KEY" \
-H 'If-None-Match: W/"…the ETag from last time…"'
To hear about new cases, bans and appeals as they happen, set up Discord webhooks for each server in the app (under Discord) instead of polling the API.
Limits
- 120 requests a minute per key, and 600 a minute per organisation across all keys.
- Every answer carries
RateLimit-Limit,RateLimit-RemainingandRateLimit-Reset(seconds until the minute resets). - Over either limit, the API answers
429withreason: "rate_limited", aRetry-Afterheader and aretry_afterfield, both in seconds. - An organisation can have 10 active keys at a time.
Errors
Every error is JSON with a stable reason and a readable message.
| Status | reason | Means |
|---|---|---|
| 400 | invalid_request, invalid_cursor, invalid_window, window_too_long | A filter or cursor is wrong |
| 401 | invalid_api_key | The key is missing, unknown, revoked or expired, or it stopped because its creator left or lost a permission |
| 403 | scope_required | The key does not hold the permission for this route |
| 403 | server_out_of_scope | The server is outside the key's servers, or outside its creator's |
| 403 | forbidden | The creator's role no longer allows this on that server |
| 404 | not_found | No such case, player or server in your organisation |
| 403 | plan_required | Your plan does not include this part of the API |
| 409 | proposal_exists, proposal_not_pending, ban_not_active | That ban already has a proposal waiting, the proposal was already handled, or the ban is already lifted |
| 429 | rate_limited | Slow down. See Retry-After |
| 429 | too_many_pending | 10 proposals from keys are already waiting on this server: confirm or decline some first |
What the API shows
- Players are shown the way the dashboard shows them. A player is a salted player ref (different on each server) and their in-game name. Identifiers appear only as masks, and only for a key with
players.identifiers. Sculk never stores a raw licence, Discord id or IP address, so the API can't return one. - It returns what Sculk still keeps. Retention is the same as the dashboard's, and the API stores nothing longer. See Data and retention.
- It is audited. Making, revoking and refused requests appear in your audit log. Any kick, ban or unban by a key appears in full as
apikey:<id>with the name of the person who made it. Reads are counted per hour on the key's row in API keys.