Update Account Group
Updates the details of an existing account group: its name, its merchant ID, or the group it is nested under.
Only the fields present in the body are changed. parent_code has three states: omit it to leave the parent untouched, send null to detach the group and make it a root again, or send another group’s id to nest the group under it. Nesting is structural only — it does not grant or revoke any permission.
/organizations/account-groups/{account_group_id}Updates an account group. Every field is optional and only the fields present in the body are changed.
parent_code nests the group under another group of the same organization. It has three states: absent leaves the current parent untouched; null detaches the group and promotes it back to a root, together with any sub-groups hanging off it; a group id nests the group under that group. Nesting is structural only — it grants and revokes nothing, so moving a group leaves every existing permission untouched.
Path Parameters
Account group UUID.
Body application/json
Account group name (min=1, max=255).
Local identifier (min=1, max=255).
The id of the group to nest this group under. Omit it to leave the parent unchanged; send null to detach the group and make it a root again. The parent must belong to the same organization and must not be the group itself or one of its descendants.
Response
OK
The id of the group this group is nested under. null for a root (top-level) group.
Bad Request. The code field tells the reason:
PARENT_NOT_FOUND— no group with thatparent_codein this organization.INVALID_PARENT— the group was sent as its own parent.PARENT_IS_DESCENDANT— the target parent sits inside this group’s own subtree, so the move would create a cycle.MAX_NESTING_DEPTH— the move would push the tree past the maximum depth of 20 levels.
Machine-readable error code.
Human-readable details.
Not Found — no account group with that account_group_id in this organization.