Skip to content

API Overview

The Statsly API provides programmatic access to all platform features.

All API requests should be made to:

https://api.statsly.org

Most endpoints require authentication using session-based authentication (Better Auth). Include your session cookie in requests:

Cookie: better-auth.session_token=YOUR_SESSION_TOKEN

For browser-based requests, cookies are automatically included. For programmatic access, you’ll need to maintain a session by logging in first.

All responses are returned as JSON:

{
"data": {},
"message": "Success"
}

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.

Errors are returned in the following format:

{
"error": "Error message",
"code": "ERROR_CODE"
}