curl -X POST "https://api.genlook.app/storefront/v1/shopper/email" \
-H "Authorization: Bearer pk_your_key_here" \
-H "X-Genlook-Anonymous-Id: anon_..." \
-H "Content-Type: application/json" \
-d '{
"email": "customer@example.com",
"marketingConsent": true
}'
await fetch('https://api.genlook.app/storefront/v1/shopper/email', {
method: 'POST',
headers: {
'Authorization': `Bearer ${PUBLISHABLE_KEY}`,
'X-Genlook-Anonymous-Id': anonymousId,
'Content-Type': 'application/json',
},
body: JSON.stringify({
email: 'customer@example.com',
marketingConsent: true,
})
});
{
"success": true,
"message": "Email collected successfully"
}
Widget API Reference
Collect Email
Collect customer email addresses and marketing consent
POST
/
storefront
/
v1
/
shopper
/
email
curl -X POST "https://api.genlook.app/storefront/v1/shopper/email" \
-H "Authorization: Bearer pk_your_key_here" \
-H "X-Genlook-Anonymous-Id: anon_..." \
-H "Content-Type: application/json" \
-d '{
"email": "customer@example.com",
"marketingConsent": true
}'
await fetch('https://api.genlook.app/storefront/v1/shopper/email', {
method: 'POST',
headers: {
'Authorization': `Bearer ${PUBLISHABLE_KEY}`,
'X-Genlook-Anonymous-Id': anonymousId,
'Content-Type': 'application/json',
},
body: JSON.stringify({
email: 'customer@example.com',
marketingConsent: true,
})
});
{
"success": true,
"message": "Email collected successfully"
}
Collect a customer email and sync it to your Shopify store as a customer record. The customer is tagged
With the SDK, this also clears the
genlook-user and joins the “Virtual Try-On Users by Genlook” customer segment.
On JavaScript, the
@genlook/storefront SDK is the recommended integration: it calls this endpoint for you, along with the rest of the try-on flow.email-required policy gate:
SDK
await genlook.collectEmail({ email });
Treat this as a fire-and-forget call. Don’t block user flow on errors.
Request
string
required
Customer’s email address.
boolean
Whether the customer consented to marketing emails. Defaults to
false.boolean
Whether the consent checkbox was shown. Useful for compliance tracking.
curl -X POST "https://api.genlook.app/storefront/v1/shopper/email" \
-H "Authorization: Bearer pk_your_key_here" \
-H "X-Genlook-Anonymous-Id: anon_..." \
-H "Content-Type: application/json" \
-d '{
"email": "customer@example.com",
"marketingConsent": true
}'
await fetch('https://api.genlook.app/storefront/v1/shopper/email', {
method: 'POST',
headers: {
'Authorization': `Bearer ${PUBLISHABLE_KEY}`,
'X-Genlook-Anonymous-Id': anonymousId,
'Content-Type': 'application/json',
},
body: JSON.stringify({
email: 'customer@example.com',
marketingConsent: true,
})
});
Response
boolean
required
Whether the email was collected.
string
required
Status message.
{
"success": true,
"message": "Email collected successfully"
}
Was this page helpful?

