GuestRegistration¶
Registers the currently authenticated guest. The customer ID and account login are preserved; the existing account remains in the same group. Successful registration enables the customer's deposit and withdrawal gates, clears the guest cookie, and returns a regular session token for the promoted identity.
Endpoint¶
POST /session/guest/register
Authorization¶
Requires the guest session JWT in the Authorization header and its matching secure __Host-ion_guest cookie. Send a same-origin browser request with credentials enabled; the endpoint applies the platform origin check. The cookie is HttpOnly and must not be accessed by JavaScript.
The request must include email, password, and a name: either full_name or at least one of first_name, middle_name, or last_name. Password length is 6–128 characters. auth_type is optional and defaults to account; use customer to issue a normal customer session token after promotion. This option changes the authentication identity represented by __token, while the response remains the preserved account profile. Optional fields omitted from the request are stored as empty values during promotion.
Request Parameters¶
| Field | Type | Required | Limit | Description |
|---|---|---|---|---|
email |
string | Yes | 255 characters | Registration email; must not belong to another customer. |
password |
string | Yes | 6–128 characters | Password for the promoted customer/account. |
full_name |
string | One name form | 255 characters | Full customer name. |
first_name |
string | One name form | 128 characters | Structured first name. |
middle_name |
string | One name form | 128 characters | Structured middle name. |
last_name |
string | One name form | 128 characters | Structured last name. |
phone |
string | No | 64 characters | Customer phone. |
preferred_language |
string | No | 16 characters | Preferred language. |
timezone |
string | No | 64 characters | Customer time zone. |
country_of_residence |
string | No | 64 characters | Country of residence. |
address_of_residence |
string | No | 255 characters | Residence address. |
auth_type |
string | No | account or customer |
Token identity to issue after promotion. Defaults to account; any other value returns INVALID_DATA. |
At least one of full_name, first_name, middle_name, or last_name must be non-empty. If both full_name and structured names are supplied, full_name is used as the account name while the structured values are retained in the customer profile.
Request example¶
{
"email": "[email protected]",
"password": "strong-password",
"first_name": "Jane",
"last_name": "Doe",
"phone": "+35700000000",
"preferred_language": "en",
"timezone": "Asia/Nicosia",
"country_of_residence": "CY",
"address_of_residence": "12 Example Street",
"auth_type": "customer"
}
Success response¶
{
"id": 100001,
"login": 100001,
"customer_id": 8101,
"guest": false,
"regdate": 1790755200,
"leverage": 100,
"email": "[email protected]",
"avatar": "",
"name": "Jane Doe",
"phone": "+35700000000",
"address": "12 Example Street",
"city": "",
"state": "",
"country": "CY",
"zipcode": "",
"group": "demo-guest",
"currency": "USD",
"registered": true,
"__token": "<Ed25519 session JWT>"
}
The response clears the cookie using Set-Cookie with Max-Age=0. guest_expires_at is omitted after promotion. By default, __token is a normal account session token. When auth_type is customer, __token is instead a normal customer session token (type: 9, customer_id as the identity ID). In both modes the JSON response remains the preserved account profile, including the account login and customer ID; the guest identity is no longer active.
Response Parameters¶
| Field | Type | Description |
|---|---|---|
id |
integer | Preserved trading account login. |
login |
integer | Preserved trading account login. |
customer_id |
integer | Preserved customer record identifier. |
guest |
boolean | False after promotion. |
regdate |
integer | Account registration time as Unix seconds. |
leverage |
integer | Account leverage. |
email |
string | Account email. |
avatar |
string | Avatar reference or empty string. |
name |
string | Account name. |
phone |
string | Account phone. |
address |
string | Account address. |
city |
string | Account city. |
state |
string | Account state or region. |
country |
string | Account country. |
zipcode |
string | Account postal code. |
group |
string | Assigned account group. |
currency |
string | Account currency from the assigned group. |
registered |
boolean | True when guest promotion succeeded. |
__token |
string | Ed25519 platform session JWT. Its identity is an account by default, or a customer when auth_type is customer. |
Errors¶
| HTTP | Error | Description |
|---|---|---|
| 400 | INVALID_DATA |
Required registration values are missing or a field is invalid. |
| 403 | GUEST_TRANSPORT_REQUIRED |
The request did not use HTTP. |
| 403 | GUEST_ORIGIN_DENIED |
The request failed the platform origin check. |
| 403 | GUEST_SESSION_REQUIRED |
The guest token or matching cookie is missing, invalid, expired, or no longer active. |
| 403 | BRAND_NOT_AVAILABLE |
The request brand is unavailable or differs from the guest brand. |
| 403 | GUEST_DISABLED |
Guest registration is disabled for the brand. |
| 429 | GUEST_RATE_LIMITED |
Guest request rate limit was reached. |
| 503 | GUEST_UNAVAILABLE |
Guest promotion or session admission is unavailable. |
| 409 | EMAIL_ALREADY_EXISTS |
The email is already assigned to another customer. |
Any password created or replaced by this operation must satisfy the active platform password policy. Violations return 400 PASSWORD_POLICY_VIOLATION with reason and password_policy; 503 SECURITY_GUARD_UNAVAILABLE means the policy could not be checked. See Get Password Policy.