Error response format
All error responses from the Chameleon API follow a consistent JSON format:| Field | Type | Description |
|---|---|---|
code | integer | The HTTP status code |
messages | array<string> | One or more human-readable error messages |
wait | integer | (429 only) Number of seconds to wait before retrying |
Status codes at a glance
| Code | Meaning | Common cause |
|---|---|---|
200 | OK | Request succeeded |
201 | Created | Resource was created successfully |
403 | Unauthorized | Invalid or revoked API token |
404 | Not Found | Bad URL or resource doesn’t exist |
409 | Conflict | Resource is in an incompatible state |
422 | Unprocessable | Invalid request parameters |
429 | Rate Limited | Too many requests |
500 | Internal Server Error | Unexpected server-side error |
503 | Service Unavailable | Server maintenance or overload |
504 | Gateway Timeout | Request took too long to process |
Status Code 403 — Unauthorized
Account token is not valid or has been revoked.- Verify your
X-Account-Secretheader value matches a token from Settings → Tokens. - Check that the token hasn’t been revoked. You can generate a new one from the dashboard.
- Ensure you’re using the Account Secret (not the Account Token, which is for the JavaScript snippet).
- Confirm the header name is exactly
X-Account-Secret(case-sensitive).
Status Code 404 — Not Found
Endpoint or resource not found.- Verify the URL was copied correctly. URLs include an environment specifier after the version (e.g.,
/v3/edit/tours,/v3/analyze/profiles). - Check that the resource ID exists and belongs to your account.
- Ensure the base URL is
https://api.chameleon.io(not a typo or old URL). - For profile lookups, confirm the
uidoremailhas been previously identified to Chameleon.
Status Code 409 — Conflict
The resource is in a state that conflicts with the requested operation.- Delivery to unpublished Experience — The Tour or Microsurvey must be published before creating a Delivery. Publish it first via the dashboard or API.
- Updating a triggered Delivery — Once a Delivery has been triggered (
athas a value), it can no longer be modified or deleted. - Too many pending Deliveries — A user has reached the pending Delivery limit (default: 3). Use
delivery_ids_at_limit=dropto replace the oldest, or delete existing Deliveries first. - Import already started — Once
import_atis set on an Import, it can’t be updated. - Search item/group limits exceeded — HelpBar content limits reached. See HelpBar limits.
Status Code 422 — Unprocessable
The request parameters can’t be processed as provided.- Invalid timestamp — A parameter expected as a timestamp can’t be parsed. Use ISO 8601 format (e.g.,
"2024-01-15T10:30:00Z"). - Missing identifier — Looking up a User Profile requires at least one of
id,uid, oremail. - Invalid filter expression — A segmentation filter has incorrect syntax or unsupported operators.
- Import property mismatch — CSV column headers don’t match the specified
propertiesmapping. - Invalid enum value — A parameter like
kindormodel_kindhas an unrecognized value.
Status Code 429 — Rate Limited
You’ve exceeded the rate limit for concurrent or bucketed requests.- Check the
waitfield in the response body — this tells you how many seconds to wait before retrying. - Check the
X-Ratelimit-Waitheader for the wait time in seconds. - Implement exponential backoff: wait the specified time, then retry with increasing delays if still limited.
- Review your concurrency: the Chameleon API limits concurrent requests per endpoint. See Rate limiting for per-endpoint limits.
- For bulk operations, consider using batch endpoints (e.g., bulk tagging) instead of individual requests.
Status Code 500 — Internal Server Error
An unexpected server-side error occurred.- This is typically a transient issue. Wait a few seconds and retry.
- If the error persists, check status.chameleon.io for any ongoing incidents.
- If the problem continues after retrying, contact support with the request details and timestamp.
Status Code 503 — Service Unavailable
Server not available or backend didn’t respond in time. The response may not be JSON depending on the origin.- This typically indicates maintenance or temporary unavailability. Check status.chameleon.io.
- Implement retry logic with exponential backoff.
- If you see frequent 503 errors, you may be hitting system-wide rate limits. See Rate limiting.
Status Code 504 — Gateway Timeout
An internal operation took too long to complete.- The request may have been too complex (e.g., a broad search query or large filter set). Try narrowing your request.
- Retry after a brief delay. If the issue persists, simplify the request parameters.
- For large dataset operations, use pagination with smaller
limitvalues.

