modl.gg

Change Duration

Modify the duration of an existing punishment.

POST /v1/minecraft/punishments/{punishmentId}/duration

Modify the duration of an existing punishment. This can be used to extend, reduce, or convert a punishment between temporary and permanent.

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.

Path Parameters

ParameterTypeRequiredDescription
punishmentIdstringYesThe ID of the punishment to modify.

Body

FieldTypeRequiredDescription
issuerNamestringYesThe name of the staff member modifying the duration.
newDurationlongNoThe new duration in milliseconds. Use -1 for permanent.
Example Request Body
{
  "issuerName": "StaffMember",
  "newDuration": 1209600000
}

Response

200 OK

Response
{
  "success": true
}
FieldTypeDescription
successbooleanWhether the duration was updated successfully.

Error Responses

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

On this page