Optimizely Schema API

Manage the ODP schema including domain objects and their fields.

Documentation

Specifications

Other Resources

OpenAPI Specification

optimizely-schema-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Optimizely Campaign REST Assets Schema API
  description: The Optimizely Campaign REST API provides programmatic access to Optimizely's email and omnichannel campaign management capabilities. Developers can use the API to manage campaigns, recipients, mailing lists, smart campaigns, transactional mails, and messaging workflows. The API is hosted at api.campaign.episerver.net and supports automation of marketing campaign operations, enabling integration with external systems and custom marketing workflows. The base URL includes the client ID for multi-tenant access.
  version: '1.0'
  contact:
    name: Optimizely Support
    url: https://support.optimizely.com
  termsOfService: https://www.optimizely.com/legal/terms/
servers:
- url: https://api.campaign.episerver.net/rest
  description: Optimizely Campaign Production Server
security:
- basicAuth: []
tags:
- name: Schema
  description: Manage the ODP schema including domain objects and their fields.
paths:
  /schema/objects:
    get:
      operationId: listSchemaObjects
      summary: List schema objects
      description: Returns a list of all domain object types defined in the ODP schema, including their fields and configurations.
      tags:
      - Schema
      security:
      - privateApiKey: []
      responses:
        '200':
          description: Successfully retrieved schema objects
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SchemaObject'
        '401':
          description: Authentication credentials are missing or invalid
  /schema/objects/{object_type}:
    get:
      operationId: getSchemaObject
      summary: Get a schema object
      description: Retrieves the schema definition for a specific domain object type.
      tags:
      - Schema
      security:
      - privateApiKey: []
      parameters:
      - $ref: '#/components/parameters/objectType'
      responses:
        '200':
          description: Successfully retrieved the schema object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SchemaObject'
        '401':
          description: Authentication credentials are missing or invalid
        '404':
          description: Schema object not found
    post:
      operationId: createSchemaObject
      summary: Create a schema object
      description: Creates a new domain object type in the ODP schema.
      tags:
      - Schema
      security:
      - privateApiKey: []
      parameters:
      - $ref: '#/components/parameters/objectType'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SchemaObjectInput'
      responses:
        '201':
          description: Schema object successfully created
        '400':
          description: Invalid schema object definition
        '401':
          description: Authentication credentials are missing or invalid
  /schema/objects/{object_type}/fields:
    post:
      operationId: createSchemaField
      summary: Create a schema field
      description: Adds a new field to an existing domain object type in the ODP schema.
      tags:
      - Schema
      security:
      - privateApiKey: []
      parameters:
      - $ref: '#/components/parameters/objectType'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SchemaFieldInput'
      responses:
        '201':
          description: Schema field successfully created
        '400':
          description: Invalid field definition
        '401':
          description: Authentication credentials are missing or invalid
        '404':
          description: Schema object not found
components:
  schemas:
    SchemaObjectInput:
      type: object
      description: Input for creating a domain object type
      required:
      - display_name
      properties:
        display_name:
          type: string
          description: Human-readable display name
        description:
          type: string
          description: Description of the object type
    SchemaObject:
      type: object
      description: A domain object type definition in the ODP schema
      properties:
        name:
          type: string
          description: Name of the object type
        display_name:
          type: string
          description: Human-readable display name
        description:
          type: string
          description: Description of the object type
        fields:
          type: array
          description: Fields defined on the object type
          items:
            $ref: '#/components/schemas/SchemaField'
    SchemaFieldInput:
      type: object
      description: Input for creating a schema field
      required:
      - name
      - display_name
      - type
      properties:
        name:
          type: string
          description: Field name
        display_name:
          type: string
          description: Human-readable display name
        type:
          type: string
          description: Data type of the field
          enum:
          - string
          - number
          - boolean
          - timestamp
        description:
          type: string
          description: Description of the field
    SchemaField:
      type: object
      description: A field definition within a domain object type
      properties:
        name:
          type: string
          description: Field name
        display_name:
          type: string
          description: Human-readable display name
        type:
          type: string
          description: Data type of the field
          enum:
          - string
          - number
          - boolean
          - timestamp
        description:
          type: string
          description: Description of the field
  parameters:
    objectType:
      name: object_type
      in: path
      required: true
      description: The type of object (e.g., products, orders)
      schema:
        type: string
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: HTTP Basic authentication using the Optimizely Campaign API credentials.
externalDocs:
  description: Optimizely Campaign REST API Documentation
  url: https://docs.developers.optimizely.com/optimizely-campaign/docs/rest-api