modl.gg

Create Punishment (Dynamic)

Issue a punishment and receive the punishment ID in the response.

POST /v1/minecraft/punishments/dynamic

Issue a punishment to a player and receive the generated punishment ID in the response. This is useful when you need to reference the punishment immediately after creation, such as attaching evidence or linking it to other records.

Authentication

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

Request

Headers

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

Body

FieldTypeRequiredDescription
targetUuidstringYesThe UUID of the player to punish.
issuerNamestringYesThe name of the staff member issuing the punishment.
typeOrdinalintegerYesThe punishment type ordinal (0-14).
reasonstringNoThe reason for the punishment.
durationlongNoDuration in milliseconds. Use -1 for permanent.
dataobjectNoAdditional data to attach to the punishment.
notesstring[]NoInternal notes visible only to staff.
attachedTicketIdsstring[]NoIDs of tickets to link to this punishment.
severitystringNoSeverity level: "lenient", "regular", or "aggravated".
statusstringNoInitial status of the punishment.
Example Request Body
{
  "targetUuid": "069a79f4-44e9-4726-a5be-fca90e38aaf5",
  "issuerName": "StaffMember",
  "typeOrdinal": 7,
  "reason": "Use of unauthorized client modifications",
  "duration": 604800000,
  "severity": "regular"
}

Response

200 OK

Response
{
  "punishmentId": "6651a2f8e4b0c1d2e3f4a5b6",
  "message": "Punishment created successfully."
}
FieldTypeDescription
punishmentIdstringThe unique ID of the newly created punishment.
messagestringA human-readable success message.

Error Responses

Status CodeDescription
400Invalid request body or missing required fields.
401Missing or invalid API key.
404Target player not found.

On this page