> ## Documentation Index
> Fetch the complete documentation index at: https://docs.readmin.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Activity Tracking APIs

> We do not recommend using this API directly, but instead use the ReAdmin Activity Tracking Module

### Key Features of ReAdmin Activity Tracking API

The ReAdmin Activity Tracking API enables advanced game session management for Roblox experiences. This includes player tracking, server synchronization, and administrative control. Below are the main capabilities and use cases:

## Server Management

Create new servers using the `/createServer` endpoint.
Retrieve server information with the `/getServer` endpoint.
End game sessions via the `/endServer` endpoint.

## Player Tracking

Log player join events with `/playerJoin`.
Handle player exit events using `/playerLeave`.
Track additional player activity and metadata, such as platform and safe chat status.

## Data Synchronization

Use `/sendData` to synchronize real-time events and updates across servers.

## Administrative Actions

Queue server-side administrative actions like kicking players, sending notifications, locking servers, or initiating shutdowns.

## Example Use Case Workflow

1. Create a Server
   Upon starting a game session, send a POST request to `/createServer`.
   The server will be registered, and you'll receive a runningGameId for tracking.

2. Track Player Joins
   When a player joins, call `/playerJoin` with their playerId and platform information.
   This endpoint also checks for bans and manages special rules for VIP servers.

3. Monitor Player Activity
   Utilize the provided client-side script to handle player events, including chat messages and AFK statuses. These events are stored locally and synced periodically with the API.

4. Synchronize Data
   At regular intervals, the server sends accumulated event data to the `/sendData` endpoint. This ensures all actions and metrics are captured consistently.

5. Manage Game Lifecycle
   When the session ends, call `/endServer` to remove the game session from the API.

## Important Notes

### Error Handling

Ensure all requests check for HTTP responses. If the status code is not 200, log the error message and take corrective action (e.g., retry or alert).

### Sync Frequency

The sync interval can be customized using the pingInterval parameter in the client script.

### Banning Players

Players detected as banned during `/playerJoin` are automatically kicked. Ensure proper ban reasons are provided for clarity.

## Secure Configuration

* **Always include loaderId** in the headers for authentication.
* **Use HTTPS** in your scripts to ensure secure data transmission.

## Future Changes

This API is subject to updates, including potential changes in endpoints and data structures. **It is strongly advised to use the official ReAdmin Activity Tracking Module** to avoid disruptions and ensure compatibility with new releases.
