Skip to main content

Creates a new user resource from a User object passed as an argument.

create(user: User): Promise<User>

Remarks

Only a member of the System Administrators group can create a user resource.

Example

JavaScript
let user = {    
    "userName": "tdurden",
    "email": "t.turden@fightclub.com",
    "firstname": "Tyler",
    "lastname": "Durden",
    "timezone": "America/New_York",
    "language": "en-US",
    "custom": {
        "department": "Soap sales"
    },
    "credentials": {
        "password": "pr0j3ctM4yh3m"
    }
};

client.security.users.create(user)
    .then(result => {
        console.log('API call result: ', result);
    })
    .catch(error => {
        console.log('API call fetch error: ', error);        
    });

Still need help?

If you still need help after reading this article, don't hesitate to reach out to the Contensis community on Slack or raise a support ticket to get help from our team.
New support request