Business Accounts are in early access. See Business Accounts for the model.
admin or viewer, never owner. A member holding cfo, for example, has exactly what admin grants, but your product can show and reason about the distinct name instead of a generic admin. See Members & roles for the built-in roles a custom role builds on.
Define a role
defineBusinessAccountRole creates a custom role for the account. Owner or admin only.
- JavaScript
- React
A role name is case-insensitive:
CFO and cfo name the same role, and the account stores it lowercase. It cannot reuse a built-in name (owner, admin, viewer) or a name another live role in the account already uses.List roles
listBusinessAccountRoles returns the account’s custom roles, keyed by name.
- JavaScript
- React
Assign a role
A custom role’s name is a validrole value anywhere a built-in role is: addBusinessAccountMember and updateBusinessAccountMemberRole both accept it. See Members & roles for both calls. Assigning a role your account has not defined fails, so define it first.
Read a member’s custom role
A member’srole on detail.members is always the built-in it inherits, so a cfo holder still reads admin there. The member’s customRole field carries the actual name and what it inherits.
customRole is null for a member holding a built-in role directly.
Delete a role
deleteBusinessAccountRole removes the definition. Owner or admin only.
- JavaScript
- React
Governance
Defining and deleting a role are themselves governed actions (Define role, Delete role), and a governance requirement’s eligible approvers or initiators can name a custom role alongside the built-in ones. This requirement asks for one approval from a cfo holder whenever a member is added:
Next steps
Members & roles
Add and remove members, and change who holds a role.
Governance
Require approvals before a role is defined, deleted, or assigned.