Account Control Example
Create User
In the following section is an example of how to create a user.
Create User Request URL:
https://api.nuubit.net/v1/users
Create user JSON (User.json):
{
"email": "[email protected]",
"firstname": "Peter",
"lastname": "Parker",
"password": "Spider-Man",
"theme": "light",
"companyId": [
"581145bb24216b0f72f23aeb"
],
"role": "admin",
"access_control_list": {
"readOnly": false,
"test": true,
"configure": true,
"reports": true,
"dashBoard": true
}
}
cURL example:
curl -H "Accept: application/json" \
-H "Authorization:X-API-KEY 6905f1bd-cbab-4d82-ad9d-f818d1fbdad2" \
-X POST -T User.json https://api.nuubit.net/v1/users
Response body:
{
"object_id" : "581238b524216b0f72f23df9",
"message" : "Successfully created new user",
"statusCode" : 200
}
This means that the user was successfully created.
0 Comments