- b2evolution CMS User Manual
- Advanced Topics
- Using the APIs
- REST API or RESTful API
- Create a User (REST)
Create a User (REST)
POST <baseurl>/api/v1/users
This API end-point allows to create a User. It is the equivalent of the back-office feature: Creating a New User.
Parameters
Name |
Type |
Description |
Required? |
Default |
---|---|---|---|---|
edited_user_login |
string |
User login |
yes |
|
edited_user_status |
string |
Account status: |
yes |
|
edited_user_pass1 |
string |
Password |
yes |
|
identity_form |
boolean |
|
no |
false |
edited_user_grp_ID |
integer |
Group ID |
no |
Depending on setting "Group for new users", see Standard Registration Panel |
edited_user_level |
integer |
User level; min - 0, max - 10 |
yes |
|
edited_user_email |
string |
Email address |
yes |
|
edited_user_firstname |
string |
First name |
Depending on setting "Firstname", see User Latitude Panel |
|
edited_user_lastname |
string |
Last name |
Depending on setting "Lastname", see User Latitude Panel |
|
edited_user_nickname |
string |
Nickname |
Depending on setting "Nickname", see User Latitude Panel |
|
edited_user_gender |
string |
Gender; |
Depending on setting "Gender", see Options for All Registration Methods Panel |
|
edited_user_ctry_ID |
integer |
Country ID |
Depending on setting "Country", see User Latitude Panel |
|
edited_user_rgn_ID |
integer |
Region ID |
Depending on setting "Region", see User Latitude Panel |
|
edited_user_subrg_ID |
integer |
Sub-region ID |
Depending on setting "Sub-region", see User Latitude Panel |
|
edited_user_city_ID |
integer |
City ID |
Depending on setting "City", see User Latitude Panel |
|
edited_user_age_min |
integer |
Minimum age group |
no |
|
edited_user_age_max |
integer |
Maximum age group |
no |
|
organizations[] |
array |
Array of organization IDs |
no |
|
org_roles[] |
array |
Array of organization roles |
no |
|
edited_user_source |
string |
Source of user creating |
no |
Messages / Errors
Error code |
HTTP response |
Message |
---|---|---|
no_access |
403 |
You are not logged in. |
user_invalid_id |
404 |
Invalid user ID |
no_access |
403 |
You have no permission to edit other users! |
update_failed |
403 |
Many different errors on wrong entered user fields, such as:
|
update_success |
201 |
New user has been created. |