NAV Navbar
  • Overview of the Kameleoon APIs
  • Overview of the Kameleoon APIs


    The Kameleoon platform provides several APIs that our customers can use for various purposes. For instance, the APIs allow to write front-end A/B experiments without any flickering, better integration within your digital ecosystem (pulling data from Kameleoon as well as sending data to Kameleoon), or to automate certain tasks. It's very important for us to provide your technical teams with advanced, fully documented APIs so that you can use the Kameleoon platform to its most complete extent. Customizing and tweaking our software is also totally possible thanks to those APIs.

    We regrouped our various APIs into three main groups: the Activation API (JavaScript API), the Automation API (REST API), and the Data API (REST API). The goal of this article is to provide a very high-level overview of those three APIs, so that a developer tasked with can quickly identify which API is needed and refer to its documentation. It also serves as a good basis to demonstrate the openness of our platform, its technical features and expansion / connectivity points.

    The Activation API

    The Activation API is a JavaScript API provided by the Kameleoon application file installed on your website. You can call the methods of this API directly via JavaScript code. You can also read useful information from a variety of data structures available via this API. For instance, we provide geolocation and weather data of the current visitor, as well as the KCS (Kameleoon Conversion Score), our real-time, customer-centric, machine-learning computed score (note that the KCS is only available if you activated our A.I. Personalization module).

    This API serves several goals:

    In short, refer to this API when you want to implement experiments or personalizations, track data using Kameleoon, retrieve Kameleoon-gathered data for your own use, interact with your product catalog, or customize / extend any aspect of Kameleoon performed on the front-end / browser.

    Note that as this API is fully JavaScript based, there is no need to worry about the scalability of its usage. Almost all methods (except a few ones transparently requiring a server call to be performed underneath, notably those dealing with the product catalog) return immediately and perform their action synchronously. No authentication is required for this API, and basic browser architecture / security ensures that a visitor can only access its own data (stored in the Local Storage), not the data of other visitors.

    The Activation API is fully documented here. There is also a separate article for custom JavaScript Kameleoon Events.

    The Automation API

    The Automation API is a REST API that allows almost every action that is possible via our standard (web-based) user interfaces to be also triggered and performed programmatically. This means that you can write your own software / code interacting with our platform, harnessing all of its features and capabilities. As an example, some of our customers took advantage of this API to implement bridges between Kameleoon and their own Git repositories, so that Kameleoon variations code can be managed directly on their usual version control system. You could also design your own dashboard and fill it with experiment results directly obtained from Kameleoon. Building custom systems operating or interfacing with Kameleoon is easy thanks to this API.

    This API is a REST compliant API, so you can call it with any REST capable framework in any language (Java, C#, NodeJS, Python, etc). We conform to REST conventions and any developer familiar with those should feel at ease here. However, this API is not intended to be used extensively. By this we mean it's intended to be called a dozen of times per minute and per customer / user account on our systems. It's not scalable to millions of calls per minute, so should not be called for every visitor on your website (if you need this, see the Data API instead for more information).

    Note that authentication is currently performed via a basic API key / password association. We have plans to move to the OAuth standard in the future.

    The Automation API is fully documented here.

    The Data API

    The Data API is a REST API that allows to retrieve or write data stored on remote servers, not locally on the visitor's browser. So contrary to the Activation API where data is available directly and instantly on the browser side, this API is intended for communication with external data sources / remote servers / DMPs. It is however scalable to millions of calls per minute (unlike the Automation API), so calling this API for every visitor is perfectly possible.

    For instance, this API is used for Cross-Device History Reconciliation, a powerful Kameleoon feature that allows the complete history of actions for a given Unique Visitor to be synchronized automatically accross all its devices. If one of your visitor goes twice to your website using his smartphone, then comes again later on his desktop computer, we'll correctly report this as his third visit in the Activation API data layer. Underneath, a call to our Data API was actually made to ensure the synchronization of data via our servers.

    Another good example of usage would be to register "late transactions" which cannot be sent directly on the web-platform via the usual Activation API. If your business sells travel packages, and the final transaction / confirmation is not achieved on your website, but later in a physical place by a person, you can use this API to register those transactions, which would be impossible with a web / JS based API.

    The Data API is a REST compliant API, so you can call it with any REST capable framework in any language (Java, C#, NodeJS, Python, etc). We conform to REST conventions and any developer familiar with those should feel at ease here.

    The Data API is not yet documented. We expect the documentation to be ready for the end of 2019.