Optimizely Assets API

Manage campaign assets such as images and media files.

Operations 14

GET /{clientId}/assets List assets #
POST /{clientId}/assets Upload an asset #
GET /{clientId}/assets/images/count Get the total number of images #
GET /{clientId}/assets/images Get information about all images #
POST /{clientId}/assets/images Upload an image #
GET /{clientId}/assets/images/{imageId} Get information about an image #
POST /{clientId}/assets/images/{imageId} Update the image name #
DELETE /{clientId}/assets/images/{imageId} Delete an image #
GET /assets List assets #
POST /assets Create an asset #
GET /assets/{assetId} Get an asset #
PUT /assets/{assetId} Update an asset #
DELETE /assets/{assetId} Delete an asset #
GET /asset-urls/{asset_id} GET /asset-urls/{asset_id} #

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-assets-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-assets-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Optimizely Assets API
  version: '1.0'
  description: 'Operations tagged Assets across 4 of this provider''s published API definitions: optimizely-campaign-openapi.yml, optimizely-campaign-optimizely-campaign-rest-api-openapi.json, optimizely-cmp-openapi.yml, optimizely-content-marketing-platform-optimizely-cmp-open-api-documentation-openapi.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.campaign.episerver.net/rest
  description: Optimizely Campaign Production Server
- url: https://api.cmp.optimizely.com/v0
  description: Optimizely CMP API Server
- url: https://api.cmp.optimizely.com/v3
  description: v3 version of Optimizely CMP Open API
tags:
- name: Assets
  description: Manage campaign assets such as images and media files.
