The Sessions API allows you to track player activity and engagement by managing session lifecycle. All session endpoints require authentication.Documentation Index
Fetch the complete documentation index at: https://docs.cratebytes.com/llms.txt
Use this file to discover all available pages before exploring further.
Base URL
All session endpoints are prefixed with/api/game/session/.
Authentication
All session endpoints require a valid JWT token in the Authorization header:Start Session
Begin tracking a new player session. Endpoint:POST /api/game/session/start
Headers:
Heartbeat
Keep the session alive and update the last activity timestamp. Endpoint:POST /api/game/session/heartbeat
Headers:
End Session
Stop tracking the current session. Endpoint:POST /api/game/session/stop
Headers:
Session Management Best Practices
- Start Session: Call when the player begins playing your game
- Heartbeat: Call periodically (every 5-10 minutes) to keep the session active
- End Session: Call when the player stops playing or closes the game