Skip to content

Update a sub-user

put/sub-users/{subUserId}
Workspace key

Update an existing sub-user's name, password, chatbot assignments, permissions or analytics dashboard sections. Only provided fields are updated; omitted fields remain unchanged.

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.

To remove a sub-user's password (disabling password login), send:

{  "removePassword": true}

Path parameters

Required
subUserIdstring
The unique identifier of the sub-user to update.

Request body

Sending 0 of 6 fields

Only these fields are sent (application/json). Fields you leave off keep their current values.

Try it · PUT /sub-users/{subUserId}
curl -X PUT 'https://api.chat-data.com/api/v2/sub-users/6650f1c2a9e4b83d2c7a1f9a' \  -H "Authorization: Bearer $CHAT_DATA_API_KEY" \  -H 'Content-Type: application/json' \  -d '{}'
Loading…

Responses

Sub-user updated successfully.

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",  "chatbotIds": [    {      "_id": "6650f1c2a9e4b83d2c7a1f05",      "name": "Support Bot"    }  ],  "permissions": [    "full"  ],  "analyticsDashboardSections": [    "Overview",    "Chats"  ],  "avatar": "",  "hasPassword": true,  "hasGoogle": false,  "createdAt": "2026-10-14T09:30:00.000Z"}

Last updated October 14, 2026