modl.gg

Player Login

Report a player login and receive active punishments and notifications.

POST /v1/minecraft/players/login

Report a player login event to the modl platform. Returns any active punishments that should be enforced and any pending notifications for the player.

If the player does not yet exist in the system, they will be created automatically and the response will return a 201 Created status. Otherwise, the response returns 200 OK.

Authentication

Requires the X-API-Key header with your server's API key.

X-API-Key: your-api-key-here

Request

Headers

HeaderTypeRequiredDescription
X-API-KeystringYesYour server's API key.
Content-TypestringYesMust be application/json.

Body

FieldTypeRequiredDescription
minecraftUUIDstringYesThe player's UUID in standard format (e.g., 550e8400-e29b-41d4-a716-446655440000).
usernamestringYesThe player's current Minecraft username.
ipstringYesThe player's IP address.
{
  "minecraftUUID": "550e8400-e29b-41d4-a716-446655440000",
  "username": "Notch",
  "ip": "192.168.1.1"
}

Response

201 Created (new player) or 200 OK (existing player)

{
  "status": 201,
  "activePunishments": [
    {
      "id": "abc123",
      "type": "Cheating",
      "category": "BAN",
      "ordinal": 14,
      "started": true,
      "expiration": 1700000000000,
      "description": "Use of unauthorized client modifications",
      "issuerName": "StaffMember",
      "issuedAt": 1699000000000,
      "playerDescription": "You have been banned for cheating."
    }
  ],
  "pendingNotifications": []
}

Error Responses

Status CodeDescription
400Invalid request body. One or more fields failed validation (e.g., malformed UUID, invalid username format, or invalid IP).
401Missing or invalid API key.
429Rate limit exceeded.
500Internal server error.

On this page