CustomerRegistration¶
Endpoint¶
POST /customer/registration
Description¶
Creates a new customer profile as a lead, with an empty milestone mask.
The server accepts public registration fields and resets manager/KYC/AML/internal fields to safe defaults.
The request must provide a customer name either as full_name or through at
least one structured component: first_name, middle_name, or last_name.
Both forms are normalized into the same customer structure.
registered: true confirms that the record was created. It does not mean that
the customer has reached the Registered milestone. Every public registration
starts with customer_kind = 0 and lifecycle_flags = 0. A manager or workflow
must raise the Registered flag explicitly.
The brand is resolved from the HTTP request host. A body brand value is used only as a fallback when the request context permits it.
Registration also resolves marketing attribution. A normal brand landing page is matched automatically; an external landing can provide an attribution object; a mobile application can provide an installation_id. See Marketing Attribution API.
Affiliate integrations should create leads through
CustomerRegistrationByAffiliate. Automatic
account creation is configured separately as a customer.created workflow;
public registration does not select a trading group.
If the resolved brand has authorize_after_registration = 1, successful
registration also creates a customer session and returns its signed JWT in
__token. The flag defaults to 0; in that mode the customer must use the
normal sign-in endpoint after registration.
Request¶
{
"email": "[email protected]",
"password": "strong-password",
"full_name": "John Smith",
"phone": "+35700000000",
"brand": "default",
"preferred_language": "en",
"timezone": "Asia/Nicosia",
"marketing_allowed": 1
}
External landing attribution¶
{
"email": "[email protected]",
"password": "strong-password",
"first_name": "John",
"last_name": "Smith",
"attribution": {
"affiliate": "AFF1024",
"campaign": "FB_CY_01",
"utm_source": "partner-landing",
"utm_medium": "affiliate",
"sub_id": "creative-7"
}
}
Mobile registration¶
{
"email": "[email protected]",
"password": "strong-password",
"full_name": "John Smith",
"installation_id": "4c0b68c8-3c90-46dc-a0dc-e092f879dd80"
}
Customer name formats¶
The API accepts either representation:
{
"full_name": "John Smith"
}
or:
{
"first_name": "John",
"last_name": "Smith"
}
Name fields are trimmed and repeated whitespace is collapsed. The following normalization rules apply:
- when structured components are supplied without
full_name, the server joins the non-emptyfirst_name,middle_name, andlast_namevalues in that order; - when only
full_nameis supplied, the first word becomesfirst_nameand the remaining text becomeslast_name; a single-word name becomesfirst_name; - when both forms are supplied, all explicit values are preserved and
full_nameis treated as the display name; middle_nameis never inferred fromfull_name;- the normalized or assembled
full_namemust not exceed 255 characters; - an empty or whitespace-only name is rejected.
Automatic parsing is intentionally a fallback. Integrations that know the
customer's structured name should send first_name and last_name explicitly.
Response¶
{
"registered": true,
"customer": {
"customer_id": 1,
"email": "[email protected]",
"first_name": "John",
"last_name": "Smith",
"full_name": "John Smith",
"status": 0,
"lifecycle_flags": 0,
"customer_kind": 0,
"conversion_flags": 0,
"enable": 1,
"deposit_allowed": 1,
"withdrawal_allowed": 1,
"brand": "default",
"created_time": 1777600000,
"updated_time": 1777600000
},
"__token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
__token is conditional and is present only when the resolved brand enables
authorize_after_registration. Its claims and signing behavior are identical
to a token returned by normal customer authorization. Issuing the token also
updates the customer's last_login_time.
| Field | Type | Description |
|---|---|---|
registered |
bool | true after the customer has been created |
customer |
object | Created customer profile |
__token |
string | Optional customer JWT when brand auto-authorization is enabled |
Errors¶
| HTTP | Error | Description |
|---|---|---|
400 |
INVALID_DATA |
Invalid request body or no usable customer name |
404 |
BRAND_NOT_FOUND |
Request host and fallback brand do not resolve to an active brand |
409 |
DUPLICATE_RECORD |
Email is already registered |
Lifecycle¶
Public registration always creates a lead with an empty milestone mask. Raising the Registered flag is explicit:
- a CRM manager writes
lifecycle_flagswithMngUpdateCustomer; or - a workflow executes
customer.set_lifecycle_flags.
Conversion from lead to client is a separate operation, performed by
MngConvertLeadToClient.
The response field registered describes the registration operation and must
not be used as a milestone value.