Chameleon's API allows you to accomplish a few key things:

  1. Send user properties -- chmln.identify - add or remove data attributes stored for users and companies. This data can then be used in targeting / segmenting users by who they are.
  2. Send events -- chmln.track - add an "action that a user took". Events are used in targeting / segmenting users by what they did.
  3. Listen to interval events -- chmln.on - register a callback to certain state changes and events, useful for custom integrations with Chameleon.
  4. Download tour data -- access the historical record of Chameleon tours that users interacted with.
  5. Download user data -- get information about which tours a particular user has engaged with
  6. Start a tour using JavaScript code, when the tour should begin repeatedly or due to some other custom criteria. 
  7. Permanently delete a user when you want to 'forget' a specific user that you previously identified to Chameleon. 
  8. Personalize style or content within tour steps, based on who the user (or user group) is.

Ideas for how the API be used

  • Send data about whether a user has completed a specific tour to your marketing automation tool, so you can send emails accordingly.
  • Download data about a tour's performance to your database so you can track this in your BI reporting tool.
  • Update user records in Chameleon when users take key actions in your product, in order to target them with relevant tours.
  • Update user records in Chameleon with data from other data sources that we don't yet integrate with, such as a Customer Support tool or NPS provider.
  • Start a tour when a user completes uploading some key data to their account, to congratulate them and show them next steps.
  • Change the branding of Chameleon tours based on the brand settings for any particular customer account. 

The Basics

Authentication

Send a header (X-Account-Secret) or parameter (account_secret) with your admin-specific secret token found here (click "Get your API key") when you are logged in.

curl -H 'X-Account-Secret: YOUR ACCOUNT SECRET' https://observe.trychameleon.com/..."


Responses
At a high level, all responses include the resource name in either singular or plural. Singular when object is an individual item (a hash) and plural when there are multiple items (an array).

{
  profile: {
    id: "599d8fb49fddce00042acd03",
   ...
  },
  tours: [
    {
      id: "59f76b53d9bbc60100000002"
      ...
    }
  ]
}

Errors

  • 403 - when the secret you're using does not resolve to a Chameleon account.
  • 404 - when a resource cannot be found. This can happen when requesting information on a profile that has not been added to the system yet.
  • 422 - when a resource is missing required information. This can happen when creating a profile and the request omitted the uid.
  • 500 - an unhandled error (Chameleon engineers will be alerted)
  • 503 - Application timeout.

Next: Dive into the specific docs

For specific API methods, read more here: 

Did this answer your question?