Auto-register sub-account
Sub-Accounts & White-Label Retail KYC
/auto-register
Auto-register sub-account
createAutoRegisterProvision or retrieve a partner-owned sub-account using a case-sensitive external uid. This endpoint does not return an end-user token. The partner authenticates customers in its own application and authorizes sub-account access through its backend. Same Idempotency-Key and exact request replay the original status/body; a new key for an existing uid returns the existing account. Concurrent creation routes share one identity claim. Legacy duplicate identities return 409 CUSTOMER_IDENTITY_CONFLICT without selecting or merging accounts.
Parameters
This endpoint has no path or query parameters.
Headers
AuthorizationstringRequiredBearer sk_sandbox_<your_key> for sandbox requests.
Idempotency-KeystringheaderRequiredUnique string that makes write calls safe to retry on network failure. Required for money movement, trading, KYC, subscriptions, and webhook creation. Deduplicated for 24 hours -- duplicate keys return the cached response. HTTP 409 if a concurrent request with the same key is still in progress.
Example: dep_user42_1743152580
Request body
uidstringRequiredYour internal user identifier. Idempotency key -- calling twice with the same uid returns the same sub-account.
Example: "user_42"
emailstringEmail address for the sub-account user.
Example: "alice@yourapp.com"
namestringFull name shown in the MyStocks admin console.
Example: "Alice K."
phonestringUser phone number in E.164 format.
Example: "+254712345678"
countrystringISO 3166-1 alpha-2 country code.
Example: "KE"
Response fields
subAccountIdstringRequiredexternalIdstringRequiredCase-sensitive partner customer identifier.
displayNamestring | nullemailstring | nullkycStatusstringstatusstringExisting account lifecycle status; provisioning does not reactivate frozen or closed accounts.
walletBalancenumberRequiredisNewbooleanRequiredWhether this original request created the account. Unchanged request replay preserves the original result.
sandboxbooleanResponse codes
200Existing sub-account retrieved. Exact request replays preserve their original status/body.201New sub-account created. Replay retains this status.409IDEMPOTENCY_MISMATCH or CUSTOMER_IDENTITY_CONFLICT; no financial identities are merged.