The system allows the creation of new users in BlueDolphin. Only the Administrators role enables the user to perform this action in the system. Here we provide the steps for creating a new user in BlueDolphin.
HTTP responses
HTTP response status code |
Interpretation |
---|---|
201 Created |
User created successfully |
400 Bad Request |
One or more parameters are missing or incorrect. The response body returns a specific error:
|
401 Unauthorized |
Invalid or missing API key secret and/or tenant |
403 Forbidden |
The user doesn’t have admin rights |
To create a new user, make a POST request to the /users
endpoint specifying:
-
Resource/endpoint destination URL
-
The header for your API request
-
The request body, which must include:
Parameter |
Required |
Type |
Default |
Description |
---|---|---|---|---|
|
✓ |
string |
|
The email address of the user. It must be unique within the environment. |
first_name |
✓ |
string |
|
The first name of the user. It must contain at least one and not more than 255 characters. |
last_name |
✓ |
string |
|
The last name of the user. It must contain at least one and not more than 255 characters. |
create_bluedolphin_user |
X |
boolean |
false |
Indicates that the user should be created in BlueDolphin IDP. Only needed when no SSO is used. |
send_email_when_created |
X |
boolean |
false |
Indicates that an email should be sent to the email address provided in the request at the time of creation. |
Here is a sample API request which shows how to create a new user in BlueDolphin:
curl -L 'https://public-api.eu.bluedolphin.app/v1/users' \
-H 'x-api-key: YOURAPIKEYSECRET' \
-H 'tenant: yourtenantname' \
-H 'Content-Type: application/json' \
-d '{
"email": "jemma.wright@company.com",
"first_name": "Jemma",
"last_name": "Wright",
"create_bluedolphin_user": "false",
"send_email_when_created": "false"
}'
Response properties
Property |
Type |
Description |
---|---|---|
id |
string |
Unique identifier for the user |
first_name |
string |
The first name of the user |
last_name |
string |
The last name of the user |
|
string |
The email of the user |
invite_id |
string |
Invite ID in the GUID format that the user must use to complete the signup. Once the user signs up, it is no longer active and an empty value is returned. |
roles |
array |
The roles of the user |
roles[].id |
string |
Unique identifier for the role |
roles[].name |
string |
The name of the role |
roles[].internal_name |
string |
Internal name of the role |
avatar |
string |
The URL of the user’s avatar |
default_view_mode |
boolean |
Indicates if the user’s default mode is view mode or edit mode |
A successful call returns a response with a 201 OK
HTTP status code and the following body:
{
"id": "34b5765f315cf6edc527f9a3",
"first_name": "Jemma",
"last_name": "Wright",
"email": "jemma.wright@company.com",
"invite_id": "3f9cb463-0b48-4c0f-8eae-57be53c16b81",
"roles": [
{
"id": "52f83f88b52c4efb3d7953b3",
"name": "Default users",
"internal_name": "users"
},
{
"id": "52f83f88b52c4efb3d7953b2",
"name": "Administrators",
"internal_name": "administrators"
}
],
"avatar": "https://www.gravatar.com/avatar/bce65ae227ae45e2396b572cd5e35b3a.jpg?d=https%3A%2F%2Fcdn.domain.app%2Fmedia%2Fimages%2Fdomain%2Fdefault_avatar.png",
"default_view_mode": true
}
A new user with the id
34b5765f315cf6edc527f9a3
has now been created.
Comments
0 comments
Please sign in to leave a comment.