Create Punishment (Dynamic) Issue a punishment and receive the punishment ID in the response.
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.
Requires the X-API-Key header with your server's API key.
Header Type Required Description X-API-Keystring Yes Your server's API key. Content-Typestring Yes Must be application/json.
Field Type Required Description targetUuidstring Yes The UUID of the player to punish. issuerNamestring Yes The name of the staff member issuing the punishment. typeOrdinalinteger Yes The punishment type ordinal (0-14). reasonstring No The reason for the punishment. durationlong No Duration in milliseconds. Use -1 for permanent. dataobject No Additional data to attach to the punishment. notesstring[] No Internal notes visible only to staff. attachedTicketIdsstring[] No IDs of tickets to link to this punishment. severitystring No Severity level: "lenient", "regular", or "aggravated". statusstring No Initial status of the punishment.
{
"targetUuid" : "069a79f4-44e9-4726-a5be-fca90e38aaf5" ,
"issuerName" : "StaffMember" ,
"typeOrdinal" : 7 ,
"reason" : "Use of unauthorized client modifications" ,
"duration" : 604800000 ,
"severity" : "regular"
}
{
"punishmentId" : "6651a2f8e4b0c1d2e3f4a5b6" ,
"message" : "Punishment created successfully."
}
Field Type Description punishmentIdstring The unique ID of the newly created punishment. messagestring A human-readable success message.
Status Code Description 400Invalid request body or missing required fields. 401Missing or invalid API key. 404Target player not found.