Overview
The Admin API provides endpoints for managing CAD settings, users, values, and administrative operations.
All admin endpoints require appropriate administrative permissions. Access is restricted based on user rank and specific permission grants.
Get Dashboard Statistics
curl -X GET https://your-cad.com/api/admin \
-H "Cookie: snaily-cad-access-token=<token>"
Get administrative dashboard statistics and metrics.
Response
Number of accepted/active users
Number of users pending whitelist approval
Citizens with arrest records
Citizens marked as deceased
Currently on-duty officers
Currently on-duty deputies
Total registered vehicles
Get Changelog
curl -X GET https://your-cad.com/api/admin/changelog
Get the latest SnailyCAD release changelog from GitHub.
Response
Returns the changelog markdown content for the current version.
User Management
Get Users
curl -X GET "https://your-cad.com/api/admin/manage/users?skip=0" \
-H "Cookie: snaily-cad-access-token=<token>"
Get all users with pagination and filtering.
Query Parameters
Update User
curl -X PUT https://your-cad.com/api/admin/manage/users/{userId} \
-H "Cookie: snaily-cad-access-token=<token>" \
-H "Content-Type: application/json" \
-d '{
"rank": "ADMIN",
"permissions": ["Leo", "Dispatch"],
"whitelistStatus": "ACCEPTED"
}'
Update a user’s rank, permissions, or whitelist status.
Request Body
User rank: OWNER, ADMIN, USER
Array of permission strings
Whitelist status: ACCEPTED, PENDING, DECLINED
Ban/Unban User
curl -X POST https://your-cad.com/api/admin/manage/users/{userId}/ban \
-H "Cookie: snaily-cad-access-token=<token>" \
-H "Content-Type: application/json" \
-d '{
"banned": true,
"banReason": "Violation of terms"
}'
Ban or unban a user.
Request Body
Ban (true) or unban (false)
Reason for ban (required when banning)
CAD Settings
Get CAD Settings
curl -X GET https://your-cad.com/api/admin/manage/cad-settings \
-H "Cookie: snaily-cad-access-token=<token>"
Get current CAD settings and configuration.
Update CAD Settings
curl -X PUT https://your-cad.com/api/admin/manage/cad-settings \
-H "Cookie: snaily-cad-access-token=<token>" \
-H "Content-Type: application/json" \
-d '{
"name": "My CAD Instance",
"areaOfPlay": "San Andreas",
"whitelisted": true,
"registrationCode": "SECRET123"
}'
Update CAD settings.
Request Body
Enable whitelist for new users
Required registration code
Values Management
Get Values
curl -X GET https://your-cad.com/api/admin/values/penal_code \
-H "Cookie: snaily-cad-access-token=<token>"
Get values for a specific category.
Path Parameters
Value category: penal_code, vehicle, weapon, gender, ethnicity, license, etc.
Create Value
curl -X POST https://your-cad.com/api/admin/values/penal_code \
-H "Cookie: snaily-cad-access-token=<token>" \
-H "Content-Type: application/json" \
-d '{
"value": "Assault",
"type": "FELONY",
"jailTime": {"min": 10, "max": 20},
"fine": {"min": 500, "max": 1000}
}'
Create a new value.
Update Value
curl -X PUT https://your-cad.com/api/admin/values/penal_code/{valueId} \
-H "Cookie: snaily-cad-access-token=<token>" \
-H "Content-Type: application/json" \
-d '{
"value": "Aggravated Assault"
}'
Update an existing value.
Delete Value
curl -X DELETE https://your-cad.com/api/admin/values/penal_code/{valueId} \
-H "Cookie: snaily-cad-access-token=<token>"
Delete a value.
Citizens Management
Get All Citizens
curl -X GET "https://your-cad.com/api/admin/manage/citizens?skip=0" \
-H "Cookie: snaily-cad-access-token=<token>"
Get all citizens in the CAD.
Query Parameters
Units Management
Get All Officers
curl -X GET https://your-cad.com/api/admin/manage/units/officers \
-H "Cookie: snaily-cad-access-token=<token>"
Get all LEO officers.
Get All Deputies
curl -X GET https://your-cad.com/api/admin/manage/units/deputies \
-H "Cookie: snaily-cad-access-token=<token>"
Get all EMS-FD deputies.
Suspend/Unsuspend Unit
curl -X POST https://your-cad.com/api/admin/manage/units/{unitId}/suspend \
-H "Cookie: snaily-cad-access-token=<token>" \
-H "Content-Type: application/json" \
-d '{
"suspended": true
}'
Suspend or unsuspend a unit.
Import/Export
Import Citizens
curl -X POST https://your-cad.com/api/admin/import/citizens \
-H "Cookie: snaily-cad-access-token=<token>" \
-F "[email protected]"
Bulk import citizens from JSON file.
Import Vehicles
curl -X POST https://your-cad.com/api/admin/import/vehicles \
-H "Cookie: snaily-cad-access-token=<token>" \
-F "[email protected]"
Bulk import vehicles from JSON file.
Import Weapons
curl -X POST https://your-cad.com/api/admin/import/weapons \
-H "Cookie: snaily-cad-access-token=<token>" \
-F "[email protected]"
Bulk import weapons from JSON file.
Courthouse
Get Pending Warrants
curl -X GET https://your-cad.com/api/admin/manage/courthouse/pending-warrants \
-H "Cookie: snaily-cad-access-token=<token>"
Get warrants pending approval.
Get Pending Expungement Requests
curl -X GET https://your-cad.com/api/admin/manage/courthouse/pending-expungement-requests \
-H "Cookie: snaily-cad-access-token=<token>"
Get expungement requests pending approval.
Get Pending Name Changes
curl -X GET https://your-cad.com/api/admin/manage/courthouse/pending-name-change-requests \
-H "Cookie: snaily-cad-access-token=<token>"
Get name change requests pending approval.
Discord Integration
Get Discord Settings
curl -X GET https://your-cad.com/api/admin/manage/cad-settings/discord \
-H "Cookie: snaily-cad-access-token=<token>"
Get Discord integration settings.
Update Discord Webhooks
curl -X POST https://your-cad.com/api/admin/manage/cad-settings/discord/webhooks \
-H "Cookie: snaily-cad-access-token=<token>" \
-H "Content-Type: application/json" \
-d '{
"type": "CALL_911",
"webhookUrl": "https://discord.com/api/webhooks/..."
}'
Configure Discord webhooks for various events.
Request Body
Webhook type: CALL_911, BOLO, UNIT_STATUS, PANIC_BUTTON, etc.