Skip to content
Skip to Content
Coder Docs

Get groups by organization (paginated)

GET
/api/v2/organizations/{organization}/paginated-groups

Unlike "Get groups by organization" (GET /organizations/{organization}/groups), which authorizes each group individually via its ACL, this endpoint requires organization-wide group read permission and does no per-group filtering. It is therefore not a drop-in replacement: callers without org-wide group read receive an error rather than a filtered subset.

The q parameter uses the shared filter syntax. Bare terms (including multi-word) perform a free-text search over group name and display name. search: is the only accepted key and unknown keys return 400. Because group display names may contain colons, a value with a colon must be quoted, e.g. search:"team: frontend"; an unquoted colon fails with Query element "team:" cannot start or end with ':'.

This endpoint returns group summaries without the member roster: each group carries only total_member_count and no members field. Callers that need the roster use the group members endpoint (GET /groups/{group}/members).

Authorization

CoderSessionToken
headerCoder-Session-Token<token>

Path Parameters

organization*string

Organization ID or name

Query Parameters

q?string

Search query (see description for syntax and colon-quoting)

limit?integer

Page limit

offset?integer

Page offset

after_id?string

After ID

Formatuuid

Response Body

OK

application/json
  1. response
count?integer
groups?array<>

The samples read CODER_URL and CODER_SESSION_TOKEN: set up your environment.

curl -X GET \	"$CODER_URL/api/v2/organizations/{organization}/paginated-groups" \	-H "Coder-Session-Token: $CODER_SESSION_TOKEN"
Example Response200
{  "count": 0,  "groups": [    {      "avatar_url": "http://example.com",      "display_name": "string",      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "name": "string",      "organization_display_name": "string",      "organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",      "organization_name": "string",      "quota_allowance": 0,      "source": "user",      "total_member_count": 0    }  ]}