Optimizely Pages API

Manage page definitions that specify which URLs or conditions trigger experiments.

Operations 15

GET /api/v1/admin/Pages Returns the EntitySet Pages #
POST /api/v1/admin/Pages Post a new entity to EntitySet Pages #
GET /api/v1/admin/Pages({id}) Returns the entity with the key from Pages #
PUT /api/v1/admin/Pages({id}) Replace entity in EntitySet Pages #
DELETE /api/v1/admin/Pages({id}) Delete entity in EntitySet Pages #
PATCH /api/v1/admin/Pages({id}) Update entity in EntitySet Pages #
GET /api/v1/admin/Pages/Default.Default() Call operation Default #
DELETE /api/v1/admin/pages/delete #
GET /api/v1/admin/pages({key})/customproperties({custompropertyKey}) #
GET /api/v1/admin/pages({key})/pageversions({pageversionKey}) #
GET /pages List pages #
POST /pages Create a page #
GET /pages/{page_id} Get a page #
PATCH /pages/{page_id} Update a page #
DELETE /pages/{page_id} Delete a page #

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-pages-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-pages-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Optimizely Pages API
  version: '1.0'
  description: 'Operations tagged Pages across 3 of this provider''s published API definitions: optimizely-configured-commerce-admin-api-v1-openapi.json, optimizely-web-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://dogfood.commerce.insitesandbox.com
- url: https://api.optimizely.com/v2
  description: Optimizely REST API v2 Production Server
