Optimizely Features API

Manage features with variables used in feature flag configurations.

Operations 5

GET /features List features #
POST /features Create a Feature #
GET /features/{feature_id} Get a feature #
DELETE /features/{feature_id} Archive a Feature #
PATCH /features/{feature_id} Update a Feature #

Documentation

Specifications

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/optimizely-features-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

optimizely-features-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Optimizely Features API
  version: '2.0'
  description: 'Operations tagged Features across 2 of this provider''s published API definitions: optimizely-feature-experimentation-openapi.yml, optimizely-web-experimentation-optimizely-api-openapi.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.optimizely.com/v2
  description: Optimizely REST API v2 Management Server
- url: https://api.optimizely.com/flags/v1
  description: Optimizely Flags API v1 Server
tags:
- name: Features
  description: Manage features with variables used in feature flag configurations.
paths:
  /features:
    get:
      operationId: listFeatures
      summary: List features
      description: Returns a list of features for the specified project. Features define variables that can be remotely configured through flags.
      tags:
      - Features
      parameters:
      - $ref: '#/components/parameters/projectIdQuery'
      - $ref: '#/components/parameters/perPage'
      - $ref: '#/components/parameters/page'
      responses:
        '200':
          description: Successfully retrieved the list of features
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Feature'
        '401':
          description: Authentication credentials are missing or invalid
      security:
      - bearerAuth: []
    post:
      description: Create a Feature
      operationId: create_feature
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Feature_2'
        description: 'A string in JSON format that includes all the fields to create a new Feature. Note this endpoint is incompatible with Full Stack Targeted Rollouts projects

          (default in accounts created after July 2020) and with non-legacy Full Stack projects (default in projects created after February 2021).

          See the compatible API at https://library.optimizely.com/docs/api/flags/v1/index.html#tag/Flags.

          '
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Feature_2'
          description: Successfully created the Feature
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Invalid request body content
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Invalid credentials
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Unexpected error
      summary: Create a Feature
      tags:
      - Features
      security:
      - bearerAuth: []
    servers:
    - url: https://api.optimizely.com/v2
      description: Optimizely REST API v2 Management Server
    - url: https://api.optimizely.com/flags/v1
      description: Optimizely Flags API v1 Server
  /features/{feature_id}:
    get:
      operationId: getFeature
      summary: Get a feature
      description: Retrieves the details of a specific feature.
      tags:
      - Features
      parameters:
      - $ref: '#/components/parameters/featureId'
      responses:
        '200':
          description: Successfully retrieved the feature
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Feature'
        '401':
          description: Authentication credentials are missing or invalid
        '404':
          description: Feature not found
      security:
      - bearerAuth: []
    delete:
      description: Archive a Feature
      operationId: delete_feature
      parameters:
      - description: The ID of the Feature you'd like to archive
        in: path
        name: feature_id
        required: true
        schema:
          format: int64
          type: integer
      responses:
        '204':
          description: Successfully archived the Feature
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Invalid credentials
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: You do not have permission to archive this Feature
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Invalid Feature ID supplied
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Unexpected error
      summary: Archive a Feature
      tags:
      - Features
      security:
      - bearerAuth: []
    patch:
      description: Update a feature by ID.
      operationId: update_feature
      parameters:
      - description: The unique identifier for the Feature
        in: path
        name: feature_id
        required: true
        schema:
          format: int64
          type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FeatureUpdate'
        description: A string in JSON format that includes all the fields you'd like to change for a Feature
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Feature_2'
          description: Successfully updated the Feature
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Invalid request body content
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Invalid credentials
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: You do not have permission to update specified Feature
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Feature not found
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Unexpected error
      summary: Update a Feature
      tags:
      - Features
      security:
      - bearerAuth: []
    servers:
    - url: https://api.optimizely.com/v2
      description: Optimizely REST API v2 Management Server
    - url: https://api.optimizely.com/flags/v1
      description: Optimizely Flags API v1 Server
