Skip to main content
Back to API List To add or remove users or groups from admin roles.
This API requires JWT generated by an application created only from the Admin Console.
FieldValue
MethodPOST
Endpointhttps://{{host}}/api/public/adminroles/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/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

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

Sample Response

[
    {
        "status": "success",
        "roleId": "64b8d1862f377730a77548c4"
    }
]