Skip to main content

Create an account

This endpoint performs the creation of a new user account.

info

username field must be unique and valid (valid characters are: a-z A-Z 0-9 _-).

info

Only users with the admin role can register new users.

info

This operation requires admin role.

HTTP Request

POST /api/v2/account/create/

Parameters

NameInTypeRequiredDescription
usernamebodystringtrueThe username of the user. Max 255 characters. Letters, numbers and -/_ characters
emailbodystringtrueThe email of the user.
passwordbodystringtrueThe password of the user. The password must be at least 8 characters (max 128 chararacters) and it must contains at least 3 of the following 4 types of characters: lower case letters, upper case letters, numbers and special characters (eg !@#$%^&)
invite_codebodystringfalseA valid invite code, only if 'invite_code' preference is true.
promo_codebodystringfalseA valid promo code, only if 'promo_code' feature is true.
custom_user_metadata (*)bodystringfalseCustom user metadata fields can be passed only if they are defined. Refer to the following guide User's custom fields (metadata).

Example Request

const inputBody = '{
"username": "string",
"email": "string",
"password": "string"
}';
const headers = {
'Authorization':'Bearer {access_token}',
'Content-Type':'application/json',
'Accept':'application/json'
};

fetch('/api/v2/account/create/',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});

Response Schema

StatusMeaningDescriptionSchema
201CREATEDResponse status codeUser