To assign a bot role to a set of users in a specific bot.
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 Role Management under Role Management.
POST https://{{host}}/api/public/btroles/assignments/
Query Parameters
Parameter | Required/Optional | Description |
---|---|---|
host | Required | Environment URL, for example, https://bots.kore.ai |
Body Parameters
Parameter | Required/Optional | Description |
---|---|---|
roleId | Required | The ID of the bot role to assign the users or groups. |
botId | Required | The ID of the bot in which to assign the bot roles |
addUsers or addOrgUserIds | Optional | The list of usernames or org user ids for whom to assign the bot role |
removeUsers or removeOrgUserIds | Optional | The list of usernames or org user ids for whom to remove the bot role |
addGroups | Optional | The list of group names for whom to assign the bot role |
removeGroups | Optional | The list of group names for whom to remove the bot role |
Authorization
Invoke the API with JWT in the header with the following syntax:
auth: {{JWT}}
Response Content Type
application/json
Sample Request
curl -X POST \ https://{{host}}/api/public/btroles/assignments/' \ -H 'Content-Type: application/json' \ -H 'auth: {{YOUR_JWT_ACCESS_TOKEN}}' \ -d '[{ "roleId":"5bee8fv6729d35741e05aba4", "botId":"{{botId}}", "addUsers":[""], "removeUsers":[""], "addGroups": ["G2"], "removeGroups":[""] }]
Sample Response
[ { "status": "success " } ]