Create User

This API endpoint is not supported in the Free Trial cloud.

Creates a new user in the system. The username is the user’s email address. For non‑Federated users, the username must be a valid email address and is used for login and identification.

To be able to run this API endpoint, you need to be an Admin user or part of Perfecto Support.

URL

Copy
https://<your-cloud>.app.perfectomobile.com/api/v1/users

Method

POST

Header parameters

Name

Description

Perfecto-Authorization

Security Token

Query parameters

Parameter Type Default Description

username*

string


A valid email address.

password

string


The password for the user. See also Password policy. This field is mandatory if isIdpUser is set to false.

firstName

string


The new user's first name.

lastName

string


The new user's last name.

email*

string


The user's email address. This parameter is required in addition to username.

roles

string


The roles assigned to the new user, specified as a comma-seperated list.

enabled

boolean

true

A flag that indicates if the user is enabled in the system.

isIdpUser

boolean

false

A flag that indicates if the user is authenticated through a third-party identity provider (IdP).

tempPassword

string

false

The temporary password used to log into the system for the first time.

sendNotification

boolean

false

true to email the user the credentials, cloud URL, documentation links, and support information if the operation is successful.

groupKey

string


The ID of the group that the new user is assigned to.

idpLink

string


The link to the third-party identity provider, if used.

idpUsername

string


The username in the IdP system, if used.

deviceGroups

array of a string

[string, string]


The

 

name of the device groups that the user is assigned to.

* Mandatory

Success response

Code: 200

Copy
Sample JSON body
{
"username":"BenB",
"password":"sdS!4dfd",
"firstName":"Ben",
"lastName":"Amar",
"email":BenB@gmail.com,
"roles":["administrator"]
}
Copy
Sample JSON response
{
    "username": "benb",
    "password": "sdS!4dfd",
    "firstName": "Ben",
    "lastName": "Amar",
    "email": BenB@gmail.com,
    "roles": ["administrator"],
    "enabled": true,
    "locked": false,
    "isIdpUser": false,
    "lastLoginAt": 0
}