To add users to an account.
This API requires JWT generated by an application created only from the Bot Admin Console.
This feature was introduced in ver7.1 of the platform.
Method | POST |
Endpoint | https://{{host}}/api/public/users |
Content Type | application/json |
Authorization |
|
API Scope |
|
Path Parameters
Parameter | Description |
---|---|
host | Environment URL, for example, https://bots.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": "deskkore1@gmail.com", "orgUserId": "org assigned user id", "firstName": "user1", "lastName":"user1", "companyName":"company_name", "dept":"dept", "companyContactPhone":"12334444", "worknumber":"321", "street":"street", "suiteNo":"suite", "city":"city", "zip":"123123", "state":"state", "country":"country" }, "groups": [ "e-06b41cdd-7678-5394-b958-40ca5662f502" ], "roles": [ { "roleId": "5d9d8db30d54920a8df1e68b", "streamId": "st-b8525f88-6dd3-54a7-8a97-734ecb748733" }, { "roleId": "5d9d920dabdc1e6e8ec99342", "streamId": "st-16511425-15c5-5cdf-b652-a796db7d134b" }, { "roleId": "5bbcb20c8bfd33db440ec1d1" }, { "roleId": "5d9d8d930d54920a8df1e689" } ], "assignBotTasks": [ { "streamId": "st-xxx-xx-xxx-xxx-xxxx", "dialogs": ["dg-xxxx-xx-xx-xx-xxxx"] } ], "canCreateBot": true, "isDeveloper": true } ] }'
Body Parameters
Parameter | Required/Optional | Description |
---|
users | The array of details for each user to include user email id, user first name, group to which the user will belong, roles to be assigned to the Bots, and the permissions.
Note: The following entries till isDeveloper are the sub-parameters of the users parameter.
|
userInfo.emailId | Required | Email Ids of the user being added | ||||||
userInfo.orgUserId | Optional | User id assigned by your organization of the user being added | ||||||
userInfo.firstName | Optional | First name of the user being added | ||||||
userInfo.lastName | Optional | Last name of the user being added | ||||||
userInfo.companyName | Optional | Company to which the user being added belongs | ||||||
userInfo.dept | Optional | Department to which the user being added belongs | ||||||
userInfo.companyContactPhone | Optional | Contact Phone of the Company to which the user being added belongs | ||||||
userInfo.worknumber | Optional | Work number of the user being added | ||||||
userInfo.street | Optional | Street Address of the user being added | ||||||
userInfo.suiteNo | Optional | Suite No Address of the user being added | ||||||
userInfo.city | Optional | City Address of the user being added | ||||||
userInfo.zip | Optional | Zip Address of the user being added | ||||||
userInfo.state | Optional | State Address of the user being added | ||||||
userInfo.country | Optional | Country Address of the user being added | ||||||
groups | Optional | array of group ids to which the user should belong | ||||||
roles | Optional | array of roleId-botId combinations saying what role the user has on which bot | ||||||
assignBotTasks | Optional |
array of bots that need to be assigned to the user
|
||||||
canCreateBot | Optional | Determines if the specified users can create bots in their Bot Builder accounts. Set to true or false. Default value is “true”. |
||||||
isDeveloper | Optional | Determines if the specified users can have access to Bot Builder. Set to true or false. Default value is “true”. |
||||||
sendEmail | Optional | Determines if an email needs to be sent to the user containing activation link to activate users under the account. Set to true or false. Default value is “true”. |
Sample Response
- For success case:
{ "msg": "Users are created Successfully" };
- Failure case:
{ "failedUserDetails": [ { "userInfo": { "emailId": "deskkore1", "firstName": "user1", "status": "failure", "reason": { "statusCode": 400, "status": 400, "customCode": 400, "errors": [ { "msg": "INVALID_EMAIL", "code": 400 } ], "_headers": {}, "message": "INVALID_EMAIL", "name": "BadRequest" } } } ] }
On this Page
Create User API
To add users to an account.
This API requires JWT generated by an application created only from the Bot Admin Console.
This feature was introduced in ver7.1 of the platform.
Method | POST |
Endpoint | https://{{host}}/api/public/users |
Content Type | application/json |
Authorization |
|
API Scope |
|
Path Parameters
Parameter | Description |
---|---|
host | Environment URL, for example, https://bots.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": "deskkore1@gmail.com", "orgUserId": "org assigned user id", "firstName": "user1", "lastName":"user1", "companyName":"company_name", "dept":"dept", "companyContactPhone":"12334444", "worknumber":"321", "street":"street", "suiteNo":"suite", "city":"city", "zip":"123123", "state":"state", "country":"country" }, "groups": [ "e-06b41cdd-7678-5394-b958-40ca5662f502" ], "roles": [ { "roleId": "5d9d8db30d54920a8df1e68b", "streamId": "st-b8525f88-6dd3-54a7-8a97-734ecb748733" }, { "roleId": "5d9d920dabdc1e6e8ec99342", "streamId": "st-16511425-15c5-5cdf-b652-a796db7d134b" }, { "roleId": "5bbcb20c8bfd33db440ec1d1" }, { "roleId": "5d9d8d930d54920a8df1e689" } ], "assignBotTasks": [ { "streamId": "st-xxx-xx-xxx-xxx-xxxx", "dialogs": ["dg-xxxx-xx-xx-xx-xxxx"] } ], "canCreateBot": true, "isDeveloper": true } ] }'
Body Parameters
Parameter | Required/Optional | Description |
---|
users | The array of details for each user to include user email id, user first name, group to which the user will belong, roles to be assigned to the Bots, and the permissions.
Note: The following entries till isDeveloper are the sub-parameters of the users parameter.
|
userInfo.emailId | Required | Email Ids of the user being added | ||||||
userInfo.orgUserId | Optional | User id assigned by your organization of the user being added | ||||||
userInfo.firstName | Optional | First name of the user being added | ||||||
userInfo.lastName | Optional | Last name of the user being added | ||||||
userInfo.companyName | Optional | Company to which the user being added belongs | ||||||
userInfo.dept | Optional | Department to which the user being added belongs | ||||||
userInfo.companyContactPhone | Optional | Contact Phone of the Company to which the user being added belongs | ||||||
userInfo.worknumber | Optional | Work number of the user being added | ||||||
userInfo.street | Optional | Street Address of the user being added | ||||||
userInfo.suiteNo | Optional | Suite No Address of the user being added | ||||||
userInfo.city | Optional | City Address of the user being added | ||||||
userInfo.zip | Optional | Zip Address of the user being added | ||||||
userInfo.state | Optional | State Address of the user being added | ||||||
userInfo.country | Optional | Country Address of the user being added | ||||||
groups | Optional | array of group ids to which the user should belong | ||||||
roles | Optional | array of roleId-botId combinations saying what role the user has on which bot | ||||||
assignBotTasks | Optional |
array of bots that need to be assigned to the user
|
||||||
canCreateBot | Optional | Determines if the specified users can create bots in their Bot Builder accounts. Set to true or false. Default value is “true”. |
||||||
isDeveloper | Optional | Determines if the specified users can have access to Bot Builder. Set to true or false. Default value is “true”. |
||||||
sendEmail | Optional | Determines if an email needs to be sent to the user containing activation link to activate users under the account. Set to true or false. Default value is “true”. |
Sample Response
- For success case:
{ "msg": "Users are created Successfully" };
- Failure case:
{ "failedUserDetails": [ { "userInfo": { "emailId": "deskkore1", "firstName": "user1", "status": "failure", "reason": { "statusCode": 400, "status": 400, "customCode": 400, "errors": [ { "msg": "INVALID_EMAIL", "code": 400 } ], "_headers": {}, "message": "INVALID_EMAIL", "name": "BadRequest" } } } ] }
Menu