Get email collection status
GET /requests-left
Check whether this visitor must register an email before another try-on. The call can create an anonymous visitor for the current IP.
Request
Section titled “Request”Authentication: X-Antla-SDK-Key: YOUR_ANTLA_SDK_KEY.
Uses the shared IP rate limit. See Errors and rate limits.
| Query parameter | Type | Required | Description |
|---|---|---|---|
uniqueUserId | string | No | Non-empty saved Antla visitor ID. Omit if none is available. |
Example request
Section titled “Example request”curl --fail-with-body \ "https://app-antla.com/api/headless/requests-left" \ -H "X-Antla-SDK-Key: YOUR_ANTLA_SDK_KEY"Successful response
Section titled “Successful response”HTTP 200, JSON envelope:
{ "data": { "requestsLeft": 2, "totalRequests": 1, "uniqueUserId": "visitor-id" }}In this example, 1 try-on is already counted and 2 remain before email is required. totalRequests is that counted number. It is not the allowance, and it is not the merchant’s credit balance.
requestsLeftgreater than 0: that many try-ons remain before the email gate.0: collect an email before the next try-on.-1: email collection is off, or this visitor already has an email.
When email collection is off, the response is requestsLeft: -1, totalRequests: 0, uniqueUserId: null. Keep a visitor ID you already saved when a later response returns null.
Save any non-null uniqueUserId. Send ?uniqueUserId= only with a real value, and URL-encode it. The pre-check can still be stale by the time you start a generation, so handle EMAIL_REQUIRED on that request too. This counter is separate from merchant credits and from the rolling per-visitor try-on limit.
Errors
Section titled “Errors”400 Invalid uniqueUserId when the query value is empty. See Errors and rate limits.