PrismBot API

API documentation for api.prismbot.cc

GET /api/health

Returns the current health status of the PrismBot API service.

Example Response

{
  "status": "ok",
  "service": "PrismBot API"
}
GET /api/servers/:guildId

Loads a server configuration by Discord guild ID. Creates and returns a default config if none exists.

Example Response

{
  "config": {
    "guildId": "123456789",
    "prefix": "!",
    "staffUserIds": [],
    "adminUserIds": [],
    "staffRoleIds": [],
    "adminRoleIds": [],
    "welcome": {},
    "moderation": {},
    "logging": {},
    "automod": {},
    "verification": {},
    "updatedAt": "2026-07-18T12:00:00.000Z"
  },
  "created": true
}
PATCH /api/servers/:guildId

Merges partial updates into the existing server config. Unrelated settings are preserved. Deep-merges nested objects.

Example Request Body

{
  "prefix": "?",
  "moderation": { "autoDelete": true }
}

Example Response

{
  "success": true,
  "config": { /* full merged config */ }
}
PUT /api/servers/:guildId

Replaces the entire server configuration. All fields are overwritten.

POST /api/servers/:guildId/reset

Resets a server configuration to default values.