components:
  schemas:
    Feature:
      type: object
      description: A feature with configurable variables
      properties:
        id:
          type: integer
          format: int64
          description: Unique identifier for the feature
        key:
          type: string
          description: Unique key for the feature
        project_id:
          type: integer
          format: int64
          description: The project this feature belongs to
        variables:
          type: array
          description: List of variables associated with this feature
          items:
            $ref: '#/components/schemas/Variable'
        created:
          type: string
          format: date-time
          description: Timestamp when the feature was created
        last_modified:
          type: string
          format: date-time
          description: Timestamp when the feature was last modified
    Variable:
      type: object
      description: A variable within a feature flag
      properties:
        key:
          type: string
          description: Unique key for the variable
        type:
          type: string
          description: Data type of the variable
          enum:
          - string
          - integer
          - double
          - boolean
          - json
        default_value:
          type: string
          description: Default value of the variable
    FeatureVariableUpdate:
      properties:
        archived:
          default: false
          description: Whether or not this Feature Variable is archived
          type: boolean
        default_value:
          description: The stringified default value for this Feature Variable. The default value is the value Optimizely SDKs will return when this Feature Variable is accessed by getFeatureVariableValue unless the Feature Variable's value is a part of a feature test variation.
          example: '0.05'
          type: string
        description:
          description: A short description of this Feature Variable
          type: string
        id:
          description: The ID of this Feature Variable
          format: int64
          type: integer
        key:
          description: Unique string identifier for this Feature Variable within the Feature
          type: string
        type:
          description: The datatype for this Feature Variable
          enum:
          - boolean
          - string
          - double
          - integer
          - json
          type: string
      type: object
    Error:
      properties:
        code:
          type: string
        message:
          type: string
        messages:
          type: object
        uuid:
          format: uuid
          type: string
      type: object
    Feature_2:
      properties:
        archived:
          default: false
          description: Whether the Feature has been archived
          type: boolean
        created:
          description: Time when the Feature was created
          format: date-time
          readOnly: true
          type: string
        description:
          description: A short description of this Feature
          type: string
        environments:
          additionalProperties:
            $ref: '#/components/schemas/FeatureEnvironment'
          description: The configuration for this Feature's Rollout within each Environment, keyed by Environment key
          type: object
          x-map-key:
            description: The key of the Environment
            example: production
            type: string
        id:
          description: The ID of this Feature
          format: int64
          readOnly: true
          type: integer
        key:
          description: Unique string identifier for this Feature within the Project
          example: new_checkout_page
          maxLength: 64
          pattern: ^[a-zA-Z0-9_\-]+$
          type: string
        last_modified:
          description: Date last modified
          format: date-time
          readOnly: true
          type: string
        name:
          description: Name of the Feature
          example: the checkout feature
          type: string
        project_id:
          description: The ID of the Project this Feature belongs to
          format: int64
          type: integer
        variables:
          description: Variables define the dynamic configuration of a feature, and each variable can take on a different value on a per-variation basis within a feature test.
          items:
            $ref: '#/components/schemas/FeatureVariable'
          type: array
      required:
      - key
      - project_id
      type: object
    RolloutRule:
      properties:
        audience_conditions:
          description: 'The audiences that should see this feature. To target everyone, use the string "everyone". Multiple audiences can be combined with "and" or "or" using the same structure as audience conditions. <code>audience_conditions</code> sent in any environment must always match those of the primary environment.

            '
          example: '["and", {"audience_id": 7000}, {"audience_id": 7001}]'
          externalDocs:
            description: same structure as audience conditions
            url: https://developers.optimizely.com/x/rest/guides/conditions/
          type: string
        enabled:
          default: false
          description: Whether or not the Rollout Rule is applied in this Environment. You can toggle this on and off by sending True or False.
          type: boolean
        percentage_included:
          default: 0
          description: The percentage of the designated audiences that should get this Feature, measured in basis points. 100 basis points = 1% traffic.
          maximum: 10000
          minimum: 0
          type: integer
        variable_values:
          additionalProperties:
            type: string
          description: The configuration for this Variable's within each Feature Environment, keyed by Variable Key
          type: object
          x-map-key:
            description: The Key of the variable
            example: my_var
            type: string
      type: object
    FeatureVariable:
      properties:
        archived:
          default: false
          description: Whether or not this Feature Variable is archived
          type: boolean
        default_value:
          description: The stringified default value for this Feature Variable. The default value is the value Optimizely SDKs will return when this Feature Variable is accessed by getFeatureVariableValue unless the Feature Variable's value is a part of a feature test variation.
          example: '0.05'
          type: string
        id:
          description: The ID of this Feature Variable
          format: int64
          readOnly: true
          type: integer
        key:
          description: Unique string identifier for this Feature Variable within the Feature
          type: string
        type:
          description: The datatype for this Feature Variable
          enum:
          - boolean
          - string
          - double
          - integer
          - json
          example: double
          type: string
      required:
      - key
      - type
      - default_value
      type: object
    FeatureEnvironment:
      properties:
        id:
          description: The ID of the Environment this set of Rollout Rules applies to
          format: int64
          readOnly: true
          type: integer
        is_primary:
          description: Whether the Environment this set of Rollout Rules applies to is the primary Environment
          readOnly: true
          type: boolean
        rollout_rules:
          description: Rollout Rules allow you to define groups of users and a percentage of those users that will see a Feature by default. You are currently limited to a single rollout rule. Audience IDs sent in any environment must always match that of the primary environment.
          items:
            $ref: '#/components/schemas/RolloutRule'
          type: array
      required:
      - rollout_rules
      type: object
    FeatureUpdate:
      properties:
        archived:
          description: Whether the Feature has been archived
          type: boolean
        description:
          description: A short description of this Feature
          type: string
        environments:
          additionalProperties:
            $ref: '#/components/schemas/FeatureEnvironment'
          description: The configuration for this Feature's Rollout within each Environment, keyed by Environment key.
          type: object
          x-map-key:
            description: The key of the Environment
            example: production
            type: string
        key:
          description: Unique string identifier for this Feature within the Project
          example: new_checkout_page
          maxLength: 64
          pattern: ^[a-zA-Z0-9_\-]+$
          type: string
        name:
          description: Name of the Feature
          example: the checkout feature
          type: string
        variables:
          description: Variables define the dynamic configuration of a feature, and each variable can take on a different value on a per-variation basis within a feature test.
          items:
            $ref: '#/components/schemas/FeatureVariableUpdate'
          type: array
      type: object
  parameters:
    projectIdQuery:
      name: project_id
      in: query
      required: true
      description: The unique identifier for the project to filter by
      schema:
        type: integer
        format: int64
    featureId:
      name: feature_id
      in: path
      required: true
      description: The unique identifier for the feature
      schema:
        type: integer
        format: int64
    page:
      name: page
      in: query
      required: false
      description: Page number for pagination
      schema:
        type: integer
        default: 1
        minimum: 1
    perPage:
      name: per_page
      in: query
      required: false
      description: Number of results per page
      schema:
        type: integer
        default: 25
        minimum: 1
        maximum: 100
    page_2:
      description: 'Optional pagination argument that specifies the page to return. If you have 140 objects and you choose to return 100 objects per page you will be able to access the last 40 objects on page 2. The default value is 1.

        '
      in: query
      name: page
      required: false
      schema:
        default: 1
        type: integer
    per_page:
      description: Optional pagination argument that specifies the maximum number of objects to return per request
      in: query
      name: per_page
      required: false
      schema:
        default: 25
        maximum: 100
        type: integer
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: OAuth 2.0 Bearer token or personal access token for authentication.
    OAuth2:
      description: Write applications that authenticate with the REST API via OAuth 2.0. Or, to authenticate using a personal token, see https://docs.developers.optimizely.com/web/docs/personal-token
      flows:
        authorizationCode:
          authorizationUrl: https://app.optimizely.com/oauth2/authorize
          scopes:
            all: Full access to your account
          tokenUrl: https://app.optimizely.com/oauth2/token
      type: oauth2
    apiKey:
      scheme: bearer
      type: http
externalDocs:
  description: Optimizely Feature Experimentation API Documentation
  url: https://docs.developers.optimizely.com/feature-experimentation/reference/feature-experimentation-api-overview
x-refined-from:
- optimizely-feature-experimentation-openapi.yml
- optimizely-web-experimentation-optimizely-api-openapi.json