Skip to content

Register a customer

POST /customer-register

Save a visitor’s email and optional name before continuing a generation. This registers an Antla visitor; it does not authenticate a Shopify customer.

Authentication: X-Antla-SDK-Key: YOUR_ANTLA_SDK_KEY. Content-Type: application/json.

Uses the shared IP rate limit. See Errors and rate limits.

Body fieldTypeRequiredDescription
emailstringYesValid email, trimmed by this endpoint.
namestringNoTrimmed non-empty customer name. Omit if unavailable.
uniqueUserIdstringNoTrimmed non-empty saved Antla visitor ID.
Terminal window
curl --fail-with-body -X POST \
"https://app-antla.com/api/headless/customer-register" \
-H "X-Antla-SDK-Key: YOUR_ANTLA_SDK_KEY" \
-H "Content-Type: application/json" \
--data '{
"email": "shopper@example.com",
"name": "Alex",
"uniqueUserId": "SAVED_VISITOR_ID"
}'

HTTP 200, JSON envelope:

{
"data": {
"uniqueUserId": "visitor-id",
"requestsLeft": -1,
"totalRequests": 1
}
}

Omit uniqueUserId when you do not have one. Never send SAVED_VISITOR_ID literally. Save the returned ID.

requestsLeft is normally -1 after registration, because the visitor now has an email. totalRequests is how many try-ons are already counted in the current period. In the example that count is 1. Both numbers are computed for this visitor.

This is not a general update-email endpoint. A known identity that already has an email may be returned without changing it. Missing server-detected buyer IP can cause Unable to identify session; an IP-resolved identity already registered can cause Email already registered.

No moreLooksConsent field is accepted by this endpoint’s contract. Pass consent with generation. For generation-linked Klaviyo tracking, pass customerEmail on generation as well.

400 Invalid customer registration, Invalid JSON body, Unable to identify session, or Email already registered. See Errors and rate limits.