modl.gg

Update Role Permissions

Update the permissions for a role.

PATCH /v1/minecraft/roles/{id}/permissions

Update the full set of permissions assigned to a role. This replaces the existing permission list entirely with the provided one.

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.

Path Parameters

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the role.

Body

FieldTypeRequiredDescription
permissionsstring[]YesThe new list of permissions to assign to the role. This replaces all existing permissions.
{
  "permissions": [
    "punish",
    "tickets.view",
    "tickets.reply",
    "tickets.manage",
    "reports.view",
    "reports.manage"
  ]
}

Response

200 OK

{
  "success": true
}

Error Responses

Status CodeDescription
400Invalid request body. Missing or invalid permissions array.
401Missing or invalid API key.
404Role not found.
429Rate limit exceeded.
500Internal server error.

On this page