> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs-beta.getzep.com/v4/sdk-reference/user-groups/list/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs-beta.getzep.com/_mcp/server. # List user groups POST https://api.getzep.com/api/v4/user-groups/list Content-Type: application/json Requires a project API key, or an account-admin bearer token with the X-Zep-Project header. The account must be entitled to attribute-based access control. Reference: https://docs-beta.getzep.com/sdk-reference/user-groups/list ## Authentication - `Authorization` header (required) (prefixed with ` Api-Key `) — Type "Api-Key" followed by a space and the project API key. ## Request ### Query parameters - `limit` (integer, optional) — Page size - `cursor` (string, optional) — Opaque page cursor ### Body (application/json) This endpoint expects a v4.SearchListRequest. - `search` (string, optional) — Filters results to items matching this free-text search term. ## Response ### 200 OK - `items` (list of v4.UserGroup, optional) — The user groups on this page. - `next_cursor` (string, optional) — The cursor to pass as the next request's cursor to fetch the following page; absent when no further pages remain. - `total_size` (integer, optional) — The total number of matching user groups, counted at the time of this response. It does not indicate whether more pages remain. ## Errors ### 400 Bad Request Error Bad Request - `error` (v4.ErrorBody, optional) ### 401 Unauthorized Error Unauthorized - `error` (v4.ErrorBody, optional) ### 403 Forbidden Error Forbidden - `error` (v4.ErrorBody, optional) ### 404 Not Found Error Not Found - `error` (v4.ErrorBody, optional) ## Types ### v4.UserGroup - `created_at` (string, optional) — The time the user group was created. - `description` (string, optional) — A human-readable description of the user group. - `name` (string, optional) — The name of the user group. - `updated_at` (string, optional) — The time the user group was last updated. - `uuid` (string, optional) — The unique identifier of the user group. - `version` (integer, optional) — The user group's version, used for optimistic concurrency on updates. ### v4.ErrorBody - `code` (string, optional) - `details` (map from string to any, optional) - `message` (string, optional) - `param` (string, optional) - `request_id` (string, optional) ## Examples **Request** ```json {} ``` **Response** ```json { "items": [ { "created_at": "string", "description": "string", "name": "string", "updated_at": "string", "uuid": "string", "version": 1 } ], "next_cursor": "string", "total_size": 1 } ```