Skip to content
Get a group

Get a group

Read a group by your application's group ID, including a page of its users.

GET/api/v1/groups/:groupId

Request#

TypeScript
const response = await fetch("https://api.smallworld.sh/api/v1/groups/team_42?limit=50", {
  method: "GET",
  headers: { Authorization: `Bearer ${apiKey}` },
});
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
const result = await response.json();

Use your server-side apiKey. Replace the example IDs.

Path parameters#

groupIdstringrequired

Your application's group ID, URL-encoded. At most 512 characters, with no surrounding whitespace or null bytes.

Query parameters#

cursorstring

The opaque users.nextCursor from a previous read of this group in this workspace. Omit for the first page.

limitinteger

Number of users to return, from 1 to 100. Defaults to 50.

Responses#

Returns id (your group ID), nullable name, system, memberCount, and ISO 8601 createdAt and updatedAt timestamps. system is true only for the dashboard's Playground Group. Also returns users: { items, nextCursor }. Each item is a full user as returned by GET /users/:id. memberCount is the total membership count, independent of the page size. users.nextCursor is null on the final page.

200 response
{
  "id": "team_42",
  "name": "Support team",
  "system": false,
  "memberCount": 2,
  "createdAt": "2026-10-10T12:00:00.000Z",
  "updatedAt": "2026-10-10T12:00:00.000Z",
  "users": {
    "items": [
      {
        "id": "customer_123",
        "email": "customer@example.com",
        "groupIds": [
          "team_42"
        ],
        "createdAt": "2026-10-10T12:00:00.000Z",
        "updatedAt": "2026-10-10T12:00:00.000Z"
      },
      {
        "id": "customer_456",
        "email": null,
        "groupIds": [
          "team_42",
          "team_77"
        ],
        "createdAt": "2026-10-10T12:00:00.000Z",
        "updatedAt": "2026-10-10T12:00:00.000Z"
      }
    ],
    "nextCursor": null
  }
}
More about this endpoint

URL-encode group IDs when constructing the path.

Read the next page from this same endpoint with cursor=users.nextCursor. A cursor works only for the group and workspace that returned it.

An empty group returns users: { items: [], nextCursor: null }. Listing, creating, and updating groups return group summaries without users.