API endpoints
v1 route table relative to the API base.
Routes
| Method | Path | Scope | Description |
|---|---|---|---|
GET | /me | read | Calling key: team, scopes, server count |
GET | /servers | read | Claimed servers for the key's team |
GET | /servers/{id}/config | read | Full moderation config |
PUT | /servers/{id}/config/{section} | write | Replace one section (validated like the dashboard) |
GET | /servers/{id}/config/export | read | Full export envelope |
POST | /servers/{id}/config/import | write | Import export JSON |
POST | /servers/{id}/config/clone | write | Body {"from":"<guild>"} |
GET | /servers/{id}/config/audit | read | Recent config changes |
GET | /servers/{id}/structure-snapshot | read | Snapshot metadata |
POST | /servers/{id}/structure-snapshot | write | Capture now |
POST | /servers/{id}/structure-snapshot/restore | write | Restore missing roles/channels |
GET | /servers/{id}/onboarding | read | Setup checklist progress |
GET | /servers/{id}/insights | read | Moderation insights (?days=) |
GET | /servers/{id}/community-insights | read | Community activity: messages, voice, joins (?days=) |
GET | /servers/{id}/cases | read | Recent cases (?limit=) |
GET | /servers/{id}/strikes | read | Strike counts |
GET | /servers/{id}/jails | read | Active jails |
GET | /servers/{id}/cases/{case_id} | read | Single case |
GET | /servers/{id}/cases?user_id= | read | Filter cases by user |
POST | /servers/{id}/actions/{action} | write | note Β· warn Β· timeout Β· kick Β· ban Β· unban Β· unjail |
POST | /servers/{id}/webhooks/test | write | Enqueue a test webhook event |
Errors are JSON {"error":"β¦"} with 401 / 403 / 404 / 400 / 402 as appropriate. The envelope is additive within v1.
Moderation actions
Body JSON:
{
"user_id": "<platform user id>",
"reason": "optional",
"minutes": 10,
"delete_message_days": 0
}
- Discord: full note / warn / timeout / kick / ban (bot needs hierarchy + permissions)
- Telegram: note/warn (case only); timeout = mute; kick = ban+unban; ban = banChatMember
- Slack: note/warn (case + mod-log); kick/timeout record a case (workspace remove is admin-side)
Response includes case_id, applied, platform, detail. Actor is recorded as key:<key_id>.
Example
curl -H "Authorization: Bearer mb_<id>_<secret>" \
https://YOUR_HOST/api/v1/servers
curl -X POST -H "Authorization: Bearer mb_β¦" -H "Content-Type: application/json" \
-d '{"user_id":"123","reason":"spam","minutes":30}' \
https://YOUR_HOST/api/v1/servers/GUILD_ID/actions/timeout