Overview / System / Create a role

Create a role

post https://api.flactrum.com/v1/roles
Required scope roles.write
Success status201
Returns One Role object

Request body

FieldTypeDescription
name * string —
scope * string —
permissions array Permission slugs. Sending this replaces the whole set. Per-page slugs (page.products.create) and legacy coarse slugs (menu.manage) are both accepted; legacy slugs are converted to the page permissions they used to open. Get valid slugs from /permissions.

Response fields

FieldTypeDescription
id string —
name string —
slug string —
scope string —
is_system boolean System roles are shared by every brand and cannot be edited.
permissions array Effective permissions: per-page slugs (page.{page}.{view|create|update|delete}), special permissions such as cash.close, and the legacy coarse slugs (menu.view…) derived from the page permissions.
user_count integer —

Examples

No recorded example yet.