Server API

Server API v2: read and write

Everything in v1, plus starting sessions, making and voiding cases, changing bans, clocking staff in and out, and webhooks. Needs a v2 key.

#Start

Base address: https://uplinkrblx.xyz/api/server/v2. A v1 key used here is refused with 403 wrong_version.

Terminal
curl https://uplinkrblx.xyz/api/server/v2/server \
  -H "Authorization: Bearer usk_your_key"

#Read

The same as v1, at the v2 address.

MethodPathWhat it does
GET/serverName, status and the live server: players, max players, queue, teams and join code
GET/playersPlayers in the server now, with team, callsign, permission, wanted level and linked Discord IDs
GET/players/:nameOrIdOne player: online, banned, last join, Discord IDs and their last 25 cases
GET/staff/onlineStaff in the server now
GET/sessionsThe running session (or null) and recent ones
GET/casesQuery: target (Roblox ID), type, q, limit (1-200, default 50), before (case number)Cases, newest first
GET/cases/:numberOne case
GET/bansActive bans
GET/shiftsQuery: days (1-90, default 7)Staff shift time
GET/shifts/openWho is clocked in now
GET/quotaThe weekly staff quota board
GET/departmentsDepartments with ranks and member counts
GET/departments/:id/membersA department's roster
GET/logsQuery: kind, q, limit (1-200, default 100), before (time in ms)Joins, leaves, kills, commands, mod calls and team changes

#Change

Changes are made in your name, as the admin who made the key, and show as (API: key name) in Uplink.

MethodPathWhat it does
POST/sessions/startBody: name, message, announceInGame (true to post it in game)Start a session
POST/sessions/endEnd the running session
POST/casesBody: type (warn, kick, ban, tempban, note or your own types), target (Roblox name or ID), reason, evidence, duration (30m, 12h, 7d, 2w)Make a case and run it in game
POST/cases/:number/voidVoid a case. A ban case unbans the player
PATCH/bans/:robloxIdBody: duration, or null for foreverChange how long a ban lasts
POST/shifts/startBody: discordIdClock a staff member in
POST/shifts/endBody: discordIdClock a staff member out

#Making a case

Terminal
curl -X POST https://uplinkrblx.xyz/api/server/v2/cases \
  -H "Authorization: Bearer usk_your_key" \
  -H "Content-Type: application/json" \
  -d '{"type":"warn","target":"DashCamDan","reason":"Driving on the sidewalk"}'
Answer
{
  "case": {
    "number": 42,
    "type": "warn",
    "status": "active",
    "target": { "robloxId": "1520318804", "name": "DashCamDan" },
    "moderator": { "discordId": "200000000000000007", "name": "Ava (API: Staff bot)" },
    "reason": "Driving on the sidewalk",
    "evidence": null,
    "inGame": true,
    "createdAt": 1760000000000,
    "voidedAt": null,
    "voidedBy": null
  },
  "inGame": { "ok": true }
}

#Webhooks

Up to 3 per key. Uplink sends a signed JSON POST to your https address when something happens on the server. Events, payloads and how to check the signature are on Webhooks.

MethodPathWhat it does
GET/webhooksThis key's webhooks and the events you can pick
POST/webhooksBody: url (https), events (a list)Add a webhook. Answers with its secret, once
POST/webhooks/:id/testSend a ping
POST/webhooks/:id/enableTurn a webhook back on after 20 failures in a row switched it off
DELETE/webhooks/:idDelete a webhook