tags:
- name: Pages
paths:
  /api/v1/admin/Pages:
    get:
      tags:
      - Pages
      summary: Returns the EntitySet Pages
      operationId: Pages_Get
      parameters:
      - name: $expand
        in: query
        description: Expands related entities inline.
        required: false
        schema:
          type: string
      - name: $filter
        in: query
        description: Filters the results, based on a Boolean condition.
        required: false
        schema:
          type: string
      - name: $select
        in: query
        description: Selects which properties to include in the response.
        required: false
        schema:
          type: string
      - name: $apply
        in: query
        description: Aggregates the results according to one or more transformations.
        required: false
        schema:
          type: string
      - name: $orderby
        in: query
        description: Sorts the results.
        required: false
        schema:
          type: string
      - name: $top
        in: query
        description: Returns only the first n results.
        required: false
        schema:
          type: integer
          format: int32
      - name: $skip
        in: query
        description: Skips the first n results.
        required: false
        schema:
          type: integer
          format: int32
      - name: $count
        in: query
        description: Includes a count of the matching results in the response.
        required: false
        schema:
          type: boolean
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: object
      deprecated: false
      security:
      - access_token: []
    post:
      tags:
      - Pages
      summary: Post a new entity to EntitySet Pages
      operationId: Pages_Post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Insite.Data.Entities.Page'
        description: The entity to post
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: object
      deprecated: false
      security:
      - access_token: []
    servers:
    - url: https://dogfood.commerce.insitesandbox.com
  /api/v1/admin/Pages({id}):
    get:
      tags:
      - Pages
      summary: Returns the entity with the key from Pages
      operationId: Pages_GetById
      parameters:
      - name: id
        in: path
        description: 'key: id'
        required: true
        schema:
          type: string
          format: uuid
      - name: $expand
        in: query
        description: Expands related entities inline.
        required: false
        schema:
          type: string
      - name: $select
        in: query
        description: Selects which properties to include in the response.
        required: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: object
      deprecated: false
      security:
      - access_token: []
    put:
      tags:
      - Pages
      summary: Replace entity in EntitySet Pages
      operationId: Pages_PutById
      parameters:
      - name: id
        in: path
        description: 'key: id'
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Insite.Data.Entities.Page'
        description: The entity to put
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: object
      deprecated: false
      security:
      - access_token: []
    delete:
      tags:
      - Pages
      summary: Delete entity in EntitySet Pages
      operationId: Pages_DeleteById
      parameters:
      - name: id
        in: path
        description: 'key: id'
        required: true
        schema:
          type: string
          format: uuid
      - name: If-Match
        in: header
        description: If-Match header
        required: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: object
      deprecated: false
      security:
      - access_token: []
    patch:
      tags:
      - Pages
      summary: Update entity in EntitySet Pages
      operationId: Pages_PatchById
      parameters:
      - name: id
        in: path
        description: 'key: id'
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Insite.Data.Entities.Page'
        description: The entity to patch
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: object
      deprecated: false
      security:
      - access_token: []
    servers:
    - url: https://dogfood.commerce.insitesandbox.com
  /api/v1/admin/Pages/Default.Default():
    get:
      tags:
      - Pages
      summary: Call operation  Default
      operationId: Pages_Default
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: object
      deprecated: false
      security:
      - access_token: []
    servers:
    - url: https://dogfood.commerce.insitesandbox.com
  /api/v1/admin/pages/delete:
    delete:
      tags:
      - Pages
      operationId: Pages_DeleteRoute
      parameters:
      - name: ids
        in: query
        required: true
        explode: true
        schema:
          type: array
          items:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: object
      deprecated: false
      security:
      - access_token: []
    servers:
    - url: https://dogfood.commerce.insitesandbox.com
  /api/v1/admin/pages({key})/customproperties({custompropertyKey}):
    get:
      tags:
      - Pages
      operationId: Pages_GetCustomPropertyByKeyAndCustompropertykey
      parameters:
      - name: key
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: custompropertyKey
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: $expand
        in: query
        description: Expands related entities inline.
        required: false
        schema:
          type: string
      - name: $select
        in: query
        description: Selects which properties to include in the response.
        required: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: object
      deprecated: false
      security:
      - access_token: []
    servers:
    - url: https://dogfood.commerce.insitesandbox.com
  /api/v1/admin/pages({key})/pageversions({pageversionKey}):
    get:
      tags:
      - Pages
      operationId: Pages_GetPageVersionByKeyAndPageversionkey
      parameters:
      - name: key
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: pageversionKey
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: $expand
        in: query
        description: Expands related entities inline.
        required: false
        schema:
          type: string
      - name: $select
        in: query
        description: Selects which properties to include in the response.
        required: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: object
      deprecated: false
      security:
      - access_token: []
    servers:
    - url: https://dogfood.commerce.insitesandbox.com
  /pages:
    get:
      operationId: listPages
      summary: List pages
      description: Returns a list of pages for the specified project. Pages define URL targeting conditions for experiments.
      tags:
      - Pages
      parameters:
      - $ref: '#/components/parameters/projectIdQuery'
      - $ref: '#/components/parameters/perPage'
      - $ref: '#/components/parameters/page'
      responses:
        '200':
          description: Successfully retrieved the list of pages
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Page'
        '401':
          description: Authentication credentials are missing or invalid
      security:
      - bearerAuth: []
    post:
      operationId: createPage
      summary: Create a page
      description: Creates a new page definition within the specified project.
      tags:
      - Pages
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PageInput'
      responses:
        '201':
          description: Page successfully created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Page'
        '400':
          description: Invalid request body
        '401':
          description: Authentication credentials are missing or invalid
      security:
      - bearerAuth: []
    servers:
    - url: https://api.optimizely.com/v2
      description: Optimizely REST API v2 Production Server
  /pages/{page_id}:
    get:
      operationId: getPage
      summary: Get a page
      description: Retrieves the full details of a specific page by its identifier.
      tags:
      - Pages
      parameters:
      - $ref: '#/components/parameters/pageId'
      responses:
        '200':
          description: Successfully retrieved the page
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Page'
        '401':
          description: Authentication credentials are missing or invalid
        '404':
          description: Page not found
      security:
      - bearerAuth: []
    patch:
      operationId: updatePage
      summary: Update a page
      description: Updates the specified page with the provided fields.
      tags:
      - Pages
      parameters:
      - $ref: '#/components/parameters/pageId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PageInput'
      responses:
        '200':
          description: Page successfully updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Page'
        '400':
          description: Invalid request body
        '401':
          description: Authentication credentials are missing or invalid
        '404':
          description: Page not found
      security:
      - bearerAuth: []
    delete:
      operationId: deletePage
      summary: Delete a page
      description: Permanently deletes the specified page.
      tags:
      - Pages
      parameters:
      - $ref: '#/components/parameters/pageId'
      responses:
        '204':
          description: Page successfully deleted
        '401':
          description: Authentication credentials are missing or invalid
        '404':
          description: Page not found
      security:
      - bearerAuth: []
    servers:
    - url: https://api.optimizely.com/v2
      description: Optimizely REST API v2 Production Server
