---
title: Library
slug: content-marketing-platform/api/_KLI-library
docTags: 
createdAt: 2026-06-24T17:47:30.254Z
---

## asset\_added

An asset (`article`, `image`, `video`, `raw file`, or `structured content`) was added to the library for reasons including, but not limited to, uploading assets, completing a task, and so on.

### Payload

| **Key**                                | **Type**         | **Description**                                                                                                                         |
| -------------------------------------- | ---------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| event\_name                            | string           | Name of the event. The value is `asset_added`.                                                                                          |
| data                                   | object           | Data of the event.                                                                                                                      |
| data\[asset]                           | object           | Data of the asset associated with the event.                                                                                            |
| data\[asset]\[id]                      | string           | Unique identifier of the asset.                                                                                                         |
| data\[asset]\[owner\_organization\_id] | string           | Owner organization ID of the asset.                                                                                                     |
| data\[asset]\[type]                    | string           | Type of the asset. Value can be `article`, `image`, `video`, `raw_file`, or `structured_content`.                                       |
| data\[asset]\[source]                  | object           | Source of the asset.                                                                                                                    |
| data\[asset]\[source]\[id]             | string or `null` | Identifier of the source. Sends the ID of a `task` if the asset is added by completing the task.                                        |
| data\[asset]\[source]\[type]           | string or `null` | Type of the source. Sends `task` as the value, if the asset is added by completing the task.                                            |
| data\[asset]\[source]\[links]          | object           | Links related to the asset source.                                                                                                      |
| data\[asset]\[source]\[links]\[self]   | string or `null` | URL to fetch the source details through the CMP Open API. Sends the URL of the `task` API if the asset is added by completing the task. |
| data\[asset]\[links]                   | object           | Links related to the asset.                                                                                                             |
| data\[asset]\[links]\[self]            | string           | URL to fetch the asset's details through the CMP Open API.                                                                              |

### Example

```json
{
  "event_name": "asset_added",
  "data": {
    "asset": {
      "id": "019a86405de737b4ec3e616a4aeff981",
      "owner_organization_id": "5108c3a9becac35915111191",
      "type": "image",
      "source": {
          "id": "656893caea057917c5796f2e",
          "type": "task",
          "links": {
            "self": "https://api.cmp.optimizely.com/v3/tasks/656893caea057917c5796f2e"
          }
      },
      "links": {
        "self": "https://api.cmp.optimizely.com/v3/images/019a86405de737b4ec3e616a4aeff981"
      }
    }
  }
}
```

## asset\_removed

An asset (`article`, `image`, `video`, `raw file`, or `structured content`) was removed from the library for reasons including, but not limited to, deleting assets.

### Payload

| **Key**                                | **Type**         | **Description**                                                                                   |
| -------------------------------------- | ---------------- | ------------------------------------------------------------------------------------------------- |
| event\_name                            | string           | Name of the event. The value is `asset_removed`.                                                  |
| data                                   | object           | Data of the event.                                                                                |
| data\[asset]                           | object           | Data of the asset associated with the event.                                                      |
| data\[asset]\[id]                      | string           | Unique identifier of the asset.                                                                   |
| data\[asset]\[owner\_organization\_id] | string           | Owner organization ID of the asset.                                                               |
| data\[asset]\[type]                    | string           | Type of the asset. Value can be `article`, `image`, `video`, `raw_file`, or `structured_content`. |
| data\[asset]\[public\_url]             | string or `null` | Public URL of the asset.                                                                          |

### Example

```json
{
  "event_name": "asset_removed",
  "data": {
    "asset": {
      "id": "870825113a12950a7eeeb64a64236d49",
      "owner_organization_id": "5108c3a9becac35915111191",
      "type": "article",
      "public_url": "https://example.com/test"
    }
  }
}
```

## asset\_modified

An asset (`article`, `image`, `video`, `raw file`, or `structured content`) was modified in the library.

The event is triggered when specific attributes of a file type change, as listed below.

