Sync Synchronize player data, punishments, and notifications with the server.
Synchronize player data, punishments, and notifications between the Minecraft server plugin and the modl platform. This endpoint should be called periodically to keep the server in sync with the latest moderation actions and player notifications.
Requires the X-API-Key header with your server's API key.
X-API-Key: your-api-key-here
Header Type Required Description X-API-Keystring Yes Your server's API key. Content-Typestring Yes Must be application/json.
Field Type Required Description lastSyncTimestampstring No ISO 8601 timestamp of the last successful sync. Used to retrieve only changes since that time. onlinePlayersarray No List of currently online players. Each object contains uuid, username, and ipAddress. serverStatusobject No Current server status information.
Field Type Required Description uuidstring Yes The player's Minecraft UUID. usernamestring Yes The player's current username. ipAddressstring Yes The player's IP address.
Field Type Required Description onlinePlayerCountinteger No Number of players currently online. maxPlayersinteger No Maximum player capacity of the server. serverVersionstring No The Minecraft server version string. timestampstring No ISO 8601 timestamp of the status report.
{
"lastSyncTimestamp" : "2024-01-15T12:00:00Z" ,
"onlinePlayers" : [
{
"uuid" : "550e8400-e29b-41d4-a716-446655440000" ,
"username" : "Notch" ,
"ipAddress" : "192.168.1.1"
}
],
"serverStatus" : {
"onlinePlayerCount" : 42 ,
"maxPlayers" : 100 ,
"serverVersion" : "1.21.1" ,
"timestamp" : "2024-01-15T12:00:00Z"
}
}
{
"timestamp" : "2024-01-15T12:00:05Z" ,
"data" : {
"pendingPunishments" : [],
"recentlyStartedPunishments" : [],
"recentlyModifiedPunishments" : [],
"playerNotifications" : [],
"activeStaffMembers" : [],
"staffPermissionsUpdatedAt" : null ,
"punishmentTypesUpdatedAt" : null
}
}
Status Code Description 400Invalid request body. One or more fields failed validation. 401Missing or invalid API key. 429Rate limit exceeded. 500Internal server error.