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
/api/v1/session-groupsRequires sessions:read permission. Returns the current user's groups ordered by position.
Response 200 OK
{
"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
/api/v1/session-groupsRequires sessions:write permission. Group names are unique per user (case-sensitive after trim) and limited to 60 characters.
Request
{
"name": "Work"
}| Param | Default | Description |
|---|---|---|
name | required | Display name for the group. Must be non-empty after trimming whitespace. |
Response 201 Created
{
"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
/api/v1/session-groups/{groupId}Requires sessions:write permission. Same name rules as create (non-empty, unique per user, max 60 characters).
Request
{
"name": "On-call"
}| Param | Default | Description |
|---|---|---|
name | required | New display name for the group. |
Response 200 OK
{
"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
/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
{
"success": true
}Reorder Session Groups
/api/v1/session-groups/reorderRequires sessions:write permission. The list must include each of your groups exactly once (same set as GET /session-groups, in the desired order).
Request
{
"orderedGroupIds": [
"b2c3d4e5-f6a7-8901-bcde-f12345678901",
"a1b2c3d4-e5f6-7890-abcd-ef1234567890"
]
}| Param | Default | Description |
|---|---|---|
orderedGroupIds | required | Group IDs in the desired display order. Must match the full set of the user’s groups exactly once. |
Response 200 OK
{
"success": true
}Incomplete or duplicate IDs return 400 Bad Request.
Add a Session to a Group
/api/v1/session-groups/{groupId}/sessionsRequires sessions:write permission. Archived sessions cannot be added to a group.
Request
{
"sessionId": "abc123"
}| Param | Default | Description |
|---|---|---|
sessionId | required | ID of the session to add as a member of the group. |
Response 200 OK
{
"success": true
}Remove a Session from a Group
/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
{
"success": true
}