Create User
API URL: POST https://userapi-demo.s2f.projectx.com/Register
API Reference: /Register
Description
Create a new User.
Parameters
Name | Type | Description | Required | Nullable |
---|---|---|---|---|
password | string | The new User's password. | true | true |
string | The new User's email. | true | true | |
userName | string | The new User's username. | true | true |
firstName | string | The new User's first name. | true | true |
lastName | string | The new User's last name. | true | true |
screenName | string | The new User's screen name. | true | true |
internalTag | integer | The new User's internal tag, commonly used to distinguish between regular trading accounts and test (internal) accounts. | true | true |
Example Usage
Example Request
- Request
- Request cURL
{
"password": "password",
"email": "johndoe@email.com",
"userName": "jdoe",
"firstName": "John",
"lastName": "Doe",
"screenName": "",
"internalTag": 0 // 0 = Default, 1 = Internal
}
curl -X 'POST' \
'https://userapi-demo.s2f.projectx.com/Register' \
-H 'accept: text/plain' \
-H 'Content-Type: application/json' \
-d '{
"password": "password",
"email": "johndoe@email.com",
"userName": "jdoe",
"firstName": "John",
"lastName": "Doe",
"screenName": ""
}'
Example Response
- Success
- Error
{
"userId": 7,
"loginToken": "LOGIN_TOKEN_FOR_USER",
"errorMessage": null,
"result": 0
}
{
"userId": null,
"loginToken": null,
"errorMessage": "Invalid email address format.",
"result": 3
}