To add or remove users or groups from admin roles.
This API requires JWT generated by an application created only from the Bot Admin Console.
| Method | POST |
| Endpoint | https://{{host}}/api/public/adminroles/assignments/ |
| Content Type | application/json |
| Authorization | auth: {{JWT}}
|
| API Scope |
|
Path Parameters
| Parameter | Required/Optional | Description |
|---|---|---|
| host | Required | Environment URL, for example, https://bots.kore.ai |
Sample Request
curl -X POST \
https://{{host}}/api/public/adminroles/assignments/ \
-H 'Content-Type: application/json' \
-H 'auth: YOUR_JWT_ACCESS_TOKEN' \
-d '[{
"roleId":"5bre4bb433f78c73f4e5a0d1",
"addUsers":["sample1@sampleemail.com"],
"removeUsers":[],
"addGroups": [],
"removeGroups":[]
}]'
Body Parameters
| Parameter | Required/Optional | Description |
|---|---|---|
| roleId | Required | The admin role ID to assign or remove from users or groups |
| addUsers or addOrgUserIds | Optional | The list of usernames or org user ids for whom to assign the admin role |
| removeUsers or removeOrgUserIds | Optional | The list of usernames or org user ids for whom to remove the admin role |
| addGroups | Optional | The list of group names for whom to assign the admin role |
| removeGroups | Optional | The list of usernames for whom to remove the admin role |
Sample Response
[
{
"status": "success",
"roleId": "64b8d1862f377730a77548c4"
}
]