paths:
  /{clientId}/assets:
    get:
      operationId: listAssets
      summary: List assets
      description: Returns a list of campaign assets such as images and media files.
      tags:
      - Assets
      parameters:
      - $ref: '#/components/parameters/clientId'
      responses:
        '200':
          description: Successfully retrieved assets
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Asset'
        '401':
          description: Authentication credentials are missing or invalid
      security:
      - basicAuth: []
    post:
      operationId: uploadAsset
      summary: Upload an asset
      description: Uploads a new asset for use in campaigns.
      tags:
      - Assets
      parameters:
      - $ref: '#/components/parameters/clientId'
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                  description: The asset file to upload
                name:
                  type: string
                  description: Name of the asset
      responses:
        '201':
          description: Asset successfully uploaded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Asset'
        '400':
          description: Invalid request body
        '401':
          description: Authentication credentials are missing or invalid
      security:
      - basicAuth: []
    servers:
    - url: https://api.campaign.episerver.net/rest
      description: Optimizely Campaign Production Server
  /{clientId}/assets/images/count:
    get:
      tags:
      - Assets
      summary: Get the total number of images
      operationId: count
      parameters:
      - name: clientId
        in: path
        description: Client ID
        required: true
        schema:
          type: string
      responses:
        '200':
          description: The total number was retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestCount'
            application/vnd.optivo.broadmail.v1+json:
              schema:
                $ref: '#/components/schemas/RestCount'
      security:
      - Authorization: []
    servers:
    - url: https://api.campaign.episerver.net/rest
  /{clientId}/assets/images:
    get:
      tags:
      - Assets
      summary: Get information about all images
      description: Get detailed information about all images, such as ID, name, URL, height and width in pixels. You can limit the number of retrieved images and set the starting point of the result list.
      operationId: getAllImages
      parameters:
      - name: clientId
        in: path
        description: Client ID
        required: true
        schema:
          type: string
      - name: offset
        in: query
        description: 'Starting point of the result list <p><i>Default value</i> : 0</p>'
        schema:
          type: integer
          format: int32
      - name: limit
        in: query
        description: 'Maximum number of retrieved images<p><i>Default value</i> : 100</p>'
        schema:
          type: integer
          format: int32
      responses:
        '200':
          description: The images were retrieved successfully (empty result if none were found).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestImageStreamingCollection'
            application/vnd.optivo.broadmail.v1+json:
              schema:
                $ref: '#/components/schemas/RestImageStreamingCollection'
        '400':
          description: Invalid limit request. Change the limit to less than 10000.
      security:
      - Authorization: []
    post:
      tags:
      - Assets
      summary: Upload an image
      description: Upload an image either by specifying a file or URL.
      operationId: createImage
      parameters:
      - name: clientId
        in: path
        description: Client ID
        required: true
        schema:
          type: string
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/RestMultiPartRequestSchema'
      responses:
        '201':
          description: The image was uploaded successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestImage'
            application/vnd.optivo.broadmail.v1+json:
              schema:
                $ref: '#/components/schemas/RestImage'
        '400':
          description: The parameters "name" or "url" are both provided or not provided, or the file name is missing. Alternatively, the image content type is not one of [image/jpeg, image/png, image/gif]
        '500':
          description: Error occurred while uploading the image.
      security:
      - Authorization: []
    servers:
    - url: https://api.campaign.episerver.net/rest
  /{clientId}/assets/images/{imageId}:
    get:
      tags:
      - Assets
      summary: Get information about an image
      description: Get detailed information about an image, such as name, URL, height and width in pixels.
      operationId: getImage
      parameters:
      - name: clientId
        in: path
        description: Client ID
        required: true
        schema:
          type: string
      - name: imageId
        in: path
        description: Image ID
        required: true
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: The image was retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestImage'
            application/vnd.optivo.broadmail.v1+json:
              schema:
                $ref: '#/components/schemas/RestImage'
        '404':
          description: The image could not be found. Ensure that the required parameters such as "imageId" are correct and the image exists.
      security:
      - Authorization: []
    post:
      tags:
      - Assets
      summary: Update the image name
      operationId: updateImage
      parameters:
      - name: clientId
        in: path
        description: Client ID
        required: true
        schema:
          type: string
      - name: imageId
        in: path
        description: Image ID
        required: true
        schema:
          type: integer
          format: int64
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              required:
              - name
              type: object
              properties:
                name:
                  type: string
                  description: New image name
      responses:
        '200':
          description: New name of image was updated successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestImage'
            application/vnd.optivo.broadmail.v1+json:
              schema:
                $ref: '#/components/schemas/RestImage'
        '400':
          description: The parameter "name" is missing.
        '404':
          description: The image could not be found. Ensure that the required parameters such as "imageId" are correct and the image exists.
      security:
      - Authorization: []
    delete:
      tags:
      - Assets
      summary: Delete an image
      operationId: deleteImage
      parameters:
      - name: clientId
        in: path
        description: Client ID
        required: true
        schema:
          type: string
      - name: imageId
        in: path
        description: Image ID
        required: true
        schema:
          type: integer
          format: int64
      responses:
        '204':
          description: The image was deleted successfully.
        '404':
          description: The image could not be found. Ensure that the required parameters such as "imageId" are correct and the image exists.
        '500':
          description: Error occurred while deleting uploaded images.
      security:
      - Authorization: []
    servers:
    - url: https://api.campaign.episerver.net/rest
  /assets:
    get:
      operationId: listAssets
      summary: List assets
      description: Returns a list of digital assets in the CMP library, including images, videos, and raw files. Supports filtering and pagination.
      tags:
      - Assets
      parameters:
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/offset'
      responses:
        '200':
          description: Successfully retrieved the list of assets
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: List of assets
                    items:
                      $ref: '#/components/schemas/Asset_2'
                  pagination:
                    $ref: '#/components/schemas/Pagination'
        '401':
          description: Authentication credentials are missing or invalid
      security:
      - oauth2: []
    post:
      operationId: createAsset
      summary: Create an asset
      description: Creates a new digital asset in the CMP library by uploading a file.
      tags:
      - Assets
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                  description: The asset file to upload
                title:
                  type: string
                  description: Title for the asset
                description:
                  type: string
                  description: Description of the asset
      responses:
        '201':
          description: Asset successfully created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Asset_2'
        '400':
          description: Invalid request body
        '401':
          description: Authentication credentials are missing or invalid
      security:
      - oauth2: []
    servers:
    - url: https://api.cmp.optimizely.com/v0
      description: Optimizely CMP API Server
  /assets/{assetId}:
    get:
      operationId: getAsset
      summary: Get an asset
      description: Retrieves the details of a specific asset by its identifier.
      tags:
      - Assets
      parameters:
      - $ref: '#/components/parameters/assetId'
      responses:
        '200':
          description: Successfully retrieved the asset
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Asset_2'
        '401':
          description: Authentication credentials are missing or invalid
        '404':
          description: Asset not found
      security:
      - oauth2: []
    put:
      operationId: updateAsset
      summary: Update an asset
      description: Updates the specified asset with the provided metadata.
      tags:
      - Assets
      parameters:
      - $ref: '#/components/parameters/assetId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssetInput'
      responses:
        '202':
          description: Asset successfully updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Asset_2'
        '400':
          description: Invalid request body
        '401':
          description: Authentication credentials are missing or invalid
        '404':
          description: Asset not found
      security:
      - oauth2: []
    delete:
      operationId: deleteAsset
      summary: Delete an asset
      description: Permanently deletes the specified asset from the CMP library.
      tags:
      - Assets
      parameters:
      - $ref: '#/components/parameters/assetId'
      responses:
        '204':
          description: Asset successfully deleted
        '401':
          description: Authentication credentials are missing or invalid
        '404':
          description: Asset not found
      security:
      - oauth2: []
    servers:
    - url: https://api.cmp.optimizely.com/v0
      description: Optimizely CMP API Server
  /asset-urls/{asset_id}:
    get:
      operationId: getAssetUrl
      tags:
      - Assets
      summary: GET /asset-urls/{asset_id}
      description: Find URL of an asset by ID
      parameters:
      - name: asset_id
        in: path
        required: true
        schema:
          type: string
          description: Unique identifier of the asset
      responses:
        '302':
          description: Redirect to the discovered asset URL
          headers:
            Location:
              schema:
                type: string
              description: URL of the discovered asset
              example: https://api.cmp.optimizely.com/v3/raw-files/5fe4925ef8a9378056bf4e37
            X-Resource-Location:
              schema:
                type: string
                enum:
                - library
                - task
              description: Location of the asset
              example: library
        '400':
          $ref: '#/components/responses/ClientError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
      - OAuth2:
        - openid
        - profile
        - offline_access
    servers:
    - url: https://api.cmp.optimizely.com/v3
      description: v3 version of Optimizely CMP Open API
