Register customer
Creates a customer account and returns a customer token. When the channel requires email verification the account is not created yet: the response carries a pending-registration token and a 6-digit code is emailed, to be confirmed with customers/verify-email. A store that requires a birthday refuses registration without one. Passwords need at least 8 characters with the strength rules of the DTO.
For /api/vc/{connectionId}/* routes the connectionId (vc_*) is in the URL path — not a header. Live-mode requests must also send a matching Origin header.
In: header
Path Parameters
Sales channel ID (vc_*), the canonical salesChannelId. connectionId is the deprecated name of the same value and is still the literal path segment.
Header Parameters
Origin of the storefront page making the call, for example https://shop.example.com. Required: a request with no Origin header is refused with 403. On a LIVE channel its host must equal the channel's registered domain (or one of its subdomains) or match an allowed origin. A TEST channel with no domain accepts any origin; once a domain is set it is matched as on LIVE.
Version of the calling SDK (the Brainerce SDK sends it automatically). Informational: it is recorded on the channel and never changes the response.
Customer email, unique per store. Becomes the login identifier.
emailPassword (≥ 8 chars, must match PASSWORD_REGEX: at least one uppercase, lowercase, number, and special char).
^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[^a-zA-Z0-9]).{8,}$8 <= lengthFirst name.
Last name.
Phone number (E.164 format recommended).
Marketing consent flag (gates promo emails / SMS).
Birthday month (1-12) for the loyalty birthday gift. Month and day only, with no year. Send it together with birthDay or not at all. Optional on most channels; a channel with requireBirthday turned on rejects a registration that omits it.
1 <= value <= 12Birthday day of month (1-31). Send it together with birthMonth or not at all. The day must exist in that month, so 30 February is rejected.
1 <= value <= 31Privacy-policy acceptance flag, required by some stores before account creation. The frontend should require this checkbox when the store enables it.
Loyalty referral share code (REF-XXXXXXXX) from a referrer's link. Validated asynchronously after registration, so an invalid code never fails the registration itself.
length <= 40curl -X POST "https://api.brainerce.com/api/vc/string/customers/register" \ -H "origin: string" \ -H "X-SDK-Version: string" \ -H "Content-Type: application/json" \ -d '{ "email": "[email protected]", "password": "CorrectHorse-Battery-Staple9" }'{
"customer": {
"id": "clcus_abc123",
"email": "[email protected]",
"firstName": "Jane",
"lastName": "Doe",
"phone": "string",
"emailVerified": true
},
"token": "string",
"expiresAt": "2026-10-07T09:00:00.000Z",
"requiresVerification": false
}{
"statusCode": 400,
"code": "VALIDATION_FAILED",
"message": "name should not be empty, price must be a positive number",
"timestamp": "2026-08-23T10:15:00.000Z",
"path": "/api/vc/{connectionId}/customers/register"
}{
"statusCode": 403,
"code": "INSUFFICIENT_SCOPE",
"message": "API key does not have the required scope: products:write",
"timestamp": "2026-08-23T10:15:00.000Z",
"path": "/api/vc/{connectionId}/customers/register"
}{
"statusCode": 404,
"code": "RESOURCE_NOT_FOUND",
"message": "Resource not found",
"timestamp": "2026-08-23T10:15:00.000Z",
"path": "/api/vc/{connectionId}/customers/register"
}{
"statusCode": 409,
"code": "CONFLICT",
"message": "The request conflicts with the current state of the resource",
"timestamp": "2026-08-23T10:15:00.000Z",
"path": "/api/vc/{connectionId}/customers/register"
}{
"statusCode": 429,
"code": "RATE_LIMITED",
"message": "Too many requests",
"details": {
"retryAfterSeconds": 12
},
"timestamp": "2026-08-23T10:15:00.000Z",
"path": "/api/vc/{connectionId}/customers/register"
}