POST api/Accounts

Creates an account.

Request Information

URI Parameters

None.

Body Parameters

NewAccountModel of the new account.

AccountInputModel
NameDescriptionTypeAdditional information
UserName

Gets or sets user name.

string

Required

Password

Gets or sets password.

string

Required

Data type: Password

String length: inclusive between 6 and 100

ConfirmPassword

Gets or sets confirm password.

string

Required

Data type: Password

Email

Gets or sets email.

string

Required

RoleName

Gets or sets role name.

string

None.

Request Formats

application/json, text/json

Sample:
{
  "userName": "sample string 1",
  "password": "sample string 2",
  "confirmPassword": "sample string 3",
  "email": "sample string 4",
  "roleName": "sample string 5"
}

application/xml, text/xml

Sample:
<AccountInputModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/GtMotive.GtApi.DistributedServices.ApiRest.Models.Accounts">
  <ConfirmPassword>sample string 3</ConfirmPassword>
  <Email>sample string 4</Email>
  <Password>sample string 2</Password>
  <RoleName>sample string 5</RoleName>
  <UserName>sample string 1</UserName>
</AccountInputModel>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'AccountInputModel'.

Response Information

Resource Description

Json with information about the account.

IHttpActionResult

None.

Response Formats

application/json, text/json, application/xml, text/xml

Sample:

Sample not available.