List User Groups
This endpoint returns a page of user groups in your account.
Endpoint
Section titled “Endpoint”GET /v1/user-groups/user-groupsAuthentication
Section titled “Authentication”Include your API key in the x-api-key header. See Authentication.
Required Scope
Section titled “Required Scope”user-groups:readQuery Parameters
Section titled “Query Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
page | number | No | Zero-based page index. Defaults to 0. |
pageSize | number | No | Number of groups per page. Defaults to 25. |
q | string | No | Search text matched against the group name and description. |
sortCol | "name" | "createdAt" | "updatedAt" | No | Sort column. Applies only when sortDir is also sent. |
sortDir | "asc" | "desc" | No | Sort direction. Applies only when sortCol is also sent. |
When no valid sort is sent, groups are sorted by updatedAt and then createdAt, newest first. See Pagination for paging and sorting rules.
Request Body
Section titled “Request Body”This endpoint does not accept a request body.
Example Request
Section titled “Example Request”curl "https://api.crewsum.com/v1/user-groups/user-groups?page=0&pageSize=25" \ -H "x-api-key: $CREWSUM_API_KEY"const response = await fetch( "https://api.crewsum.com/v1/user-groups/user-groups?page=0&pageSize=25", { headers: { "x-api-key": process.env.CREWSUM_API_KEY, }, },);const result = await response.json();GET /v1/user-groups/user-groups?page=0&pageSize=25 HTTP/1.1Host: api.crewsum.comx-api-key: <your-api-key>Response
Section titled “Response”On success, the API returns HTTP 200 OK.
Example Response
Section titled “Example Response”{ "message": "Successfully fetched user groups", "data": { "groups": [ { "id": "36b735f8-4dd7-4c3c-836f-35d2fe84e872", "name": "Operations", "description": "Users who manage operations work.", "userCount": 3, "createdAt": "2026-05-27T18:00:00.000Z", "updatedAt": null } ], "count": 1 }}Behavior
Section titled “Behavior”countis the total number of groups that matchq, not the number on this page.userCountis the number of users in each group.- List items do not include members or assignments. Use Get User Group for those.
Error Responses
Section titled “Error Responses”| Status | Meaning |
|---|---|
500 | "Error fetching user groups": the request failed. |
Authentication and scope failures are described in Errors.
Related Webhooks
Section titled “Related Webhooks”This endpoint does not trigger a webhook.