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.
| Method | Path | What it does |
|---|---|---|
| GET | /server | Name, status and the live server: players, max players, queue, teams and join code |
| GET | /players | Players in the server now, with team, callsign, permission, wanted level and linked Discord IDs |
| GET | /players/:nameOrId | One player: online, banned, last join, Discord IDs and their last 25 cases |
| GET | /staff/online | Staff in the server now |
| GET | /sessions | The 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/:number | One case |
| GET | /bans | Active bans |
| GET | /shiftsQuery: days (1-90, default 7) | Staff shift time |
| GET | /shifts/open | Who is clocked in now |
| GET | /quota | The weekly staff quota board |
| GET | /departments | Departments with ranks and member counts |
| GET | /departments/:id/members | A 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.
| Method | Path | What it does |
|---|---|---|
| POST | /sessions/startBody: name, message, announceInGame (true to post it in game) | Start a session |
| POST | /sessions/end | End 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/void | Void a case. A ban case unbans the player |
| PATCH | /bans/:robloxIdBody: duration, or null for forever | Change how long a ban lasts |
| POST | /shifts/startBody: discordId | Clock a staff member in |
| POST | /shifts/endBody: discordId | Clock 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.
| Method | Path | What it does |
|---|---|---|
| GET | /webhooks | This 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/test | Send a ping |
| POST | /webhooks/:id/enable | Turn a webhook back on after 20 failures in a row switched it off |
| DELETE | /webhooks/:id | Delete a webhook |