components:
  schemas:
    Asset:
      type: object
      description: A campaign asset such as an image or media file
      properties:
        id:
          type: integer
          format: int64
          description: Unique identifier for the asset
        name:
          type: string
          description: Name of the asset
        url:
          type: string
          format: uri
          description: URL to access the asset
        content_type:
          type: string
          description: MIME type of the asset
        file_size:
          type: integer
          description: Size of the asset file in bytes
        created:
          type: string
          format: date-time
          description: Timestamp when the asset was created
    RestMultiPartRequestSchema:
      required:
      - file
      type: object
      properties:
        file:
          type: string
          description: file to be uploaded
          format: binary
        name:
          type: string
          description: name of the attachment
    RestCount:
      type: object
      properties:
        links:
          type: array
          items:
            type: object
            properties:
              uriBuilder:
                type: object
              rels:
                type: array
                items:
                  type: string
              rel:
                type: string
              type:
                type: string
              params:
                type: object
                additionalProperties:
                  type: string
              title:
                type: string
              uri:
                type: string
                format: uri
        count:
          type: integer
          description: Total number
          format: int64
    RestImage:
      type: object
      properties:
        id:
          type: integer
          description: Image ID
          format: int64
        owner:
          type: string
          description: Client ID
        name:
          type: string
          description: Image name
        url:
          type: string
          description: Image url
        height:
          type: integer
          description: Image height
          format: int32
        width:
          type: integer
          description: Image width
          format: int32
        links:
          type: array
          items:
            type: object
            properties:
              uriBuilder:
                type: object
              rels:
                type: array
                items:
                  type: string
              rel:
                type: string
              type:
                type: string
              params:
                type: object
                additionalProperties:
                  type: string
              title:
                type: string
              uri:
                type: string
                format: uri
    RestApiLink:
      type: object
      properties:
        href:
          type: string
        rel:
          type: string
    RestImageStreamingCollection:
      type: object
      properties:
        elements:
          type: array
          items:
            $ref: '#/components/schemas/RestImage'
        links:
          type: array
          writeOnly: true
          items:
            $ref: '#/components/schemas/RestApiLink'
        count:
          type: integer
          format: int32
        offset:
          type: integer
          format: int32
        limit:
          type: integer
          format: int32
    Asset_2:
      type: object
      description: A digital asset in the CMP library
      properties:
        id:
          type: string
          description: Unique identifier for the asset
        title:
          type: string
          description: Title of the asset
        description:
          type: string
          description: Description of the asset
        type:
          type: string
          description: Type of the asset
          enum:
          - image
          - video
          - raw_file
        url:
          type: string
          format: uri
          description: URL to access the asset
        thumbnail_url:
          type: string
          format: uri
          description: URL for the asset thumbnail
        file_name:
          type: string
          description: Original file name
        file_size:
          type: integer
          description: File size in bytes
        mime_type:
          type: string
          description: MIME type of the asset
        labels:
          type: array
          description: Labels associated with the asset
          items:
            type: string
        created_at:
          type: string
          format: date-time
          description: Timestamp when the asset was created
        updated_at:
          type: string
          format: date-time
          description: Timestamp when the asset was last updated
    Pagination:
      type: object
      description: Pagination metadata
      properties:
        total:
          type: integer
          description: Total number of items
        limit:
          type: integer
          description: Maximum items per page
        offset:
          type: integer
          description: Current offset
    AssetInput:
      type: object
      description: Input for updating an asset
      properties:
        title:
          type: string
          description: Title of the asset
        description:
          type: string
          description: Description of the asset
        labels:
          type: array
          description: Labels to associate with the asset
          items:
            type: string
    Error:
      type: object
      additionalProperties: true
      description: Error payload
      properties:
        message:
          type: string
          description: Message describing the error
          example: Not found
        errors:
          type: object
          description: Additional information
          additionalProperties: true
          properties: {}
      required:
      - message
  parameters:
    clientId:
      name: clientId
      in: path
      required: true
      description: The unique identifier for the Optimizely Campaign client
      schema:
        type: string
    offset:
      name: offset
      in: query
      required: false
      description: Number of items to skip for pagination
      schema:
        type: integer
        default: 0
        minimum: 0
    limit:
      name: limit
      in: query
      required: false
      description: Maximum number of items to return
      schema:
        type: integer
        default: 25
        minimum: 1
        maximum: 100
    assetId:
      name: assetId
      in: path
      required: true
      description: The unique identifier for the asset
      schema:
        type: string
  responses:
    NotFound:
      description: Not found error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            message: Resource not found
    ClientError:
      description: Client error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            message: 'Unsupported arguments: a,b,c'
    Forbidden:
      description: Permission error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            message: You do not have the permission to perform this operation
    Unauthorized:
      description: Authorization error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            message: Unauthorized
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: HTTP Basic authentication using the Optimizely Campaign API credentials.
    Authorization:
      type: apiKey
      name: Authorization
      in: header
    oauth2:
      type: oauth2
      description: OAuth 2.0 authentication for the CMP API.
      flows:
        clientCredentials:
          tokenUrl: https://api.cmp.optimizely.com/oauth/token
          scopes: {}
    OAuth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://accounts.cmp.optimizely.com/o/oauth2/v1/auth
          tokenUrl: https://accounts.cmp.optimizely.com/o/oauth2/v1/token
          scopes:
            openid: Grants the ability to receive a unique identifier for the user.
            profile: Grants access to user profile information.
            offline_access: Grants the ability to refresh access_token using the refresh token even when user is not present (not logged in).
        clientCredentials:
          tokenUrl: https://accounts.cmp.optimizely.com/o/oauth2/v1/token
          scopes: {}
x-refined-from:
- optimizely-campaign-openapi.yml
- optimizely-campaign-optimizely-campaign-rest-api-openapi.json
- optimizely-cmp-openapi.yml
- optimizely-content-marketing-platform-optimizely-cmp-open-api-documentation-openapi.json