Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ValoSpectra/Spectra-Server/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The Spectra Server REST API provides endpoints for managing match data, previews, organization verification, and server health monitoring. All endpoints are available via HTTP or HTTPS depending on your server configuration.Base URL and Port
The REST API runs on port 5101 by default:HTTPS vs INSECURE Mode
The server can run in two modes:HTTPS Mode (Production)
By default, the server runs with TLS encryption enabled. You must configure SSL certificates:src/index.ts:99-106
INSECURE Mode (Development)
For local development, you can disable HTTPS:src/index.ts:95-98
Authentication
Most endpoints require authentication via an API key:- Preview Creation: Requires a valid
keyin the request body - Organization Lookup: Requires a valid
keyas a query parameter - Team Info: No authentication required (uses group code)
- Status: Public endpoint, no authentication required
USE_BACKEND=true is configured.
CORS Policy
All endpoints support Cross-Origin Resource Sharing (CORS) with unrestricted access:src/index.ts:19
All responses include the header:
Rate Limits
Currently, there are no rate limits enforced at the API level. However:- Preview codes expire after 10 minutes
- Team info cached for 60 minutes (1 hour)
- Inactive matches removed after 30 minutes
Response Format
All endpoints return JSON responses with appropriate HTTP status codes:200- Success400- Bad Request (invalid parameters)401- Unauthorized (invalid API key)403- Forbidden (key validation failed)404- Not Found (resource doesn’t exist)
Error Responses
Error responses follow this format:Available Endpoints
Core Endpoints
- GET /status - Server health check
- PUT /createPreview - Create match preview
- GET /preview/:previewCode - Retrieve preview data
- GET /getOrgForKey - Verify organization key
- GET /getTeamInfoForCode - Get team information
Support & Integration Endpoints
These endpoints are only available whenUSE_BACKEND=true:
- GET /getSupportPackages - Fetch Tebex support packages
- GET /client/oauth-callback - Discord OAuth callback handler