# List user groups for user This endpoint provides list of user groups of a user, with filtering, sorting, and pagination support. Endpoint: POST /v3/users/{userId}/user-groups Version: v3 Security: Bearer ## Path parameters: - `userId` (string, required) Identifier of the user. Example: "1234a66b-7493-4f41-908c-58ba81093947" ## Request fields (application/json): - `searchText` (string) Query text to search user groups. The match would be case-insensitive. Example: "Company Admins" - `pagination` (object, required) Pagination information for request. - `pagination.offset` (integer) The starting index in the list from which results are returned. The value must be greater than or equal to 0. - `pagination.limit` (integer) Maximum number of results to be fetched. - `sortParams` (object) Sorting related parameters. - `sortParams.sortBy` (string, required) The field name to sort user groups. Enum: "NAME", "CREATED_AT" - `sortParams.sortOrder` (string, required) Sorting order. Enum: "DESC", "ASC" - `filters` (array) List of filters. User groups matching with any filter would be returned. - `filters.userGroupIds` (array) List of user group ids. ## Response 200 fields (application/json): - `userGroups` (array, required) User groups matching with the request. - `userGroups.id` (string, required) User group identifier. Example: "4974a66b-7493-4f41-908c-58ba81093947" - `userGroups.name` (string, required) Name of the user group. Example: "Company Admins" - `userGroups.description` (string, required) A description of the user group. Example: "Group for managing the company settings." - `userGroups.companyId` (string, required) Company ID of the user group. Example: "1234a66b-7493-4f41-908c-58ba81093653" - `userGroups.createdAt` (object, required) Date and time when the user group was created. - `userGroups.createdAt.iso8601` (string, required) Example: "2017-07-21T17:32Z" - `userGroups.updatedAt` (object, required) Date and time when the user group was last updated. - `userGroups.createdBy` (object, required) User who created the user group. - `userGroups.createdBy.id` (string, required) Example: "b93dc51f-12dd-46c7-b7d6-1cb12cd3f5b3" - `userGroups.createdBy.name` (string) Example: "Name" - `userGroups.updatedBy` (object, required) User who last updated the user group. - `userGroups.isUnmodifiable` (boolean) Whether the group is not modifiable. This would be set true only for platform created groups. Only group name, description and assigned roles & scopes can not be modified but members can still be updated. - `pagination` (object, required) Pagination information for response. - `pagination.totalNumResults` (integer, required) Total number of results. ## Response 400 fields (application/json): - `debugIdentifier` (string) Link to debug the error internally. - `errorMessages` (array) - `errorMessages.errorCode` (string) Error code to identify the specific errors. - `errorMessages.message` (string) Message containing details of error. - `errorMessages.errorParameters` (array) Error message parameters. - `errorMessages.errorParameters.name` (string) Parameter name - `errorMessages.errorParameters.value` (string) Parameter value - `errorMessages.errorDetail` (string) More details about the error. ## Response 401 fields (application/json): - `debugIdentifier` (string) Link to debug the error internally. - `errorMessages` (array) - `errorMessages.errorCode` (string) Error code to identify the specific errors. - `errorMessages.message` (string) Message containing details of error. - `errorMessages.errorParameters` (array) Error message parameters. - `errorMessages.errorParameters.name` (string) Parameter name - `errorMessages.errorParameters.value` (string) Parameter value - `errorMessages.errorDetail` (string) More details about the error. ## Response 403 fields (application/json): - `debugIdentifier` (string) Link to debug the error internally. - `errorMessages` (array) - `errorMessages.errorCode` (string) Error code to identify the specific errors. - `errorMessages.message` (string) Message containing details of error. - `errorMessages.errorParameters` (array) Error message parameters. - `errorMessages.errorParameters.name` (string) Parameter name - `errorMessages.errorParameters.value` (string) Parameter value - `errorMessages.errorDetail` (string) More details about the error.