---
title: "List sub-users"
method: GET
path: "/sub-users"
tags: ["Sub-User Management"]
---

# List sub-users

`GET /sub-users`

## Request

- Base URL: `https://api.chat-data.com/api/v2`
- URL: `https://api.chat-data.com/api/v2/sub-users`
- Auth: HTTP bearer

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](/pricing)) and a workspace API key; without the add-on, or with a chatbot-scoped key, the request gets a 403.

## Response `200`

Successful response.

- SubUserObject[]
  - `_id` string, required: The unique identifier of the sub-user.
  - `company` string, required: The ID of the company this sub-user belongs to.
  - `email` string, email, required: The sub-user's email address.
  - `name` string: The sub-user's display name.
  - `avatar` string: URL of the sub-user's avatar image, or an empty string if none is set.
  - `chatbotIds` object[], required: The assigned chatbots, each with its `_id` and `name`.
    - `_id` string: The chatbot ID.
    - `name` string: The chatbot name.
  - `permissions` string[], required: Permissions granted to this sub-user.
  - `analyticsDashboardSections` string[]: Analytics dashboard sections visible to this sub-user.
  - `hasPassword` boolean, required: Whether the sub-user has a password configured (the actual password is never returned).
  - `hasGoogle` boolean, required: Whether 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.
  - `createdAt` string, date-time: Timestamp when the sub-user was created.
  - `lastLoginAt` string, date-time: Timestamp of the sub-user's last sign-in. Absent until they first sign in.

## Other responses

- `401`: Authentication failed: the `Authorization` header is missing or not in the `Bearer <key>` format, the API key does not exist, its workspace is unavailable or has no owner, or the workspace's plan does not include API access. `message` says which.
- `403`: The request used a chatbot-scoped API key (`This operation requires a user-level API key, not a chatbot-specific key`, with `status: error`), or the workspace does not have the SSO Login add-on (`SSO Login is unavailable with your current plan`, with no `status` field).
- `429`: The workspace sent more than 600 API requests in the last minute. Wait the number of seconds given in the `Retry-After` header (and in `message`) before retrying.
- `500`: An unexpected error occurred while processing the request; `message` contains the error.

---

[API](https://skmtc.dev/chat-data/apis/chat-data-api-schema-guide.md) · [All operations](https://skmtc.dev/chat-data/apis/chat-data-api-schema-guide/llms.txt) · [OpenAPI document](https://skmtc.dev/chat-data/apis/chat-data-api-schema-guide/revisions/72871007f7f0?raw)
