For information on how to migrate from Optimizely Classic to Optimizely X, see the REST API migration guide.

You can use the v2 REST API to access resources in your Optimizely X projects. This API closely mirrors the functionality of the Optimizely UI; its endpoints have predictable, resource-oriented URLs.

Support for Optimizely Classic: You can use the v2 API to read data from Optimizely Classic. However, to write data to Optimizely Classic, you must use the v1 API.

The v2 API endpoints are defined using the OpenAPI Specification. This practice has several benefits:

  • It enables us to generate and update the following API reference documentation.
  • It also enables you to create API clients in any programming language using the Swagger Generator.
  • You can use any off-the-shelf HTTP client to compose and send requests directly to the API.

The API returns JSON in the body of responses.

The preferred method of authenticating with the API is using OAuth 2.0. However, to make our API easily explorable, we have implemented Personal tokens. Personal tokens have replaced the tokens used by our v1 API.

If there is no value set for a field (the value is undefined), the field will not appear in the JSON response.

The following list shows, at a glance, which platforms each API supports.

The following list shows, at a glance, which platforms each API supports.

Here are some important API conventions:

If you have any questions, you can ask the developer community, or you can submit a ticket to the developer support team. We'll be happy to assist you.


Looking for endpoints for DCP (Dynamic Customer Profiles)?

Use the v1 REST API to configure DCP Services, Tables (datasources), and attributes. You can also read and write customer profiles, or get and create aliases using the v1 REST API.

Currently, all DCP REST APIs make use of only classic tokens for authorization. They do not accept personal-tokens to authorize api requests.

Don't worry! Even though they are configured with v1 REST APIs, any DCP services, datasource, attributes and profiles will still be accessible in Optimizely X.