Optimizely Library API
The Library API from Optimizely — 24 operation(s) for library.
The Library API from Optimizely — 24 operation(s) for library.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
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.curl "https://apis.io/api/v1/apis/optimizely-library-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
openapi: 3.2.0
info:
version: V3
title: Optimizely CMP Open API Documentation Library API
servers:
- url: https://api.cmp.optimizely.com/v3
description: v3 version of Optimizely CMP Open API
security:
- OAuth2:
- openid
- profile
- offline_access
tags:
- name: Library
paths:
/folders:
get:
operationId: listFolders
tags:
- Library
summary: GET /folders
description: Get the list of folders sorted by `modified_at` in descending order.
parameters:
- name: parent_folder_id
in: query
required: false
description: ID of the parent folder to filter by
schema:
type: string
example: 1d9d8aeca10811ebbc640242ac12001b
- $ref: '#/components/parameters/offset'
- $ref: '#/components/parameters/page_size'
responses:
'200':
description: List of fetched folders
content:
application/json:
schema:
type: object
additionalProperties: false
properties:
data:
description: List of folders
type: array
items:
$ref: '#/components/schemas/FolderResponse'
pagination:
allOf:
- $ref: '#/components/schemas/Pagination'
- type: object
properties:
next:
type:
- string
- 'null'
example: https://api.cmp.optimizely.com/v3/folders?offset=10&page_size=10
required:
- data
- pagination
'400':
$ref: '#/components/responses/ClientError'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
post:
operationId: createFolder
tags:
- Library
summary: POST /folders
description: Create a folder. Use the `parent_folder_id` field to create a nested folder.
requestBody:
description: Payload to create a folder
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/FolderCreateRequest'
responses:
'201':
description: Created folder
content:
application/json:
schema:
$ref: '#/components/schemas/FolderResponse'
'400':
$ref: '#/components/responses/ClientError'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
/folders/{id}:
get:
operationId: getFolder
tags:
- Library
summary: GET /folders/{id}
description: Get a folder
parameters:
- name: id
in: path
required: true
schema:
type: string
description: Unique identifier of the folder
example: 5d7f910551b00a722e0418830cee6632
responses:
'200':
description: Fetched folder
content:
application/json:
schema:
$ref: '#/components/schemas/FolderResponse'
'400':
$ref: '#/components/responses/ClientError'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
patch:
operationId: updateFolder
tags:
- Library
summary: PATCH /folders/{id}
description: <span style="background-color:#e95f6a;padding:5px;border-radius:5px">Experimental</span> Update a folder's name and/or parent.
parameters:
- name: id
in: path
required: true
schema:
type: string
description: Unique identifier of the folder
example: 5d7f910551b00a722e0418830cee6632
requestBody:
description: Payload to update a folder
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/FolderUpdateRequest'
responses:
'200':
description: Updated Folder
content:
application/json:
schema:
$ref: '#/components/schemas/FolderResponse'
'400':
$ref: '#/components/responses/ClientError'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
delete:
operationId: deleteFolder
tags:
- Library
summary: DELETE /folders/{id}
description: <span style="background-color:#e95f6a;padding:5px;border-radius:5px">Experimental</span> Delete a folder.
parameters:
- name: id
in: path
required: true
schema:
type: string
description: Unique identifier of the folder
example: 5d7f910551b00a722e0418830cee6632
responses:
'204':
description: Folder deleted successfully
'400':
$ref: '#/components/responses/ClientError'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
/folders/{id}/permissions:
get:
operationId: listFolderPermissions
tags:
- Library
summary: GET /folders/{id}/permissions
description: <span style="background-color:#e95f6a;padding:5px;border-radius:5px">Experimental</span> List of entities that have permission to access the folder
parameters:
- name: id
in: path
required: true
schema:
type: string
description: Unique identifier of the folder
example: 5d7f910551b00a722e0418830cee6631
- name: access
in: query
schema:
type: string
description: To filter by specific access level. Cannot be used in addition to max_access and min_access params.
enum:
- view
- edit
- comment
- delete
example: view
- name: max_access
in: query
schema:
type: string
description: To filter by specific access level and higher. Cannot be used in addition to access and min_access params.
enum:
- view
- edit
- comment
- delete
example: view
- name: min_access
in: query
schema:
type: string
description: To filter by specific access level and lower. Cannot be used in addition to access and max_access params.
enum:
- view
- edit
- comment
- delete
example: view
responses:
'200':
description: List of permissions
content:
application/json:
schema:
$ref: '#/components/schemas/FolderPermissionListResponseItem'
'400':
$ref: '#/components/responses/ClientError'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
post:
operationId: addFolderPermissions
tags:
- Library
summary: POST /folders/{id}/permissions
description: <span style="background-color:#e95f6a;padding:5px;border-radius:5px">Experimental</span> Grant folder access to users or teams
parameters:
- name: id
in: path
required: true
schema:
type: string
description: Unique identifier of the folder
example: 5d7f910551b00a722e0418830cee6631
requestBody:
description: Payload to add list of accessors to folder permissions
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/FolderPermissionBulkCreateRequest'
responses:
'204':
description: Permission access granted
'400':
$ref: '#/components/responses/ClientError'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
/folders/{id}/permissions/{accessor_id}:
patch:
operationId: updateFolderPermission
tags:
- Library
summary: PATCH /folders/{id}/permissions/{accessor_id}
description: <span style="background-color:#e95f6a;padding:5px;border-radius:5px">Experimental</span> Update accessor's access level and ownership of folder
parameters:
- name: id
in: path
required: true
schema:
type: string
description: Unique identifier of the folder
example: 5d7f910551b00a722e0418830cee6631
- name: accessor_id
in: path
required: true
schema:
type: string
description: Unique identifier of the accessor. Accessor should be a user or a team.
example: 5d7f910551b00a722e0418830cee6631
requestBody:
description: Payload to update permission of accessors
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/FolderPermissionUpdateRequest'
responses:
'204':
description: Permission access granted
'400':
$ref: '#/components/responses/ClientError'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'422':
$ref: '#/components/responses/UnprocessableEntity'
delete:
operationId: removeFolderPermission
tags:
- Library
summary: DELETE /folders/{id}/permissions/{accessor_id}
description: <span style="background-color:#e95f6a;padding:5px;border-radius:5px">Experimental</span> Remove accessor's access from a folder
parameters:
- name: id
in: path
required: true
schema:
type: string
description: Unique identifier of the folder
example: 5d7f910551b00a722e0418830cee6631
- name: accessor_id
in: path
required: true
schema:
type: string
description: Unique identifier of the accessor. Accessor should be a user or a team. Accessor cannot be an owner.
example: 5d7f910551b00a722e0418830cee6631
responses:
'204':
description: Accessor's access removed
'400':
$ref: '#/components/responses/ClientError'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'422':
$ref: '#/components/responses/UnprocessableEntity'
/file-urls:
post:
operationId: createFileUrls
tags:
- Library
summary: POST /file-urls
description: Generates download URLs of files given file guid.
requestBody:
description: Payload to generate download URLs for files.
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/FileUrlBulkCreateRequest'
responses:
'200':
description: Generated URLs
content:
application/json:
schema:
$ref: '#/components/schemas/BatchFileUrlResponse'
'400':
$ref: '#/components/responses/ClientError'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
/assets:
get:
operationId: listAssets
tags:
- Library
summary: GET /assets
description: 'Get the list of assets. Assets are sorted by `modified_at` in descending order.
To get assets that are not inside any folder, pass `include_subfolder_assets=false` in the query param.
'
parameters:
- name: type
in: query
description: 'Asset type to filter by. Example: `type=image&type=video`'
schema:
type: array
items:
type: string
enum:
- article
- image
- video
- raw_file
- structured_content
default:
- article
- image
- video
- raw_file
- structured_content
style: form
explode: true
examples:
single:
summary: Filter by a single type
value:
- image
multiple:
summary: Filter by multiple types
value:
- article
- image
- video
- name: label
in: query
description: Label to filter by. **Must be passed as urlencoded string**. Labels that do not exist are ignored. If none of the provided labels exist, filtering is not applied. Example – `label=%7B%22group%22%3A%22ee63e3ee43925bb5cc8cd17b817d93ee%22%2C%22values%22%3A%5B%226706efc7828cd6aaedbc0434139cd3e1%22%2C%221f32651216cf2aefcaa08be1ea7dedf1%22%5D%7D`
schema:
type: array
items:
type: object
additionalProperties: false
properties:
group:
type: string
description: Identifier of the label group
example: 2467e583a60e23fda2b89db81a453cd2
values:
type: array
description: List of identifiers of the label values
items:
type: string
description: Identifier of the label value
example: 71c378f3fee3d822759d1bdc2aab628c
required:
- group
- values
style: form
explode: true
examples:
single:
summary: Filter by a single label
value:
- '{"group": "ee63e3ee43925bb5cc8cd17b817d93ee", "values": ["6706efc7828cd6aaedbc0434139cd3e1", "1f32651216cf2aefcaa08be1ea7dedf1"]}'
multiple:
summary: Filter by multiple labels
value:
- '{"group": "ee63e3ee43925bb5cc8cd17b817d93ee", "values": ["6706efc7828cd6aaedbc0434139cd3e1", "1f32651216cf2aefcaa08be1ea7dedf1"]}'
- '{"group": "126123b543912bb5cc12d17b817d9312", "values": ["aa63e3ee43925bb5cc8cd17b817d93aa", "df697bd824a944bf7d4fb6e350d9c5bd"]}'
- name: fields
in: query
description: List of fields to filter by. **Must be passed as base64 encoded string**. Fields that do not exist are ignored. If none of the provided fields exist, filtering is not applied. Example – `fields=Wwp7CiJpZCI6ICI2N2E4NDZhMWM3NzU1YTFwNThpNjh5MzVhIiwKInZhbHVlcyI6IFsiNjdhODQ2YTFjNzc1YWU1YWExYTE0YTA1Il0KfQpd=`
schema:
type: array
items:
type: object
additionalProperties: false
properties:
id:
type: string
description: Identifier of the field
example: 2467e583a60e23fda2b89db81a453cd2
values:
type: array
description: List of identifiers of the field values
items:
type: string
description: Identifier of the field value
example: 71c378f3fee3d822759d1bdc2aab628c
required:
- id
- values
style: form
explode: true
examples:
single:
summary: Filter by a single field
value:
- '[{"id": "ee63e3ee43925bb5cc8cd17b817d93ee", "values": ["6706efc7828cd6aaedbc0434139cd3e1", "1f32651216cf2aefcaa08be1ea7dedf1"]}]'
multiple:
summary: Filter by multiple fields
value:
- '[{"id": "ee63e3ee43925bb5cc8cd17b817d93ee", "values": ["6706efc7828cd6aaedbc0434139cd3e1", "1f32651216cf2aefcaa08be1ea7dedf1"]}, {"id": "126123b543912bb5cc12d17b817d9312", "values": ["aa63e3ee43925bb5cc8cd17b817d93aa", "df697bd824a944bf7d4fb6e350d9c5bd"]}]'
- name: created_at__from
in: query
required: false
description: Date and time as the lower limit to filter assets by `created_at`, in ISO 8601 UTC format
schema:
type: string
format: date-time
example: '2018-11-30T13:32:44Z'
- name: created_at__to
in: query
required: false
description: Date and time as the upper limit to filter assets by `created_at`, in ISO 8601 UTC format
schema:
type: string
format: date-time
example: '2018-11-30T13:32:44Z'
- name: modified_at__from
in: query
required: false
description: Date and time as the lower limit to filter assets by `modified_at`, in ISO 8601 UTC format
schema:
type: string
format: date-time
example: '2018-11-30T13:32:44Z'
- name: modified_at__to
in: query
required: false
description: Date and time as the upper limit to filter assets by `modified_at`, in ISO 8601 UTC format
schema:
type: string
format: date-time
example: '2018-11-30T13:32:44Z'
- name: folder_id
in: query
required: false
description: ID of the library folder to include assets from
schema:
type: string
example: 6bb8db20a5b611ebae319b7c541b1a7f
- name: include_subfolder_assets
in: query
required: false
description: Indicates whether assets from subfolders need to be included
schema:
type: boolean
default: true
example: 'false'
- name: search_text
in: query
required: false
description: Search assets by title or content description
schema:
type: string
example: Cute Cat
- name: campaign_id
in: query
required: false
description: ID of the campaign to include assets from
schema:
type: string
example: 673218bee23887779e9e9a6f
- $ref: '#/components/parameters/offset'
- $ref: '#/components/parameters/page_size'
responses:
'200':
description: List of fetched assets
content:
application/json:
schema:
type: object
additionalProperties: false
properties:
data:
description: List of assets
type: array
items:
$ref: '#/components/schemas/AssetResponse'
pagination:
allOf:
- $ref: '#/components/schemas/Pagination'
- type: object
properties:
next:
type:
- string
- 'null'
example: https://api.cmp.optimizely.com/v3/assets?offset=10&page_size=10
total_count:
type: number
description: Total number of assets found based on the request
required:
- data
- pagination
- total_count
'400':
$ref: '#/components/responses/ClientError'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
post:
operationId: createAsset
tags:
- Library
summary: POST /assets
description: Create a new asset. Supports only `images`, `videos`, and `raw files`. See [Upload assets](https://docs.developers.optimizely.com/content-marketing-platform/docs/upload-assets) to upload an asset.
requestBody:
description: Payload to create an asset
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/LibraryAssetCreateRequest'
responses:
'201':
description: Created asset
content:
application/json:
schema:
$ref: '#/components/schemas/AssetResponse'
'400':
$ref: '#/components/responses/ClientError'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
/assets/{asset_id}/fields:
get:
operationId: listAssetFields
tags:
- Library
summary: GET assets/{asset_id}/fields
description: <span style="background-color:#e95f6a;padding:5px;border-radius:5px">Experimental</span> Get the list of fields of an asset.
parameters:
- name: asset_id
in: path
required: true
schema:
type: string
description: Unique identifier of the asset
example: 5f857f30e1c4a2038d6179e9
- $ref: '#/components/parameters/offset'
- $ref: '#/components/parameters/page_size'
responses:
'200':
description: List of fetched fields
content:
application/json:
schema:
type: object
additionalProperties: false
properties:
data:
description: List of fields
type: array
items:
$ref: '#/components/schemas/AssetFieldListResponseItem'
pagination:
allOf:
- $ref: '#/components/schemas/Pagination'
- type: object
properties:
next:
type:
- string
- 'null'
example: https://api.cmp.optimizely.com/v3/assets/5f857f30e1c4a2038d6179e9/fields?offset=10&page_size=10
required:
- data
- pagination
'400':
$ref: '#/components/responses/ClientError'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
put:
operationId: updateAssetFields
tags:
- Library
summary: PUT /assets/{asset_id}/fields
description: <span style="background-color:#e95f6a;padding:5px;border-radius:5px">Experimental</span> Replace existing fields of an asset.
parameters:
- name: asset_id
in: path
required: true
schema:
type: string
description: Unique identifier of the asset
example: 5f857f30e1c4a2038d6179e9
requestBody:
description: Payload to replace the fields
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/AssetFieldsUpdateRequest'
responses:
'200':
description: List of fields after replacement
content:
application/json:
schema:
type: object
additionalProperties: false
properties:
data:
description: List of fields
type: array
items:
$ref: '#/components/schemas/AssetFieldListResponseItem'
links:
type: object
additionalProperties: false
description: Meta links
properties:
asset_fields:
type: string
description: URL to get the asset fields
example: https://api.cmp.optimizely.com/v3/assets/5f857f30e1c4a2038d6179e9/fields
asset_url:
type: string
description: URL of the asset
example: https://api.cmp.optimizely.com/v3/asset-urls/5f857f30e1c4a2038d6179e9
required:
- asset_fields
- asset_url
required:
- data
- links
'400':
$ref: '#/components/responses/ClientError'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
/assets/{asset_id}/fields/{field_id}:
put:
operationId: updateAssetField
tags:
- Library
summary: PUT /assets/{asset_id}/fields/{field_id}
description: '<span style="background-color:#e95f6a;padding:5px;border-radius:5px">Experimental</span> Update the field value of an asset. '
parameters:
- name: asset_id
in: path
required: true
schema:
type: string
description: Unique identifier of the asset
example: 5f857f30e1c4a2038d6179e9
- name: field_id
in: path
required: true
schema:
type: string
description: Unique identifier of the field of the asset
example: 4f857f30e1c4a2038d6179e7
requestBody:
description: Payload to update the field value
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/AssetFieldUpdateRequest'
responses:
'200':
description: Updated the asset field
content:
application/json:
schema:
$ref: '#/components/schemas/AssetFieldUpdateResponse'
'400':
$ref: '#/components/responses/ClientError'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
/assets/{asset_id}/versions:
post:
operationId: createAssetVersion
tags:
- Library
summary: POST /assets/{asset_id}/versions
description: Add a new version to a library asset. Supports adding versions to only `images`, `videos`, and `raw files` type assets. See [Upload assets](https://docs.developers.optimizely.com/content-marketing-platform/docs/upload-assets) to upload a version to a library asset.
parameters:
- name: asset_id
in: path
required: true
schema:
type: string
description: Unique identifier of the asset
example: 5d7f910551b00a722e0418830cee6631
requestBody:
description: Payload to add a version to a library asset
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/AssetVersionCreateRequest'
responses:
'201':
description: Created version
content:
application/json:
schema:
$ref: '#/components/schemas/LibraryAssetVersionResponse'
'400':
$ref: '#/components/responses/ClientError'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'422':
$ref: '#/components/responses/UnprocessableEntity'
/assets/{asset_id}/renditions:
get:
operationId: listAssetRenditions
tags:
- Library
summary: GET /assets/{asset_id}/renditions
description: '<span style="background-color:#e95f6a;padding:5px;border-radius:5px">Experimental</span> Get the renditions of an asset given its `id`. '
parameters:
- name: asset_id
in: path
required: true
schema:
type: string
description: Unique identifier of the asset
example: 5d7f910551b00a722e0418830cee6631
responses:
'200':
description: List of fetched renditions
content:
application/json:
schema:
type: object
additionalProperties: false
properties:
data:
description: List of renditions
type: array
items:
$ref: '#/components/schemas/BaseAssetRenditionResponse'
pagination:
allOf:
- $ref: '#/components/schemas/Pagination'
- type: object
properties:
next:
type:
- string
- 'null'
example: https://api.cmp.optimizely.com/v3/assets/5d7f910551b00a722e0418830cee6631/renditions?offset=10&page_size=10
required:
- data
- pagination
'400':
$ref: '#/components/responses/ClientError'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
/assets/{asset_id}/permissions:
get:
operationId: listAssetPermissions
tags:
- Library
summary: GET /assets/{asset_id}/permissions
description: <span style="background-color:#e95f6a;padding:5px;border-radius:5px">Experimental</span> List of entities that have permission to access the asset
parameters:
- name: asset_id
in: path
required: true
schema:
type: string
description: Unique identifier of the asset
example: 5d7f910551b00a722e0418830cee6631
- name: access
in: query
schema:
type: string
description: To filter by specific access level. Cannot be used in addition to max_access and min_access params.
enum:
- view
- edit
- comment
- delete
example: view
- name: max_access
in: query
schema:
type: string
description: To filter by specific access level and higher. Cannot be used in addition to access and min_access params.
enum:
- view
- edit
- comment
- delete
example: view
- name: min_access
in: query
schema:
type: string
description: To filter by specific access level and lower. Cannot be used in addition to access and max_access params.
enum:
- view
- edit
- comment
- delete
example: view
responses:
'200':
description: List of permissions
content:
application/json:
schema:
$ref: '#/components/schemas/AssetPermissionListResponseItem'
'400':
$ref: '#/components/responses/ClientError'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
post:
operationId: addAssetPermissions
tags:
- Library
summary: POST /assets/{asset_id}/permissions
description: <span style="background-color:#e95f6a;padding:5px;border-radius:5px">Experimental</span> Grant asset access to users or teams
parameters:
- name: asset_id
in: path
required: true
schema:
type: string
description: Unique identifier of the asset
example: 5d7f910551b00a722e0418830cee6631
requestBody:
description: Payload to add list of accessors to asset permissions
required: true
content:
# --- truncated at 32 KB (172 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/optimizely/refs/heads/main/openapi/optimizely-library-api-openapi.yml