Public API

Developers can use Viscra's public API to integrate server data into external tools or websites.

Deprecation Notice: The legacy BotKey system is being deprecated. Please transition to the new API key system by generating a Public API key using /apikeys generate. Legacy BotKeys will cease to function on 10th of January 2026.

Getting Started

Base URL https://api.viscra.uk/api
Authentication Authorization: YOUR_API_KEY
Rate Limit 500 requests / min

General Information

GET /server-info

Get basic information about a Discord server.

Query Payload: serverId (String Discord Server ID)
{
  "id": "...",
  "name": "...",
  "memberCount": 0,
  "iconUrl": "..."
}
GET /is-verified

Check if a Roblox user is verified with Viscra.

Query Payload: robloxId (Number/String Roblox User ID)
{
  "isVerified": true,
  "discordId": "..."
}
GET /user-rank

Get the current rank of a user in a Discord server.

Query Payload: serverId, robloxId
{
  "groupId": 0,
  "rankName": "...",
  "rankId": 0
}

XP Management

All XP routes return a success status and the new XP balance.

GET /user-xp

Fetch the current XP balance for a user.

Query Payload: serverId, robloxId
{ "xp": 100 }
POST /xp/set

Set a user's XP to an exact value.

Body: serverId, robloxId, amount, reference (Optional)
POST /xp/add

Add XP to a user's current balance.

POST /xp/remove

Subtract XP from a user's current balance.

Group Management

If groupId is not provided, the bot defaults to the server's configured Main Group.

GET /group/list-requests

List pending join requests for a Roblox group.

{
  "success": true,
  "data": [
    {
      "id": "...",
      "user": { "userId": 123, "displayName": "..." }
    }
  ]
}
POST /group/accept-request

Accept a pending join request.

Body: serverId, requestId, groupId (Optional)
POST /group/decline-request

Decline or deny a pending join request.

Alias: /api/group/deny-request
POST /group/promote

Promote a user in the Roblox group.

{
  "success": true,
  "newRole": { "name": "Captain", "rank": 50 }
}
POST /group/demote

Demote a user in the Roblox group.

Medal Management

GET /api/medals/list

List all available medals in a server.

{
  "medals": [{ "name": "Purple Heart", "description": "..." }]
}
GET /api/medals/user

Get a specific user's medals.

POST /api/medals/award

Award a medal to a user.

Body: serverId, robloxId, medalName
POST /api/medals/revoke

Revoke a medal from a user.

Certifications

GET /api/certifications/list

Get all certifications configured for a server.

Query Payload: serverId (String Discord Server ID)
{
  "certifications": [
    {
      "reference": "AFO",
      "name": "Authorised Firearms Officer",
      "description": "Certified to use firearms in the field"
    },
    {
      "reference": "FTO",
      "name": "Field Training Officer",
      "description": "Certified to train new recruits"
    }
  ]
}
GET /api/certifications/user

Get all certifications for a specific user.

Query Payload: serverId, robloxId
{
  "certifications": [
    {
      "reference": "AFO",
      "name": "Authorised Firearms Officer",
      "description": "Certified to use firearms in the field"
    }
  ]
}
GET /api/certifications/has

Check if a user has a specific certification.

Query Payload: serverId, robloxId, reference
{
  "hasCertification": true
}
POST /api/certifications/award

Award a certification to a user.

Body: serverId, robloxId, reference
{
  "success": true,
  "message": "Awarded Authorised Firearms Officer (AFO) to 123456789."
}
POST /api/certifications/revoke

Revoke a certification from a user.

Body: serverId, robloxId, reference
{
  "success": true,
  "message": "Revoked AFO from 123456789."
}

EP (Quota)

GET /api/ep/status

Get user EP status and warning level.

{
  "ep": { "main": 10, "sub1": 5 },
  "warningLevel": 1
}
POST /api/ep/add

Add EP to a user.

Note: company must be one of: main, sub1, sub2, sub3.

Leave of Absence (LOA)

GET /api/loa/status

Get a user's current LOA status.

{
  "active": true,
  "endsAt": 1705920000000,
  "startedAt": 1705833600000
}
POST /api/loa/start

Start a new LOA for a user.

Body: serverId, robloxId, days (Number)
POST /api/loa/end

End an active LOA.