Create

Create a new user.

Note that initially no password will be set and one should be requested using a password reset request.

Tokens

This action requires the following tokens:

  • user-write

Arguments

Required arguments are marked in bold, and optional arguments are marked in italics.

Argument Type Default Description
username String   The username for this user
email String   The email address of the user
firstname String   The first name of the user
lastname String   The last name of the user
active Boolean true Whether this user is active
sessionsenabled Boolean true Whether sessions are enabled for this user
timezone TimeZone   The timezone for this user. If not set, will use the platform timezone
mobilephone String   The mobile phone number of the user
address String   The address of the user
zipcode String   The ZIP code of the user
city String   The city of the user

Output

This action produces the following output on success:

An object containing the following fields:

Name Type Description
id Hash User ID
username String User name
active Boolean Whether this user is active
datecreated DateTime When this user was created
datemodified DateTime When this user was last modified
email String Email address
mobilephone String Mobile phone nr
firstname String First name of the user
lastname String Last name of the user
address String Address of the user
zipcode String ZIP code of this user
city String City of this user
sessionsenabled Boolean Whether sessions are enabled for this user
timezone TimeZone Timezone for this user
customer

Customer of this user

The value of this field is an object containing the following fields:

Name Type Description
id Hash Customer ID
name String The name of this customer
datecreated DateTime When this customer was created
datemodified DateTime When this customer was last modified
singlesignontokens

Single-sign on tokens for the user

The value of this field is an array containing zero or more elements, each one being an object containing the following fields:

Name Type Description
service

The single-sign on service for this token

The value of this field is an object containing the following fields:

Name Type Description
id Hash Single-sign on service ID
type Label The type of the single-sign service
name String The name of this service
token String The token
presharedkey String Pre-shared key for this user

Errors

This action can return one of the default status codes, or one of the following status codes on error:

STATUS_USER_USERNAME_ALREADY_EXISTS (316)