Skip to main content
The Chameleon API is robust with 99.99% uptime and extensive monitoring. In case you are facing any issues, you can check our Status Page.

Error response format

All error responses from the Chameleon API follow a consistent JSON format:
{
  "code": 422,
  "messages": ["Unprocessable: A description of what went wrong"]
}
FieldTypeDescription
codeintegerThe HTTP status code
messagesarray<string>One or more human-readable error messages
waitinteger(429 only) Number of seconds to wait before retrying

Status codes at a glance

CodeMeaningCommon cause
200OKRequest succeeded
201CreatedResource was created successfully
403UnauthorizedInvalid or revoked API token
404Not FoundBad URL or resource doesn’t exist
409ConflictResource is in an incompatible state
422UnprocessableInvalid request parameters
429Rate LimitedToo many requests
500Internal Server ErrorUnexpected server-side error
503Service UnavailableServer maintenance or overload
504Gateway TimeoutRequest took too long to process

Status Code 403 — Unauthorized

Account token is not valid or has been revoked.
{
  "code": 403,
  "messages": ["Unauthorized: Please check your Chameleon Account Secret"]
}
Troubleshooting:
  • Verify your X-Account-Secret header 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.
{
  "code": 404,
  "messages": ["Endpoint not found: Please recheck with the API docs https://developers.chameleon.io"]
}
Troubleshooting:
  • 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 uid or email has been previously identified to Chameleon.

Status Code 409 — Conflict

The resource is in a state that conflicts with the requested operation.
{
  "code": 409,
  "messages": ["Conflict: Please check the preconditions in the API docs https://developers.chameleon.io"]
}
Common scenarios:
  • 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 (at has 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=drop to replace the oldest, or delete existing Deliveries first.
  • Import already started — Once import_at is 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.
{
  "code": 422,
  "messages": ["Unprocessable: Please check the request parameters with the API docs https://developers.chameleon.io"]
}
Common scenarios:
  • 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, or email.
  • Invalid filter expression — A segmentation filter has incorrect syntax or unsupported operators.
  • Import property mismatch — CSV column headers don’t match the specified properties mapping.
  • Invalid enum value — A parameter like kind or model_kind has an unrecognized value.

Status Code 429 — Rate Limited

You’ve exceeded the rate limit for concurrent or bucketed requests.
X-Ratelimit-Wait: 114
X-Ratelimit-Limit: 2
{
  "code": 429,
  "messages": ["Rate Limited: Please refer to the API docs https://developers.chameleon.io/concepts/rate-limiting for more information"],
  "wait": 14
}
Troubleshooting:
  • Check the wait field in the response body — this tells you how many seconds to wait before retrying.
  • Check the X-Ratelimit-Wait header 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.
{
  "code": 500,
  "messages": ["Internal server error: Please retry later"]
}
Troubleshooting:
  • 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.
{
  "code": 503,
  "messages": []
}
Troubleshooting:
  • 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.
{
  "code": 504,
  "messages": ["Internal timeout: An internal operation took too long."]
}
Troubleshooting:
  • 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 limit values.