Skip to content

API Overview

Base URL

http://localhost:3001/api

Production: configured via BOT_API_URL / NEXT_PUBLIC_BOT_API_URL.

Authentication

Most endpoints require a JWT bearer token:

http
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...

Tokens are obtained through the login endpoints. See Authentication.

Response Format

Success

json
{
  "success": true,
  "data": { ... }
}

Error

json
{
  "error": "Error description"
}

HTTP Status Codes

CodeMeaning
200OK
201Created
400Bad Request
401Unauthenticated
403Forbidden
404Not Found
429Rate Limit Exceeded
500Server Error

Rate Limiting

  • Global: standard limit applied to all endpoints
  • Sensitive: stricter limit for login and admin actions
  • Response headers: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset

Endpoint Overview

Authentication

MethodPathAuthDescription
POST/auth/admin/login-Admin login
POST/auth/user/login-User login
GET/auth/discord-Start Discord OAuth
GET/auth/discord/callback-OAuth callback
GET/auth/userJWTCurrent user

Schedule

MethodPfadAuthDescription
GET/schedule/next14JWTNext 14 days
GET/schedule/paginatedAdminPaginated history
POST/schedule/update-reasonAdminUpdate reason
POST/schedule/update-availabilityJWTSet availability
GET/schedule-detailsJWTAnalyzed details for a date
GET/schedule-details-batchJWTBatch query

User Mappings

MethodPathAuthDescription
GET/user-mappingsOptionalAll players
POST/user-mappingsAdminAdd player
PUT/user-mappings/reorderAdminReorder players
PUT/user-mappings/:discordIdAdminEdit player
DELETE/user-mappings/:discordIdAdminRemove player

Scrims

MethodPathAuthDescription
GET/scrimsJWTAll scrims
GET/scrims/stats/summaryJWTStatistics
GET/scrims/range/:start/:endJWTScrims in date range
GET/scrims/:idJWTSingle scrim
POST/scrimsAdminCreate scrim
PUT/scrims/:idAdminEdit scrim
DELETE/scrims/:idAdminDelete scrim

Absences

MethodPathAuthDescription
GET/absencesJWTList absences
POST/absencesJWTCreate
PUT/absences/:idJWTEdit
DELETE/absences/:idJWTDelete

Recurring Availability

MethodPathAuthDescription
GET/recurring-availabilityJWTOwn entries
POST/recurring-availabilityJWTSet entry
DELETE/recurring-availability/:dayJWTDelete one day
DELETE/recurring-availabilityJWTDelete all

Strategies

MethodPathAuthDescription
GET/strategiesJWTAll strategies
POST/strategiesJWT*Create (with upload)
PUT/strategies/:idJWT*Edit
DELETE/strategies/:idJWT*Delete
GET/strategies/foldersJWTFolder tree
POST/strategies/foldersJWT*Create folder

*Permission depends on the stratbook.editPermission setting.

VOD Comments

MethodPathAuthDescription
GET/vod-comments/scrim/:scrimIdJWTLoad comments
POST/vod-commentsJWTCreate comment
PUT/vod-comments/:idJWTEdit
DELETE/vod-comments/:idJWTDelete

Actions

MethodPathAuthDescription
POST/actions/scheduleAdminPost schedule
POST/actions/remindAdminSend reminders
POST/actions/pollAdminCreate poll
POST/actions/notifyAdminSend DM
POST/actions/clear-channelAdminClear channel
POST/actions/training-pollAdminTraining poll
POST/actions/pin-messageAdminPin message

Settings

MethodPathAuthDescription
GET/settings-Load all settings
POST/settingsAdminUpdate settings
POST/settings/reload-configAdminReload config

System

MethodPathAuthDescription
GET/health-Health check
GET/bot-status-Bot status
GET/admin/logsAdminSystem logs
GET/discord/channelsAdminDiscord channels
GET/discord/rolesAdminDiscord roles

MIT License