This API requires a JWT generated by an application created only from the Admin Console.
| Field | Value |
|---|---|
| Method | POST |
| Endpoint | https://{{host}}/api/public/users |
| Content Type | application/json |
| Authorization | auth: {{JWT}} See How to generate the JWT Token. |
| API Scope | App Builder: Not Applicable; Admin Console: User Management > User Management |
Path Parameters
| Parameter | Description |
|---|---|
host | Environment URL, for example, https://platform.kore.ai. |
Sample Request
curl -X POST \
https://{{host}}/api/public/users \
-H 'Content-Type: application/json' \
-H 'auth: YOUR_JWT_ACCESS_TOKEN' \
-d '{
"users": [
{
"userInfo": {
"emailId": "john.doe@example.com",
"orgUserId": "org assigned user id",
"firstName": "john",
"lastName": "doe",
"companyName": "company_name",
"dept": "dept"
},
"includeMeta": true,
"groups": [
"e-06b41cdd-7678-5394-b958-40ca5662xxxx"
],
"roles": [
{
"roleId": "5d9d8db30d54920a8df1xxxx",
"botId": "st-b8525f88-6dd3-54a7-8a97-734ecb74xxxx"
}
],
"canCreateBot": true,
"isDeveloper": true
}
]
}'
Body Parameters
| Parameter | Required | Description |
|---|---|---|
users | Array of user details. | |
userInfo.emailId | Required | Email ID of the user being added. |
userInfo.orgUserId | Optional | Organization-assigned user ID. |
userInfo.firstName | Optional | First name of the user. |
userInfo.lastName | Optional | Last name of the user. |
userInfo.companyName | Optional | Company of the user. |
userInfo.dept | Optional | Department of the user. |
userInfo.companyContactPhone | Optional | Company contact phone. |
userInfo.worknumber | Optional | Work number. |
userInfo.street | Optional | Street address. |
userInfo.suiteNo | Optional | Suite number. |
userInfo.city | Optional | City. |
userInfo.zip | Optional | ZIP code. |
userInfo.state | Optional | State. |
userInfo.country | Optional | Country. |
includeMeta | Optional | Set to true for encrypted response. Default: False. |
groups | Optional | Array of group IDs to which the user should belong. |
roles | Optional | Array of roleId-botId combinations defining the user’s role on each bot. |
assignBotTasks | Optional | Array of agents to assign to the user. |
canCreateBot | Optional | Whether the user can create agents. Default: true. |
isDeveloper | Optional | Whether the user has App Builder access. Default: true. |
sendEmail | Optional | Whether to send an activation email to the user. Default: true. |
Sample Response
Success:{
"msg": "User is created Successfully.",
"failedUserDetails": [
{
"userInfo": {
"emailId": "jane.doe@example.com",
"firstName": "jane",
"status": "success"
}
}
],
"moreAvailable": true,
"total": 1
}
{
"failedUserDetails": [
{
"userInfo": {
"emailId": "jane.doe@example.com",
"firstName": "jane",
"status": "failure",
"reason": {
"errors": [
{
"msg": "INVALID_EMAIL",
"code": 400
}
]
}
}
}
]
}
Response Parameters
| Parameter | Type | Description |
|---|---|---|
moreAvailable | Boolean | Indicates if more records are available for retrieval. |
total | Optional | The total count of available records. |