Create a new role.
| Permission | Description |
|---|---|
roles.view_all | Access roles |
roles.create | Create role |
| Name | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Name of the role (max 255) |
permissions | array | No | List of permission IDs (optional) |
{
"data": { /* role resource */ }
}
| Status | Description | Reference |
|---|---|---|
| 422 | Validation error | Validation error |
| 401 | Unauthorized | Authentication error |
| 403 | Forbidden (no permission) | Permission error |