/api/v1/create-role-for-orgCreate a role
Creates a named role in one workspace together with its spending limit and reset cycle, and returns the role id to assign it with.
MANAGE_PERMSA role is a named bundle of permissions held by a member inside a single
workspace. This call creates the role and its spending policy in one request;
the permissions are attached separately with
POST /api/v1/add-perm-to-role. Once the role exists,
give it to a member with
POST /api/v1/change-user-role.
Roles are workspace-scoped. A role created in this workspace grants nothing in any other workspace, even inside the same organisation, so a member who works across two workspaces needs a role in each. For how roles are meant to be structured, see Roles and permissions.
The Owner role is created with the organisation, bypasses all permission checks, and cannot be created, modified, or assigned manually. Every role you create with this endpoint is a normal role subject to permission checks.
workspace_idnumberrequiredrole_namestringrequiredrole_descstringrequiredorg_uidnumberrequirednew_transaction_limitstringrequiredcycle_periodstringrequiredcycle_daynumberrequired#What happens next
UID is the new role id. Use it as role_uid when granting permissions with
POST /api/v1/add-perm-to-role, as role_id when
adjusting the policy with
POST /api/v1/update-role-policies, and as
role_id when assigning the role to a member. A role with no permissions
granted to it carries a spending limit but no rights in the workspace, so grant
its permissions before you hand it to anyone.