Admin Settings: Roles

Create a new role

Validates name, description, permission_type (all|custom). When permission_type=custom, permissions array is required.

post/settings/roles

Request

Request body

namestring required
descriptionstring required
permission_type'all' | 'custom' required
permissionsstring[]

Example request

{
  "name": "Catalog Manager",
  "description": "Can manage catalog only",
  "permission_type": "custom",
  "permissions": [
    "catalog.products",
    "catalog.categories"
  ]
}

Response

Role created.

idinteger nullable
namestring nullable
descriptionstring nullable
permissionTypestring nullable
permissionsstring[] nullable
createdAtstring nullable
updatedAtstring nullable
messagestring nullable

Example response

{
  "id": 1,
  "name": "Administrator",
  "description": "Full access to all modules",
  "permissionType": "all",
  "permissions": [
    "catalog.products.create",
    "sales.orders.view"
  ],
  "createdAt": "2026-05-25T08:15:00+00:00",
  "updatedAt": "2026-05-25T08:20:00+00:00",
  "message": "Role deleted successfully."
}

Changes

No recorded changes to this operation across all 8 revisions of this API.