- `article` – title, fields, file location, expires\_at, tags, owner\_id, url, is\_archived
- `image` & `video` – title, description, fields, file location, versions, alt\_text, expires\_at, tags, attribution\_text, owner\_id, url, is\_archived
- `raw file` – title, description, fields, file location, versions, expires\_at, tags, attribution\_text, owner\_id, url, is\_archived
- `structured content` – file location, fields, tags, owner\_id, is\_archived

### Payload

| **Key**                                | **Type**         | **Description**                                                                                                                         |
| -------------------------------------- | ---------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| event\_name                            | string           | Name of the event. The value is `asset_modified`.                                                                                       |
| data                                   | object           | Data of the event.                                                                                                                      |
| data\[asset]                           | object           | Data of the asset associated with the event.                                                                                            |
| data\[asset]\[id]                      | string           | Unique identifier of the asset.                                                                                                         |
| data\[asset]\[owner\_organization\_id] | string           | Owner organization ID of the asset.                                                                                                     |
| data\[asset]\[type]                    | string           | Type of the asset. Value can be `article`, `image`, `video`, `raw_file`, or `structured_content`.                                       |
| data\[asset]\[source]                  | object           | Source of the asset.                                                                                                                    |
| data\[asset]\[source]\[id]             | string or `null` | Identifier of the source. Sends the ID of a `task` if the asset is modified by completing the task.                                     |
| data\[asset]\[source]\[type]           | string or `null` | Type of the source. Sends `task` as the value, if the asset is modified by completing the task.                                         |
| data\[asset]\[source]\[links]          | object           | Links related to the asset source.                                                                                                      |
| data\[asset]\[source]\[links]\[self]   | string or `null` | URL to fetch the source details through the CMP Open API. Sends the URL of the `task` API if the asset is added by completing the task. |
| data\[asset]\[links]                   | object           | Links related to the asset.                                                                                                             |
| data\[asset]\[links]\[self]            | string           | URL to fetch the asset's details through the CMP Open API.                                                                              |
| data\[attributes\_changed]             | array            | List of attributes that trigger the webhook                                                                                             |

### Example

```json
{
  "event_name": "asset_modified",
  "data": {
    "asset": {
      "id": "019a86405de737b4ec3e616a4aeff951",
      "owner_organization_id": "5108c3a9becac35915111191",
      "type": "image",
      "source": {
          "id": "656893caea057917c5796f2e",
          "type": "task",
          "links": {
            "self": "https://api.cmp.optimizely.com/v3/tasks/656893caea057917c5796f2e"
          }
      },
      "links": {
        "self": "https://api.cmp.optimizely.com/v3/images/019a86405de737b4ec3e616a4aeff951"
      }
    },
    "attributes_changed": ["title", "description", "expires_at"]
  }
}
```

## asset\_renditions\_created

An asset's renditions are created.

### Payload

| **Key**                                | **Type** | **Description**                                               |
| -------------------------------------- | -------- | ------------------------------------------------------------- |
| event\_name                            | string   | Name of the event. The value is `asset_renditions_created`.   |
| data                                   | object   | Data of the event.                                            |
| data\[asset]                           | object   | Data of the asset associated with the event.                  |
| data\[asset]\[id]                      | string   | Unique identifier of the asset.                               |
| data\[asset]\[owner\_organization\_id] | string   | Owner organization ID of the asset.                           |
| data\[asset]\[type]                    | string   | Type of the asset.                                            |
| data\[asset]\[links]                   | object   | Links related to the asset.                                   |
| data\[asset]\[links]\[self]            | string   | URL to fetch the asset's details through the CMP Open API.    |
| data\[asset]\[links]\[renditions]      | string   | URL to fetch the asset's renditions through the CMP Open API. |

### Example

```json
{
  "event_name": "asset_renditions_created",
  "data": {
    "asset": {
      "id": "019a86405de737b4ec3e616a4aeff951",
      "owner_organization_id": "5108c3a9becac35915111191",
      "type": "image",
      "links": {
        "self": "https://api.cmp.optimizely.com/v3/images/019a86405de737b4ec3e616a4aeff951",
        "renditions": "https://api.cmp.optimizely.com/v3/assets/019a86405de737b4ec3e616a4aeff951/renditions"
      }
    }
  }
}
```