components:
  schemas:
    Insite.Data.Entities.Page:
      required:
      - variantName
      - allowedForPageType
      type: object
      properties:
        id:
          format: uuid
          type: string
          example: 00000000-0000-0000-0000-000000000000
        nodeId:
          format: uuid
          type: string
          example: 00000000-0000-0000-0000-000000000000
        ruleManagerId:
          format: uuid
          type: string
          example: 00000000-0000-0000-0000-000000000000
        isDefaultVariant:
          type: boolean
        variantName:
          maxLength: 50
          minLength: 0
          type: string
        isShared:
          type: boolean
        layoutPageId:
          format: uuid
          type: string
          example: 00000000-0000-0000-0000-000000000000
        allowedForPageType:
          maxLength: 50
          minLength: 0
          type: string
        templateHash:
          type: string
        createdOn:
          format: date-time
          type: string
        createdBy:
          type: string
        modifiedOn:
          format: date-time
          type: string
        modifiedBy:
          type: string
    PageInput:
      type: object
      description: Input for creating or updating a page
      properties:
        project_id:
          type: integer
          format: int64
          description: The project this page belongs to
        name:
          type: string
          description: Human-readable name of the page
        edit_url:
          type: string
          format: uri
          description: URL used in the visual editor for this page
        conditions:
          type: string
          description: JSON-encoded URL targeting conditions
        activation_type:
          type: string
          description: How the page is activated
          enum:
          - immediate
          - polling
          - callback
          - manual
          - dom_changed
          - url_changed
    Page:
      type: object
      description: A page definition that specifies URL targeting conditions
      properties:
        id:
          type: integer
          format: int64
          description: Unique identifier for the page
        project_id:
          type: integer
          format: int64
          description: The project this page belongs to
        name:
          type: string
          description: Human-readable name of the page
        edit_url:
          type: string
          format: uri
          description: URL used in the visual editor for this page
        conditions:
          type: string
          description: JSON-encoded URL targeting conditions
        activation_type:
          type: string
          description: How the page is activated
          enum:
          - immediate
          - polling
          - callback
          - manual
          - dom_changed
          - url_changed
        created:
          type: string
          format: date-time
          description: Timestamp when the page was created
        last_modified:
          type: string
          format: date-time
          description: Timestamp when the page was last modified
    Error:
      properties:
        code:
          type: string
        message:
          type: string
        messages:
          type: object
        uuid:
          format: uuid
          type: string
      type: object
    Page_2:
      properties:
        activation_code:
          description: Stringified Javascript function that determines when the Page is activated. Only required when activation_type is 'polling' or 'callback'.
          example: function callbackFn(activate, options) { activate(); }
          type: string
        activation_type:
          description: 'Page activation type is a trigger that determines when the page is activated. Triggers tell Optimizely when to start checking whether certain conditions are true

            ''Immediate'' activation mode activates the page as soon as the snippet loads.

            ''Polling'' activation mode polls every 50ms until ''activation_code'' evaluates to True, then activates the page.

            ''Callback'' activation mode activates the page when the event defined by ''activation_code'' is triggered.

            ''Manual'' activation mode requires code within the subject app to explicitly trigger page activation.

            ''DOM Changed'' sets the page to trigger when the DOM changes [Learn more](https://help.optimizely.com/Build_Campaigns_and_Experiments/Support_for_dynamic_websites%3A_Use_Optimizely_on_single_page_applications#Triggers).

            ''URL Changed'' sets the page to trigger when the URL changes [Learn more](https://help.optimizely.com/Build_Campaigns_and_Experiments/Support_for_dynamic_websites%3A_Use_Optimizely_on_single_page_applications#Triggers).

            '
          enum:
          - immediate
          - manual
          - polling
          - callback
          - dom_changed
          - url_changed
          example: callback
          externalDocs:
            description: Activation Types
            url: https://help.optimizely.com/Build_Campaigns_and_Experiments/Conditional_activation_for_pages_in_Optimizely_X
          type: string
        archived:
          default: false
          description: Whether the Page has been archived
          type: boolean
        category:
          default: other
          description: The category this Page is grouped under
          enum:
          - article
          - cart
          - category
          - checkout
          - home
          - landing_page
          - pricing
          - product_detail
          - search_results
          - other
          type: string
        conditions:
          description: 'Stringified array of the conditions that activate the Page. The array contains Page Condition JSON dicts joined by "and" and "or".

            Each individual Page Condition dict has format {"type": "url", "match_type": <match_type>, "value": <value>} where match_types are:

            "simple" match type will match if "value" matches the hostname and path of the Page URL.

            "exact" match type will match only an exact string match between "value" and the Page URL.

            "substring" match type will match if "value" is a substring of the Page URL.

            "regex" match type will match if "value" is a regular expression match for the Page URL.

            '
          example: '["and", {"type": "url", "match_type": "substring", "value": "optimize"}]'
          externalDocs:
            description: Conditions
            url: https://help.optimizely.com/Build_Experiments/Set_up_pages%2C_events%2C_tags%2C_and_audiences#add_pages
          type: string
        created:
          description: Date created
          format: date-time
          readOnly: true
          type: string
        edit_url:
          description: URL of the Page
          example: https://www.optimizely.com
          type: string
        id:
          description: The unique identifier of the Page
          example: 4000
          format: int64
          readOnly: true
          type: integer
        key:
          description: Unique string identifier for this Page within the Project
          example: home_page
          maxLength: 500
          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 Page
          example: Home Page
          type: string
        page_type:
          description: Type of Page
          enum:
          - single_url
          - url_set
          - global
          type: string
        project_id:
          description: ID of the Page's Project
          example: 1000
          format: int64
          type: integer
        single_use:
          description: Whether the Page is a single-use page created for URL targeting
          readOnly: true
          type: boolean
      required:
      - name
      - project_id
      - edit_url
      type: object
    PageUpdate:
      properties:
        activation_code:
          description: Stringified Javascript function that determines when the Page is activated. Only required when activation_type is 'polling' or 'callback'.
          type: string
        activation_type:
          description: 'Page activation type is a trigger that determines when the page is activated. Triggers tell Optimizely when to start checking whether certain conditions are true

            ''Immediate'' activation mode activates the page as soon as the snippet loads.

            ''Polling'' activation mode polls every 50ms until ''activation_code'' evaluates to True, then activates the page.

            ''Callback'' activation mode activates the page when the event defined by ''activation_code'' is triggered.

            ''Manual'' activation mode requires code within the subject app to explicitly trigger page activation.

            ''DOM Changed'' sets the page to trigger when the DOM changes [Learn more](https://help.optimizely.com/Build_Campaigns_and_Experiments/Support_for_dynamic_websites%3A_Use_Optimizely_on_single_page_applications#Triggers).

            ''URL Changed'' sets the page to trigger when the URL changes [Learn more](https://help.optimizely.com/Build_Campaigns_and_Experiments/Support_for_dynamic_websites%3A_Use_Optimizely_on_single_page_applications#Triggers).

            '
          enum:
          - immediate
          - manual
          - polling
          - callback
          - dom_changed
          - url_changed
          externalDocs:
            description: Activation Types
            url: https://help.optimizely.com/Build_Campaigns_and_Experiments/Conditional_activation_for_pages_in_Optimizely_X
          type: string
        archived:
          description: Whether the Page is archived
          type: boolean
        category:
          description: The category this Page is grouped under
          enum:
          - article
          - cart
          - category
          - checkout
          - home
          - landing_page
          - pricing
          - product_detail
          - search_results
          - other
          type: string
        conditions:
          description: 'Stringified array of the conditions that activate the Page. The array contains Page Condition JSON dicts joined by "and" and "or".

            Each individual Page Condition dict has format {"type": "url", "match_type": <match_type>, "value": <value>} where match_types are:

            "simple" match type will match if "value" matches the hostname and path of the Page URL.

            "exact" match type will match only an exact string match between "value" and the Page URL.

            "substring" match type will match if "value" is a substring of the Page URL.

            "regex" match type will match if "value" is a regular expression match for the Page URL.

            '
          example: '["and", {"type": "url", "match_type": "substring", "value": "optimize"}]'
          externalDocs:
            description: Conditions
            url: https://help.optimizely.com/Build_Experiments/Set_up_pages%2C_events%2C_tags%2C_and_audiences#add_pages
          type: string
        edit_url:
          description: URL of the Page
          type: string
        key:
          description: Unique string identifier for this Page within the Project
          example: home_page
          maxLength: 500
          pattern: ^[a-zA-Z0-9_]+$
          type: string
        name:
          description: Page Name
          example: Home Page
          type: string
        page_type:
          description: Type of Page
          enum:
          - single_url
          - url_set
          - global
          type: string
      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
    pageId:
      name: page_id
      in: path
      required: true
      description: The unique identifier for the page
      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:
    access_token:
      type: apiKey
      description: Token used to access storefront API.
      name: access_token
      in: query
    bearerAuth:
      type: http
      scheme: bearer
      description: OAuth 2.0 Bearer token or personal access token generated from the Optimizely application settings.
    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 Web Experimentation API Documentation
  url: https://docs.developers.optimizely.com/web-experimentation/docs/rest-api-introduction
x-refined-from:
- optimizely-configured-commerce-admin-api-v1-openapi.json
- optimizely-web-experimentation-openapi.yml
- optimizely-web-experimentation-optimizely-api-openapi.json