To update user details.
This API requires JWT generated by an application created only from Bot Admin Console.
To use this API, app needs the Admin API Scope of User Management under Security & Control.
PUT https://{{host}}/api/public/users
NOTE: This feature was introduced in ver7.1 of the platform.
Query Parameters
Parameter | Description |
---|---|
host | Environment URL, for example, https://bots.kore.ai |
Body Parameters
Parameter | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
users | The array of details for each user that need to be updated
|
Authorization
Invoke the API with JWT in the header with the following syntax:
auth: {{JWT}}
Response Content Type
application/json
Sample Request
curl -X PUT \ https://{{host}}/api/public/users \ -H 'Content-Type: application/json' \ -H 'auth: YOUR_JWT_ACCESS_TOKEN' \ -d '{ "users": [ { "userInfo": { "emailId": "publicuser2@gmail.com" // or "orgUserId": <orgUserId> }, "groups": { "addTo": [ "e-f9c09c08-9310-52ff-b672-570ec7325215" ] }, "roles": { "addTo": [ { "roleId": "5d9d8db3x0d54920a8df1e68b", "botId": "st-b8525f88-6dd3-54a7-8a97-734ecb748733" } ], "removeFrom": [ { "roleId": "5d9d920dabdc1e6e8ec99342", "botId": "st-16511425-15c5-5cdf-b652-a796db7d134b" } ] }, "assignBotTasks": [ { "streamId": "st-xxx-xx-xxx-xxx-xxxx", "dialogs": ["dg-xxxx-xx-xx-xx-xxxx"] } ], "canCreateBot": true, "isDeveloper": true } ] } '
Sample Response
-
- For success case:
{ "msg": "Users are updated Successfully" };
- For success case: