Skip to main content
Back to API List 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 the Admin Console.
FieldValue
MethodPOST
Endpointhttps://{{host}}/api/public/btroles/assignments/
Content Typeapplication/json
Authorizationauth: {{JWT}} See How to generate the JWT Token.
API ScopeApp Builder: Not Applicable; Admin Console: Profile Management > Role Management

Path Parameters

PARAMETERREQUIRED/OPTIONALDESCRIPTION
hostRequiredEnvironment URL, for example, https://platform.kore.ai

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":[""]
}]'

Body Parameters

PARAMETERREQUIRED/OPTIONALDESCRIPTION
roleIdRequiredThe ID of the bot role to assign the users or groups.
botIdRequiredThe ID of the bot in which to assign the bot roles.
addUsers or addOrgUserIdsOptionalThe list of usernames or org user IDs for whom to assign the bot role.
removeUsers or removeOrgUserIdsOptionalThe list of usernames or org user IDs for whom to remove the bot role.
addGroupsOptionalThe list of group names for whom to assign the bot role.
removeGroupsOptionalThe list of group names for whom to remove the bot role.

Sample Response

[
    {
        "status": "success "
    }
]