/api/v1/update-role-policiesUpdate a role's spending policy
Sets a new spending limit and reset cycle on one role in a workspace, changing the headroom of every member who holds that role there.
MANAGE_ROLEA role's policy is the cap on what each member holding the role can move in a
cycle. This call replaces it. All five fields are required, so send the current
cycle values again when you are only changing the limit, and read what is in
force first with GET /api/v1/get-role-limit. The policy
belongs to the role in the workspace you name, and roles are workspace-scoped: the
same role name in another workspace keeps its own limit. See
Roles and permissions.
Permissions are edited separately, with
POST /api/v1/add-perm-to-role and
POST /api/v1/remove-perm-from-role. This
endpoint changes only the money side of the role.
The new limit applies to every member holding this role in this workspace as
soon as the call returns. Policies are enforced before the signing stage, so a
movement over the limit is blocked and never reaches signers: lowering a limit
can stop work the desk is in the middle of, and raising one widens what a
single member can move before anyone approves it. Check who holds the role with
GET /api/v1/get-users-from-workspace first,
and see Vault policies for how role limits sit
alongside vault limits.
role_idnumberrequiredworkspace_idnumberrequirednew_transaction_limitstringrequiredcycle_periodstringrequiredcycle_daynumberrequired#What happens next
Read the policy back with
GET /api/v1/get-role-limit to confirm the stored values,
and test a representative amount for a member with
GET /api/v1/check-user-role-limit. Each member
sees their own figures through
GET /api/v1/get-my-limits, and the workspace list at
GET /api/v1/get-users-from-workspace shows the
new limit beside every holder of the role.