Optimizely Attributes API

Manage custom attributes used for audience targeting and segmentation.

Operations 5

GET /attributes List attributes #
POST /attributes Create an Attribute #
DELETE /attributes/{attribute_id} Archive an Attribute #
GET /attributes/{attribute_id} Read an Attribute #
PATCH /attributes/{attribute_id} Update an Attribute #

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-attributes-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-attributes-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Optimizely Attributes API
  version: '2.0'
  description: 'Operations tagged Attributes across 3 of this provider''s published API definitions: optimizely-feature-experimentation-openapi.yml, 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://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: Attributes
  description: Manage custom attributes used for audience targeting and segmentation.
paths:
  /attributes:
    get:
      operationId: listAttributes
      summary: List attributes
      description: Returns a list of custom attributes for the specified project.
      tags:
      - Attributes
      parameters:
      - $ref: '#/components/parameters/projectIdQuery'
      - $ref: '#/components/parameters/perPage'
      - $ref: '#/components/parameters/page'
      responses:
        '200':
          description: Successfully retrieved the list of attributes
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Attribute'
        '401':
          description: Authentication credentials are missing or invalid
      security:
      - bearerAuth: []
    post:
      description: Create an Attribue
      operationId: create_attribute
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Attribute_3'
        description: A string in JSON format that includes all the fields to create a new Attribute
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Attribute_3'
          description: Successfully created the Attribute
        '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 an Attribute
      tags:
      - Attributes
      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
  /attributes/{attribute_id}:
    delete:
      description: Archive Attribute by ID
      operationId: delete_attribute
      parameters:
      - description: The ID of the Attribute you'd like to archive
        in: path
        name: attribute_id
        required: true
        schema:
          format: int64
          type: integer
      responses:
        '204':
          description: Successfully archived Attribute
        '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 the specified Attribute.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Attribute not found
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Unexpected error
      summary: Archive an Attribute
      tags:
      - Attributes
      security:
      - apiKey: []
      - OAuth2:
        - read
        - write
    get:
      description: Get Attribute by ID
      operationId: get_attribute
      parameters:
      - description: The Attribute ID of the Attribute you want to get
        in: path
        name: attribute_id
        required: true
        schema:
          format: int64
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Attribute_3'
          description: Successfully retrieved Attribute
        '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 access specified Attribute.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Attribute not found
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Unexpected error
      summary: Read an Attribute
      tags:
      - Attributes
      security:
      - apiKey: []
      - OAuth2:
        - read
        - write
    patch:
      description: Update an Attribute by ID
      operationId: update_attribute
      parameters:
      - description: The ID of the Attribute you'd like to update
        in: path
        name: attribute_id
        required: true
        schema:
          format: int64
          type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AttributeUpdate'
        description: A string in JSON format that includes all the fields you'd like to change for an Attribute
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Attribute_3'
          description: Successfully updated the Attribute
        '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 the specified Attribute.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Attribute not found
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Unexpected error
      summary: Update an Attribute
      tags:
      - Attributes
      security:
      - apiKey: []
      - OAuth2:
        - read
        - write
    servers:
    - url: https://api.optimizely.com/v2
components:
  parameters:
    projectIdQuery:
      name: project_id
      in: query
      required: true
      description: The unique identifier for the project to filter by
      schema:
        type: integer
        format: int64
    perPage:
      name: per_page
      in: query
      required: false
      description: Number of results per page
      schema:
        type: integer
        default: 25
        minimum: 1
        maximum: 100
    page:
      name: page
      in: query
      required: false
      description: Page number for pagination
      schema:
        type: integer
        default: 1
        minimum: 1
    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
  schemas:
    Attribute:
      type: object
      description: A custom attribute for audience targeting
      properties:
        id:
          type: integer
          format: int64
          description: Unique identifier for the attribute
        project_id:
          type: integer
          format: int64
          description: The project this attribute belongs to
        name:
          type: string
          description: Human-readable name of the attribute
        key:
          type: string
          description: Unique key for the attribute
        condition_type:
          type: string
          description: The type of condition this attribute supports
        last_modified:
          type: string
          format: date-time
          description: Timestamp when the attribute was last modified
    Attribute_2:
      type: object
      description: A custom attribute for audience targeting and segmentation
      properties:
        id:
          type: integer
          format: int64
          description: Unique identifier for the attribute
        project_id:
          type: integer
          format: int64
          description: The project this attribute belongs to
        name:
          type: string
          description: Human-readable name of the attribute
        key:
          type: string
          description: Unique key for the attribute within the project
        condition_type:
          type: string
          description: The type of condition this attribute supports
        last_modified:
          type: string
          format: date-time
          description: Timestamp when the attribute was last modified
    Error:
      properties:
        code:
          type: string
        message:
          type: string
        messages:
          type: object
        uuid:
          format: uuid
          type: string
      type: object
    Attribute_3:
      properties:
        archived:
          default: false
          description: Whether or not the Attribute has been archived
          type: boolean
        condition_type:
          default: custom_attribute
          description: Whether this Attribute is a custom dimension or custom attribute. If this is a custom dimension, it belongs to an Optimizely Classic experiment and is read-only.
          enum:
          - custom_attribute
          - custom_dimension
          readOnly: true
          type: string
        description:
          description: A short description of the Attribute
          type: string
        id:
          description: The unique identifier for the Attribute
          format: int64
          readOnly: true
          type: integer
        key:
          description: Unique string identifier for this Attribute within the project
          example: subscriber_status
          maxLength: 64
          pattern: ^[a-zA-Z0-9_\- .]+$
          type: string
        last_modified:
          description: The last time the Attribute was modified
          format: date-time
          readOnly: true
          type: string
        name:
          description: The name of the Attribute. For Full Stack projects, the name will be set to the value of the key.
          example: Subscriber Status
          type: string
        project_id:
          description: The ID of the project the Attribute belongs to
          example: 17738411154
          format: int64
          type: integer
      required:
      - key
      - project_id
      type: object
    AttributeUpdate:
      properties:
        archived:
          default: false
          description: Whether or not the Attribute has been archived
          type: boolean
        description:
          description: A short description of the Attribute
          type: string
        key:
          description: Unique string identifier for this Attribute within the project
          example: subscriber_status
          maxLength: 64
          pattern: ^[a-zA-Z0-9_\- .]+$
          type: string
        name:
          description: The name of the Attribute
          example: Subscriber Status
          type: string
      type: object
  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
x-refined-from:
- optimizely-feature-experimentation-openapi.yml
- optimizely-web-experimentation-openapi.yml
- optimizely-web-experimentation-optimizely-api-openapi.json