Optimizely Optimizely Edge Decider API

The Optimizely Edge Decider API from Optimizely — 1 operation(s) for optimizely edge decider.

Operations 1

GET /{accountId}/{projectId} Get a microsnippet response

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-optimizely-edge-decider-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-optimizely-edge-decider-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  description: '# Edge Worker API

    Defines the schema to interact with the Optimizely Edge Decider.

    ## Usage

    Note the use of __first-party__ script in order to enable domain cookies; you will have to set up a route to forward the request on to https://optimizely-edge.com/edge-client/v1 with required headers/page URLs.

    `<script src="/optimizely-edge/your-project-id.js"></script>`

    '
  version: 0.1.0
  title: Optimizely Edge Decider API
  contact:
    email: webdelivery@optimizely.com
servers:
- url: https://optimizely-edge.com/edge-client/v1
tags:
- name: Optimizely Edge Decider
paths:
  /{accountId}/{projectId}:
    get:
      summary: Get a microsnippet response
      description: 'Call the Edge Decider API to fetch a microsnippet.  Given the required arguments, the Edge Decider will bucket visitors into variations of active experiments they''re qualified for and return the JavaScript microsnippet.  The microsnippet is executed by the browser to apply the variations'' changes.


        Note that for security, the Edge Decider API only supports connections made over HTTPS. It does not support connections made over insecure HTTP and responds with a 403 status instead.

        '
      parameters:
      - name: accountId
        in: path
        description: Optimizely Account ID
        required: true
        schema:
          type: string
      - name: projectId
        in: path
        required: true
        description: Project ID of the Performance Edge project.
        schema:
          type: string
      - name: extend_cookie_lifetime
        in: query
        description: 'Whether or not the snippet should extend cookies. Defaults to true.


          Only has an effect on cookies which are already set, according to the Cookie header value. If it has not been set before, the cookie is set regardless of this parameter value.


          Currently, this only affects the "OptimizelyEndUserId" cookie.

          '
        schema:
          type: string
          enum:
          - 'false'
      - name: url
        in: query
        description: 'Document URL requested, which is used to determine the active pages(s)/experiment(s)


          Needs to be passed encoded.

          '
        schema:
          type: string
      - name: Cookie
        in: header
        required: true
        description: 'Cookies set on the requested domain. For cookie targeting, userId derivation, bucketing. Include any cookies that your users may want to use to define visitor audiences.


          At a minimum, must include the value of the optimizelyEndUserId cookie, if set. If unset, the JavaScript response will instruct the browser to set that cookie on the user’s device.


          **NOTE** Please review our [guidance on usage of PII](https://help.optimizely.com/Account_Settings/PII%3A_Personally_identifiable_information_in_Optimizely) with Optimizely Products.

          '
        schema:
          type: string
      - name: Referer
        in: header
        required: true
        description: 'Document URL requested, which is used to determine the active pages(s)/experiment(s), if the “url” query parameter is not specified.


          In typical implementations, the Referer header in the script request will equal the URL of the page on which the script was loaded.

          '
        schema:
          type: string
      - name: User-Agent
        in: header
        required: true
        description: 'User Agent used to make the request. Optimizely Edge will only serve the JavaScript response to browsers that are detected as having support for it, using this value. Also used for browser, device, platform targeting ([Reference](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent))

          '
        schema:
          type: string
      - name: X-Forwarded-For
        in: header
        required: true
        description: 'A comma-separated list of IP addresses, the first of which will be used as the basis for IP Address and Location experiment targeting. ([Reference](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For))

          '
        schema:
          type: string
      responses:
        '200':
          description: Successful response supplies JavaScript code for microsnippet
        '403':
          description: Request made not using HTTPS
        '405':
          description: Invalid input
      tags:
      - Optimizely Edge Decider
externalDocs:
  description: Find out more about Edge Experiments
  url: http://link.optimizely.com/edge
x-readme:
  explorer-enabled: true
  proxy-enabled: true