{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Adding a user to an existing user group","meta":[{"name":"robots","content":"noindex"}],"llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"adding-a-user-to-an-existing-user-group","__idx":0},"children":["Adding a user to an existing user group"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The steps below explain how to list the existing user groups for a company, view the members of a specific group, and add a new user to that group."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Step"},"children":["Step"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Endpoint"},"children":["Endpoint"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Details"},"children":["Details"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[]}]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/openapi/rbacapi/user-groups/listusergroupsforcompany"},"children":["List user groups for company"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /v3/companies/{companyId}/user-groups/list"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["List all available user groups for a company. You can use search text, filters, and sorting to narrow down results.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["URL path requires:"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["companyId"]},".",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Request body requires:"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pagination"]}," (with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["offset"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["limit"]},"). Optionally, provide ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["searchText"]}," for case-insensitive search, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sortParams"]}," to sort by ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["NAME"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CREATED_AT"]},", and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["filters"]}," to filter by specific ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["userGroupIds"]},".",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Response will contain:"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["userGroups"]}," (an array of user group objects each containing a unique ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["name"]},", and a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["description"]},").",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Other APIs will use:"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["userGroups"]}," > ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]}," (referred to as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["groupId"]}," in subsequent steps)."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"ol","attributes":{"start":2},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[]}]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/openapi/rbacapi/user-groups/getusergroup"},"children":["Get user group"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /v3/companies/{companyId}/user-groups/{groupId}"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["View the details of a specific user group selected from Step 1. This step is useful for confirming the group's name, description, and whether it is modifiable before proceeding.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["URL path requires:"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["companyId"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["groupId"]}," (both as path parameters).",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Response will contain:"]}," the full user group object including ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["name"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["description"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["companyId"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["isUnmodifiable"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["createdAt"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["updatedAt"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["createdBy"]},", and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["updatedBy"]},".",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Note:"]}," If ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["isUnmodifiable"]}," is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]},", the group is platform-created and its name, description, and assigned roles cannot be changed. However, user members can still be added to it or removed from it.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Other APIs will use:"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["groupId"]}," from this response."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"ol","attributes":{"start":3},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[]}]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/openapi/rbacapi/user-groups/listusergroupmembers"},"children":["List user group members"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /v3/companies/{companyId}/user-groups/{groupId}/members"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["View the current members of the user group selected in Step 2. Use this step to verify existing members before adding a new user.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["URL path requires:"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["companyId"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["groupId"]},".",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Response will contain:"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["members"]}," (an array of member objects each containing ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["userId"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["addedAt"]},") and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pagination"]}," with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["totalNumResults"]},".",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Note:"]}," Use this response to confirm that the user you intend to add is not already a member of the group."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"ol","attributes":{"start":4},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[]}]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/openapi/rbacapi/roles/listusergrouprolesv3"},"children":["List user group roles"]}," (optional)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /v3/companies/{companyId}/user-groups/{groupId}/roles"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["View the roles currently assigned to the user group. This helps you understand what permissions the new user will inherit once added to the group.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["URL path requires:"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["companyId"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["groupId"]}," from Step 1.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Response will contain:"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["roles"]}," (an array of role objects each containing role details with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["name"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["description"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["isPlatformRole"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["permissions"]},", and associated scope information)."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"ol","attributes":{"start":5},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[]}]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/openapi/rbacapi/user-groups/updateusergroupmembers"},"children":["Update user group members"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PATCH /v3/companies/{companyId}/user-groups/{groupId}/members"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Add the new user to the user group.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["URL path requires:"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["companyId"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["groupId"]},".",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Request body requires:"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["userIdsToAdd"]}," (an array of user IDs to add to the group).",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Note:"]}," Users being added must belong to the same company as the user group. Once added, they will automatically inherit all roles and scopes assigned to the group.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Response will contain:"]}," a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["200"]}," status code confirming the members were updated successfully."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"ol","attributes":{"start":6},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[]}]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/openapi/rbacapi/user-groups/listusergroupsforuser"},"children":["List user groups for user"]}," (optional)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /v3/users/{userId}/user-groups"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Verify that the user was successfully added by listing all user groups the user belongs to.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["URL path requires:"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["userId"]},".",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Response will contain:"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["userGroups"]}," (an array of user group objects that the user is a member of). The user group from Step 2 should now appear in this list, confirming the user has been successfully added and has inherited the group's roles and scopes."]}]}]}]}]}]},"headings":[{"value":"Adding a user to an existing user group","id":"adding-a-user-to-an-existing-user-group","depth":1}],"frontmatter":{"seo":{"title":"Adding a user to an existing user group"}},"lastModified":"2026-06-10T10:18:40.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/spotnana/rbac_add_user_to_group_workflow","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}