Optimizely Assets API

Manage campaign assets such as images and media files.

Operations 14

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /{clientId}/assets List campaign assets for a Campaign client · List assets #
Ask an LLM
“Which images and media files are stored for my Optimizely Campaign client?”
“Can I see all the campaign assets available to a client ID?”
Tell an agent
List the campaign assets for client {clientId}.
Show all media files stored under Campaign client {clientId}.
POST /{clientId}/assets Upload a campaign asset · Upload an asset #
Ask an LLM
“How do I upload a media file to use in my campaigns?”
“Can I give a campaign asset a name when I upload it?”
Tell an agent
Upload a campaign asset named {name} to client {clientId}.
Add this file {file} as a campaign asset for client {clientId}.
GET /{clientId}/assets/images/count Count the images in a Campaign client · Get the total number of images #
Ask an LLM
“How many images are stored in my campaign image library?”
“What is the total image count for a client?”
Tell an agent
Count the images stored for client {clientId}.
Tell me the total number of images in client {clientId}.
GET /{clientId}/assets/images List campaign images with dimensions · Get information about all images #
Ask an LLM
“Can I get every campaign image with its URL, width and height?”
“Is there a way to page through my images a batch at a time?”
Tell an agent
List the images for client {clientId}.
Show {limit} images for client {clientId} starting at offset {offset}.
POST /{clientId}/assets/images Upload an image to a Campaign client · Upload an image #
Ask an LLM
“How do I upload an image file for use in mailings?”
“Can I add a campaign image from a file and give it a name?”
Tell an agent
Upload image {file} to client {clientId}.
Upload image {file} named {name} to the image library of client {clientId}.
GET /{clientId}/assets/images/{imageId} Get details of one campaign image · Get information about an image #
Ask an LLM
“What is the URL and pixel size of a specific campaign image?”
“How can I look up a single image by its ID?”
Tell an agent
Get image {imageId} for client {clientId}.
Show the name, URL and dimensions of image {imageId}.
POST /{clientId}/assets/images/{imageId} Rename a campaign image · Update the image name #
Ask an LLM
“Can I rename an image that is already uploaded?”
“How do I change a campaign image's name?”
Tell an agent
Rename image {imageId} in client {clientId} to {name}.
Change the name of image {imageId} to {name}.
DELETE /{clientId}/assets/images/{imageId} Delete a campaign image · Delete an image #
Ask an LLM
“How do I remove an image from my campaign image library?”
“Can I delete an image I uploaded by mistake?”
Tell an agent destructive · confirm first
Delete image {imageId} from client {clientId}.
Remove campaign image {imageId}.
GET /assets List assets in the CMP library · List assets #
Ask an LLM
“What images, videos and raw files are in my Content Marketing Platform library?”
“Can I page through CMP library assets with a limit and offset?”
Tell an agent
List the assets in my CMP library.
Show {limit} CMP library assets, skipping the first {offset}.
POST /assets Add an asset to the CMP library · Create an asset #
Ask an LLM
“How do I upload a new file into the CMP asset library?”
“Can I set a title and description when adding a library asset?”
Tell an agent
Upload {file} to the CMP library with title {title}.
Create a CMP library asset titled {title} described as {description}.
GET /assets/{assetId} Get a CMP library asset · Get an asset #
Ask an LLM
“How do I look up the details of one asset in the CMP library?”
“What metadata does a specific library asset have?”
Tell an agent
Get CMP asset {assetId}.
Show the details of library asset {assetId}.
PUT /assets/{assetId} Update a CMP asset's metadata · Update an asset #
Ask an LLM
“Can I change the title or description of a library asset?”
“How do I add labels to an asset in the CMP library?”
Tell an agent
Retitle CMP asset {assetId} to {title}.
Set labels {labels} on library asset {assetId}.
DELETE /assets/{assetId} Permanently delete a CMP asset · Delete an asset #
Ask an LLM
“How do I permanently remove an asset from the CMP library?”
“Is deleting a library asset reversible?”
Tell an agent destructive · confirm first
Delete CMP asset {assetId}.
Permanently remove library asset {assetId}.
GET /asset-urls/{asset_id} Find the URL of an asset · GET /asset-urls/{asset_id} #
Ask an LLM
“What is the hosted URL of an asset when all I have is its ID?”
“Can I resolve an asset ID to a link I can use?”
Tell an agent
Find the URL for asset {asset_id}.
Give me the link to asset {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: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 form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

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: getAssets
      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: []
      x-operation-id-source: normalized
      x-operation-id-original: listAssets
    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:
  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
    assetId:
      name: assetId
      in: path
      required: true
      description: The unique identifier for the asset
      schema:
        type: string
    limit:
      name: limit
      in: query
      required: false
      description: Maximum number of items to return
      schema:
        type: integer
        default: 25
        minimum: 1
        maximum: 100
  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
    RestApiLink:
      type: object
      properties:
        href:
          type: string
        rel:
          type: string
    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
    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
    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
    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
    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
    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
    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
  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'
    Unauthorized:
      description: Authorization error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            message: Unauthorized
    Forbidden:
      description: Permission error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            message: You do not have the permission to perform this operation
  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