Skip to content

List sub-users

get/sub-users
Workspace key

Returns a list of all sub-users of your workspace's company. Each sub-user includes its assigned chatbots' names, not just their IDs. The response is an empty array when the workspace has no SSO company.

Requires the SSO Login add-on (see plans) and a workspace API key; without the add-on, or with a chatbot-scoped key, the request gets a 403.

Try it · GET /sub-users
curl 'https://api.chat-data.com/api/v2/sub-users' \  -H "Authorization: Bearer $CHAT_DATA_API_KEY"
Loading…

Responses

Successful response.

Content type: application/json

FieldDescription
[]._idstringThe unique identifier of the sub-user.
[].companystringThe ID of the company this sub-user belongs to.
[].emailstringThe sub-user's email address.
[].namestringThe sub-user's display name.
[].avatarstringURL of the sub-user's avatar image, or an empty string if none is set.
[].chatbotIdsarray of objectThe assigned chatbots, each with its _id and name.
[].chatbotIds[]._idstringThe chatbot ID.
[].chatbotIds[].namestringThe chatbot name.
[].permissionsarray of stringPermissions granted to this sub-user.
[].analyticsDashboardSectionsarray of stringAnalytics dashboard sections visible to this sub-user.
[].hasPasswordbooleanWhether the sub-user has a password configured (the actual password is never returned).
[].hasGooglebooleanWhether the sub-user has signed in with a linked Google account (the Google ID is never returned). It stays false when Google sign-in is only enabled.
[].createdAtstringTimestamp when the sub-user was created.
[].lastLoginAtstringTimestamp of the sub-user's last sign-in. Absent until they first sign in.

Example

[  {    "_id": "6650f1c2a9e4b83d2c7a1f9a",    "company": "6650f1c2a9e4b83d2c7a1f3c",    "email": "[email protected]",    "name": "Jane Doe",    "avatar": "https://example.blob.core.windows.net/chatfiles/6650f1c2a9e4b83d2c7a1f9a/avatar.png",    "chatbotIds": [      {        "_id": "6650f1c2a9e4b83d2c7a1f05",        "name": "Support Bot"      },      {        "_id": "6650f1c2a9e4b83d2c7a1f06",        "name": "Sales Assistant"      }    ],    "permissions": [      "read",      "train"    ],    "analyticsDashboardSections": [      "Overview",      "Messages Timeline",      "Chats"    ],    "hasPassword": true,    "hasGoogle": false,    "createdAt": "2026-10-14T09:30:00.000Z",    "lastLoginAt": "2026-10-14T10:15:00.000Z"  }]

Last updated October 14, 2026