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
- Base URLhttp://localhost:8000/api/admin
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"name": "Catalog Manager",
"description": "Can manage catalog only",
"permission_type": "custom",
"permissions": [
"catalog.products",
"catalog.categories"
]
}Response
Role created.
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.