Skip to content
Session Groups API
DocsREST API

Session Groups API

Session groups are private, per-user folders for organizing agent sessions. Create groups, rename or reorder them, and add or remove sessions as members.

Groups are scoped to the API key's creator: keys from different users in the same account see different group lists. Endpoints use the existing sessions:read and sessions:write permissions.

Membership is managed only through these routes. REST session list and get responses do not include group membership fields.

List Session Groups

GET/api/v1/session-groups

Requires sessions:read permission. Returns the current user's groups ordered by position.

Response 200 OK

json
{
  "groups": [
    {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "name": "Work",
      "position": 0,
      "createdAt": "2026-07-01T12:00:00Z",
      "updatedAt": "2026-07-02T12:00:00Z"
    }
  ]
}

groups is always an array (never null). An empty list returns {"groups":[]}.

Create a Session Group

POST/api/v1/session-groups

Requires sessions:write permission. Group names are unique per user (case-sensitive after trim) and limited to 60 characters.

Request

json
{
  "name": "Work"
}
ParamDefaultDescription
namerequiredDisplay name for the group. Must be non-empty after trimming whitespace.

Response 201 Created

json
{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "name": "Work",
  "position": 0,
  "createdAt": "2026-07-01T12:00:00Z",
  "updatedAt": "2026-07-01T12:00:00Z"
}

Returns 409 Conflict if a group with the same name already exists for the user. Empty or whitespace-only names return 400 Bad Request.

Rename a Session Group

PATCH/api/v1/session-groups/{groupId}

Requires sessions:write permission. Same name rules as create (non-empty, unique per user, max 60 characters).

Request

json
{
  "name": "On-call"
}
ParamDefaultDescription
namerequiredNew display name for the group.

Response 200 OK

json
{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "name": "On-call",
  "position": 0,
  "createdAt": "2026-07-01T12:00:00Z",
  "updatedAt": "2026-07-12T18:00:00Z"
}

Delete a Session Group

DELETE/api/v1/session-groups/{groupId}

Requires sessions:write permission. No request body needed. Deleting a group removes its memberships; the sessions themselves are not deleted.

Response 200 OK

json
{
  "success": true
}

Reorder Session Groups

PUT/api/v1/session-groups/reorder

Requires sessions:write permission. The list must include each of your groups exactly once (same set as GET /session-groups, in the desired order).

Request

json
{
  "orderedGroupIds": [
    "b2c3d4e5-f6a7-8901-bcde-f12345678901",
    "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  ]
}
ParamDefaultDescription
orderedGroupIdsrequiredGroup IDs in the desired display order. Must match the full set of the user’s groups exactly once.

Response 200 OK

json
{
  "success": true
}

Incomplete or duplicate IDs return 400 Bad Request.

Add a Session to a Group

POST/api/v1/session-groups/{groupId}/sessions

Requires sessions:write permission. Archived sessions cannot be added to a group.

Request

json
{
  "sessionId": "abc123"
}
ParamDefaultDescription
sessionIdrequiredID of the session to add as a member of the group.

Response 200 OK

json
{
  "success": true
}

Remove a Session from a Group

DELETE/api/v1/session-groups/{groupId}/sessions/{sessionId}

Requires sessions:write permission. No request body needed. Only removes membership; the session itself is unchanged.

Response 200 OK

json
{
  "success": true
}