How to Add a New User to the User Management Server Using Bold BI REST API
Authentication
Please refer to this document to get the authentication token.
Authorization Header
Header Name | Header Value |
Authorization | Bearer <access_token> |
- Pass the access token generated from the token endpoint in the Authorization header.
Create a new user using the following API endpoint.
{base url}/api/v2.0/user/addMETHOD POST URL /v2.0/user/add Include the following parameters in the body of the request in JSON format.
Parameter Name
Type
Required
Comments
username
String
Yes
Username of the user
email
String
Yes
This value may be required based on the user account configuration.
The default value is yes.
firstname
String
Yes
First name of the user
lastname
String
Optional
Last name of the user
password
String
Automatic Activation – Yes
Email Activation - No
Password of the user.
Based on the activation mode, the password parameter should be passed.
- At least 6 characters
- 1 uppercase
- 1 lowercase
- 1 numeric
- 1 special character
- You will get a response message with the new user information as follows.
{
"api_status": true,
"data": {
"user_id": "fd39e677-b5c8-49c5-b139-aa75c99e9770",
"user_name": "John",
"email": "john@syncfusion.com",
"first_name": "John",
"last_name": "Soundar",
"display_name": "John Soundar",
"contact": "",
"directory_type": {
"id": 1,
"name": "Local"
},
"email_verified": true,
"user_status": "Active",
"avatar_url": null
},
"status": true,
"status_message": "User has been added and activated successfully"
} The newly created user is visible on the UMS's users page.
Refer to this document to learn more about managing users in UMS.
Note:
Password must contain:
Error Messages
Http Status Code |
Description |
Error Message |
401 |
Unauthorized |
- |
400 |
Bad Request |
Current request is empty. |
400 |
Bad Request |
Username field is empty |
406 |
Not Acceptable |
Invalid username length |
400 |
Bad Request |
Username already exists. |
400 |
Bad Request |
Email address already exists. |
400 |
Bad Request |
Email address field is empty. |
406 |
Not Acceptable |
Invalid email address. |
400 |
Bad Request |
First name field is empty. |
406 |
Not Acceptable |
Invalid first name. |
406 |
Not Acceptable |
Invalid last name. |
400 |
Bad Request |
Password field is empty. |
Related links
How to Generate Access Token from User Management Server using Bold BI REST API
How to Grant Site Access to the User in the user management server using the Bold BI REST API
How to Remove Site Access to the User in the user management server using Bold BI REST API
How to Delete the User from the user management server using Bold BI REST API