API Overview
API Overview
Section titled “API Overview”The Statsly API provides programmatic access to all platform features.
Base URL
Section titled “Base URL”All API requests should be made to:
https://api.statsly.orgAuthentication
Section titled “Authentication”Most endpoints require authentication using session-based authentication (Better Auth). Include your session cookie in requests:
Cookie: better-auth.session_token=YOUR_SESSION_TOKENFor browser-based requests, cookies are automatically included. For programmatic access, you’ll need to maintain a session by logging in first.
Some endpoints are public and don’t require authentication:
- Image API charts for public servers
- Downloads API (plugin downloads)
- Brand Image API
- Public server listings
Response Format
Section titled “Response Format”All responses are returned as JSON:
{ "data": {}, "message": "Success"}Rate Limiting
Section titled “Rate Limiting”API requests are rate-limited to prevent abuse:
- Downloads API: 100 requests per 15 minutes per IP address
- Other endpoints: Rate limits vary by endpoint type
Exceeding the rate limit will result in a 429 Too Many Requests response.
Error Handling
Section titled “Error Handling”Errors are returned in the following format:
{ "error": "Error message", "code": "ERROR_CODE"}Available APIs
Section titled “Available APIs”- Image API - Generate SVG charts of server statistics
- Brand Image API - Server software brand images
- Downloads API - Plugin download endpoints
Next Steps
Section titled “Next Steps”- Learn about Image API for generating charts
- Explore Downloads API for plugin management
- Check out Brand Image API for server branding