POST api/Account/CreateRequestorUser

Creates a new user account by administrator.

Request Information

URI Parameters

None.

Body Parameters

CreateRequestorUserPost
NameDescriptionTypeAdditional information
UserName

Username, login. It cannot be changed later

string

None.

Email

User's email. Recommended so the user can receive email notifications

string

None.

Password

(Optional) Password has to meet password policy (minimum length, non alphabetical characters). If the password is empty, it will be generated.

string

None.

RoleEndUser

Set true if the user has the EndUser role

boolean

None.

RoleSmartUser

Set true if the user has the SmartUser role

boolean

None.

RoleOperator

Set true if the user has the Operator role

boolean

None.

RoleSuperOperator

Set true if the user has the SuperOperator role

boolean

None.

RoleAdministrator

Set true if the user has the Administrator role

boolean

None.

CustomerId

(Optional) Default Customer ID

integer

None.

CustomerIds

(Optional) All Customer IDs. Use either CustomerIds or CustomerNames to add user into the customers.

Collection of integer

None.

InternalGroupIds

(Optional) Internal Group IDs

Collection of integer

None.

OperatorGroupIds

(Optional) Operator Group IDs

Collection of integer

None.

Language

(Optional) Language. If not set, the default RQ language is used.

LanguageEnum

None.

FirstName

(Optional) Firstname

string

None.

LastName

(Optional) Lastname

string

None.

MiddleName

(Optional) Middlename

string

None.

DisplayName

(Optional) The name the user wants to display (like nick name).

string

None.

Phone

(Optional) Phone

string

None.

TimeZoneId

(Optional) The time zone identifier (TimeZoneInfo.Id Property). If not set, the default RQ TimeZone is used.

string

None.

ChangePasswordAfterLogging

Set true if the user must change his password after the first logging.

boolean

None.

AdditionalInformation

(Optional) Additional information about the user.

string

None.

CustomFields

The Custom Fields data.

Collection of UserCustomFieldData

None.

Phones

(Optional) Phones

Collection of string

None.

CustomerNames

(Optional) All Customer names. Default Customer is the first item. Use either CustomerIds or CustomerNames to add user into the customers.

Collection of string

None.

Request Formats

application/json, text/json

Sample:
{
  "UserName": "john.doe",
  "Email": "john.doe@domain.com",
  "Password": "His_Password",
  "RoleEndUser": true,
  "RoleSmartUser": false,
  "RoleOperator": false,
  "RoleSuperOperator": false,
  "RoleAdministrator": false,
  "CustomerId": null,
  "CustomerIds": null,
  "InternalGroupIds": null,
  "OperatorGroupIds": null,
  "Language": null,
  "FirstName": "John",
  "LastName": "Doe",
  "MiddleName": null,
  "DisplayName": "John Doe",
  "Phone": "+420 123 456 789",
  "TimeZoneId": null,
  "ChangePasswordAfterLogging": false,
  "AdditionalInformation": "Everything else",
  "CustomFields": null,
  "Phones": null,
  "CustomerNames": null
}

application/xml, text/xml

Sample:
<CreateRequestorUserPost xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/RequestorApiDataStructures.Posts">
  <AdditionalInformation>Everything else</AdditionalInformation>
  <ChangePasswordAfterLogging>false</ChangePasswordAfterLogging>
  <CustomFields xmlns:d2p1="http://schemas.datacontract.org/2004/07/RequestorApiDataStructures.DataStructures" i:nil="true" />
  <CustomerId i:nil="true" />
  <CustomerIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" i:nil="true" />
  <CustomerNames xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" i:nil="true" />
  <DisplayName>John Doe</DisplayName>
  <Email>john.doe@domain.com</Email>
  <FirstName>John</FirstName>
  <InternalGroupIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" i:nil="true" />
  <Language i:nil="true" />
  <LastName>Doe</LastName>
  <MiddleName i:nil="true" />
  <OperatorGroupIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" i:nil="true" />
  <Password>His_Password</Password>
  <Phone>+420 123 456 789</Phone>
  <Phones xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" i:nil="true" />
  <RoleAdministrator>false</RoleAdministrator>
  <RoleEndUser>true</RoleEndUser>
  <RoleOperator>false</RoleOperator>
  <RoleSmartUser>false</RoleSmartUser>
  <RoleSuperOperator>false</RoleSuperOperator>
  <TimeZoneId i:nil="true" />
  <UserName>john.doe</UserName>
</CreateRequestorUserPost>

Response Information

Resource Description

HttpStatusCode 200 OK with user id (UserProviderKey) or 400 BadRequest with Message.

CreateRequestorUserResult
NameDescriptionTypeAdditional information
UserProviderKey

User Id

string

None.

LastUpdatedUtc

Last update time of the User entity. Actually it is the user creation server time.

date

None.

Response Formats

application/json, text/json

Sample:
{
  "UserProviderKey": "34609646-d9ca-4ec6-a79b-875dde4de83a",
  "LastUpdatedUtc": null
}

application/xml, text/xml

Sample:
<CreateRequestorUserResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/RequestorApiDataStructures.Results">
  <LastUpdatedUtc i:nil="true" />
  <UserProviderKey>34609646-d9ca-4ec6-a79b-875dde4de83a</UserProviderKey>
</CreateRequestorUserResult>