# Events

Each event corresponds with a certain action that can happen in CKBox in a certain environment. Also, each event has a specific payload format with the relevant event information.

Before you use Webhooks, please get familiar with the basic principles of the feature. You can read more about using Webhooks in the [Overview](overview.md) guide.

<a id="assets">

## Assets

You can trigger the following events for assets in CKBox.

<a id="asset-uploaded">

### Asset uploaded

Name: `asset.uploaded`\
Description: Triggered whenever the file is uploaded to a category or a folder.

<a id="payload">

#### Payload

* `workspace_id` – The identifier of the workspace for which the action was initialized.
* `asset` – The details of the uploaded asset.
* `user` – The details of a user performing this action.

<a id="example">

#### Example

The following example presents a webhook request sent after a user uploads a file.

```json
{
	environment_id: '6afdca1ba1e38969dea1',
	event: 'asset.uploaded',
	payload: {
		workspace_id: '80e839331c4d8827c474',
		asset: {
			id: '-1zT3SPzjuEv',
			name: 'Cupcake',
			extension: 'jpeg',
			url: 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/-1zT3SPzjuEv/file',
			images_urls: {
				'192': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/-1zT3SPzjuEv/images/192.webp',
				'384': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/-1zT3SPzjuEv/images/384.webp',
				'576': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/-1zT3SPzjuEv/images/576.webp',
				'768': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/-1zT3SPzjuEv/images/768.webp',
				'960': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/-1zT3SPzjuEv/images/960.webp',
				'1152': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/-1zT3SPzjuEv/images/1152.webp',
				'1344': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/-1zT3SPzjuEv/images/1344.webp',
				'1536': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/-1zT3SPzjuEv/images/1536.webp',
				'1728': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/-1zT3SPzjuEv/images/1728.webp',
				'1920': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/-1zT3SPzjuEv/images/1920.webp',
				default: 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/-1zT3SPzjuEv/images/1920.jpeg'
			},
			mime_type: 'image/jpeg',
			category_id: '1f0ca0db-d0fa-4b03-9703-9f152615ed0c',
			size_in_bytes: 523625,
			tags: [],
			metadata: {
				description: 'An image of a cupcake',
				custom_attributes: {}
			}
		},
		user: { id: 'user-1', role: 'User' }
	},
	sent_at: '2024-02-18T18:03:18.815Z'
}
```

<a id="asset-modified">

### Asset modified

Name: `asset.modified`\
Description: Triggered when the asset is modified.

<a id="payload-2">

#### Payload

* `workspace_id` – The identifier of the workspace for which the action was initialized.
* `asset` – The details of the modified asset.
* `asset_before_modification` – A snapshot of the asset before modification.
* `user` – The details of a user performing this action.

<a id="example-2">

#### Example

The following example presents a webhook request sent after a user modifies an asset.

```json
{
	environment_id: '6afdca1ba1e38969dea1',
	event: 'asset.modified',
	payload: {
		workspace_id: '80e839331c4d8827c474',
		asset: {
			id: '-1zT3SPzjuEv',
			name: 'Cupcake',
			extension: 'jpeg',
			url: 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/-1zT3SPzjuEv/file',
			images_urls: {
				'192': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/-1zT3SPzjuEv/images/192.webp',
				'384': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/-1zT3SPzjuEv/images/384.webp',
				'576': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/-1zT3SPzjuEv/images/576.webp',
				'768': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/-1zT3SPzjuEv/images/768.webp',
				'960': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/-1zT3SPzjuEv/images/960.webp',
				'1152': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/-1zT3SPzjuEv/images/1152.webp',
				'1344': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/-1zT3SPzjuEv/images/1344.webp',
				'1536': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/-1zT3SPzjuEv/images/1536.webp',
				'1728': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/-1zT3SPzjuEv/images/1728.webp',
				'1920': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/-1zT3SPzjuEv/images/1920.webp',
				default: 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/-1zT3SPzjuEv/images/1920.jpeg'
			},
			mime_type: 'image/jpeg',
			category_id: '1f0ca0db-d0fa-4b03-9703-9f152615ed0c',
			size_in_bytes: 523625,
			tags: [ 'foo' ],
			metadata: {
				description: 'Updated description!',
				custom_attributes: {}
			}
		},
		asset_before_modification: {
			id: '-1zT3SPzjuEv',
			name: 'Cupcake',
			extension: 'jpeg',
			url: 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/-1zT3SPzjuEv/file',
			images_urls: {
				'192': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/-1zT3SPzjuEv/images/192.webp',
				'384': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/-1zT3SPzjuEv/images/384.webp',
				'576': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/-1zT3SPzjuEv/images/576.webp',
				'768': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/-1zT3SPzjuEv/images/768.webp',
				'960': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/-1zT3SPzjuEv/images/960.webp',
				'1152': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/-1zT3SPzjuEv/images/1152.webp',
				'1344': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/-1zT3SPzjuEv/images/1344.webp',
				'1536': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/-1zT3SPzjuEv/images/1536.webp',
				'1728': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/-1zT3SPzjuEv/images/1728.webp',
				'1920': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/-1zT3SPzjuEv/images/1920.webp',
				default: 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/-1zT3SPzjuEv/images/1920.jpeg'
			},
			mime_type: 'image/jpeg',
			category_id: '1f0ca0db-d0fa-4b03-9703-9f152615ed0c',
			size_in_bytes: 523625,
			tags: [],
			metadata: {
				description: 'An image of a cupcake',
				custom_attributes: {}
			}
		},
		user: { id: 'user-1', role: 'User' }
	},
	sent_at: '2024-02-18T18:07:34.497Z'
}
```

<a id="asset-removed">

### Asset removed

Name: `asset.removed`\
Description: Triggered when the asset is removed.

<a id="payload-3">

#### Payload

* `workspace_id` – The identifier of the workspace for which the action was initialized.
* `asset` – The details of the removed asset.
* `user` – The details of a user performing this action.

<a id="example-3">

#### Example

The following example presents a webhook request sent after a user removes an asset.

```json
{
	environment_id: '6afdca1ba1e38969dea1',
	event: 'asset.removed',
	payload: {
		workspace_id: '80e839331c4d8827c474',
		asset: {
			id: '-1zT3SPzjuEv',
			name: 'Cupcake',
			extension: 'jpeg',
			url: 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/-1zT3SPzjuEv/file',
			images_urls: {
				'192': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/-1zT3SPzjuEv/images/192.webp',
				'384': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/-1zT3SPzjuEv/images/384.webp',
				'576': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/-1zT3SPzjuEv/images/576.webp',
				'768': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/-1zT3SPzjuEv/images/768.webp',
				'960': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/-1zT3SPzjuEv/images/960.webp',
				'1152': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/-1zT3SPzjuEv/images/1152.webp',
				'1344': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/-1zT3SPzjuEv/images/1344.webp',
				'1536': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/-1zT3SPzjuEv/images/1536.webp',
				'1728': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/-1zT3SPzjuEv/images/1728.webp',
				'1920': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/-1zT3SPzjuEv/images/1920.webp',
				default: 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/-1zT3SPzjuEv/images/1920.jpeg'
			},
			mime_type: 'image/jpeg',
			category_id: '1f0ca0db-d0fa-4b03-9703-9f152615ed0c',
			size_in_bytes: 523625,
			tags: [ 'foo' ],
			metadata: {
				description: 'An image of a cupcake',
				custom_attributes: {}
			}
		},
		user: { id: 'user-1', role: 'User' }
	},
	sent_at: '2024-02-18T18:09:52.989Z'
}
```

<a id="asset-copied">

### Asset copied

Name: `asset.copied`\
Description: Triggered when the asset is copied.

<a id="payload-4">

#### Payload

* `workspace_id` – The identifier of the workspace for which the action was initialized.
* `asset` – The details of the removed asset.
* `source_asset` – The details of the source asset.
* `user` – The details of a user performing this action.

<a id="example-4">

#### Example

The following example presents a webhook request sent after a user copies an asset.

```json
{
	environment_id: '6afdca1ba1e38969dea1',
	event: 'asset.copied',
	payload: {
		workspace_id: '80e839331c4d8827c474',
		asset: {
			id: 'ZXs11paEIP72',
			name: 'Cupcake',
			extension: 'jpeg',
			url: 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/ZXs11paEIP72/file',
			images_urls: {
				'192': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/ZXs11paEIP72/images/192.webp',
				'384': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/ZXs11paEIP72/images/384.webp',
				'576': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/ZXs11paEIP72/images/576.webp',
				'768': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/ZXs11paEIP72/images/768.webp',
				'960': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/ZXs11paEIP72/images/960.webp',
				'1152': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/ZXs11paEIP72/images/1152.webp',
				'1344': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/ZXs11paEIP72/images/1344.webp',
				'1536': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/ZXs11paEIP72/images/1536.webp',
				'1728': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/ZXs11paEIP72/images/1728.webp',
				'1920': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/ZXs11paEIP72/images/1920.webp',
				default: 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/ZXs11paEIP72/images/1920.jpeg'
			},
			mime_type: 'image/jpeg',
			category_id: '1f0ca0db-d0fa-4b03-9703-9f152615ed0c',
			folder_id: 'W_g4u6ZEHxuO',
			size_in_bytes: 523625,
			tags: [],
			metadata: {
				description: 'An image of a cupcake',
				custom_attributes: {}
			}
		},
		source_asset: {
			id: '_DpyO7eRxHtT',
			name: 'Cupcake',
			extension: 'jpeg',
			url: 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/_DpyO7eRxHtT/file',
			images_urls: {
				'192': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/_DpyO7eRxHtT/images/192.webp',
				'384': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/_DpyO7eRxHtT/images/384.webp',
				'576': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/_DpyO7eRxHtT/images/576.webp',
				'768': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/_DpyO7eRxHtT/images/768.webp',
				'960': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/_DpyO7eRxHtT/images/960.webp',
				'1152': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/_DpyO7eRxHtT/images/1152.webp',
				'1344': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/_DpyO7eRxHtT/images/1344.webp',
				'1536': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/_DpyO7eRxHtT/images/1536.webp',
				'1728': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/_DpyO7eRxHtT/images/1728.webp',
				'1920': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/_DpyO7eRxHtT/images/1920.webp',
				default: 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/_DpyO7eRxHtT/images/1920.jpeg'
			},
			mime_type: 'image/jpeg',
			category_id: '1f0ca0db-d0fa-4b03-9703-9f152615ed0c',
			size_in_bytes: 523625,
			tags: [],
			metadata: {
				description: 'An image of a cupcake',
				custom_attributes: {}
			}
		},
		user: { id: 'user-1', role: 'User' }
	},
	sent_at: '2024-02-18T18:29:11.602Z'
}
```

<a id="asset-overwritten">

### Asset overwritten

Name: `asset.overwritten`\
Description: Triggered when the asset’s content is overwritten.

<a id="payload-5">

#### Payload

* `workspace_id` – The identifier of the workspace for which the action was initialized.
* `asset` – The details of the overwritten asset.
* `user` – The details of a user performing this action.

<a id="example-5">

#### Example

The following example presents a webhook request sent after a user overwrites an asset.

```json
{
	environment_id: '6afdca1ba1e38969dea1',
	event: 'asset.overwritten',
	payload: {
		workspace_id: '80e839331c4d8827c474',
		asset: {
			id: '_DpyO7eRxHtT',
			name: 'Cupcake',
			extension: 'jpeg',
			url: 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/_DpyO7eRxHtT/file',
			images_urls: {
				'192': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/_DpyO7eRxHtT/images/192.webp',
				'384': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/_DpyO7eRxHtT/images/384.webp',
				'576': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/_DpyO7eRxHtT/images/576.webp',
				'768': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/_DpyO7eRxHtT/images/768.webp',
				'960': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/_DpyO7eRxHtT/images/960.webp',
				'1152': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/_DpyO7eRxHtT/images/1152.webp',
				'1344': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/_DpyO7eRxHtT/images/1344.webp',
				'1536': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/_DpyO7eRxHtT/images/1536.webp',
				'1728': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/_DpyO7eRxHtT/images/1728.webp',
				'1920': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/_DpyO7eRxHtT/images/1920.webp',
				default: 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/_DpyO7eRxHtT/images/1920.jpeg'
			},
			mime_type: 'image/jpeg',
			category_id: '1f0ca0db-d0fa-4b03-9703-9f152615ed0c',
			size_in_bytes: 203024,
			tags: [],
			metadata: {
				description: 'An image of a cupcake',
				custom_attributes: {}
			}
		},
		user: { id: 'user-1', role: 'User' }
	},
	sent_at: '2024-02-18T18:32:22.689Z'
}
```

<a id="asset-cache-invalidated">

### Asset cache invalidated

Name: `asset.cache.invalidated`\
Description: Triggered when the asset’s cache should be invalidated.

<a id="payload-6">

#### Payload

* `workspace_id` – The identifier of the workspace for which the action was initialized.
* `asset` – The details of the overwritten asset.
* `user` – The details of a user performing this action.
* `paths_to_be_invalidated` – A list of URL paths that should be invalidated.

<a id="example-6">

#### Example

The following example presents a webhook request sent after an asset’s content changes and CDN paths should be invalidated.

```json
{
	environment_id: '6afdca1ba1e38969dea1',
	event: 'asset.overwritten',
	payload: {
		workspace_id: '80e839331c4d8827c474',
		asset: {
			id: '_DpyO7eRxHtT',
			name: 'Cupcake',
			extension: 'jpeg',
			url: 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/_DpyO7eRxHtT/file',
			images_urls: {
				'192': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/_DpyO7eRxHtT/images/192.webp',
				'384': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/_DpyO7eRxHtT/images/384.webp',
				'576': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/_DpyO7eRxHtT/images/576.webp',
				'768': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/_DpyO7eRxHtT/images/768.webp',
				'960': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/_DpyO7eRxHtT/images/960.webp',
				'1152': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/_DpyO7eRxHtT/images/1152.webp',
				'1344': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/_DpyO7eRxHtT/images/1344.webp',
				'1536': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/_DpyO7eRxHtT/images/1536.webp',
				'1728': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/_DpyO7eRxHtT/images/1728.webp',
				'1920': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/_DpyO7eRxHtT/images/1920.webp',
				default: 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/_DpyO7eRxHtT/images/1920.jpeg'
			},
			mime_type: 'image/jpeg',
			category_id: '1f0ca0db-d0fa-4b03-9703-9f152615ed0c',
			size_in_bytes: 203024,
			tags: [],
			metadata: {
				description: 'An image of a cupcake',
				custom_attributes: {}
			}
		},
		paths_to_be_invalidated: ['https://cdn.ckbox.dev/6afdca1ba1e38969dea1/assets/_DpyO7eRxHtT/images/192.webp']
		user: { id: 'user-1', role: 'User' }
	},
	sent_at: '2024-02-18T18:32:22.689Z'
}
```

<a id="asset-revision-changed">

### Asset revision changed

Name: `asset.revision.changed`\
Description: Triggered whenever an asset revision is restored as the current one.

<a id="payload-7">

#### Payload

* `workspace_id` – The identifier of the workspace for which the action was initialized.
* `asset` – The details of the asset whose current revision has changed.
* `revision` – The details of the revision that has been restored as the current one.
* `user` – The details of a user performing this action.

<a id="example-7">

#### Example

The following example presents a webhook request sent after a user restores a historical revision of an asset as the current one.

```json
{
	environment_id: '6afdca1ba1e38969dea1',
	event: 'asset.revision.changed',
	payload: {
		workspace_id: '80e839331c4d8827c474',
		asset: {
			id: '_DpyO7eRxHtT',
			name: 'Cupcake',
			extension: 'jpeg',
			url: 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/_DpyO7eRxHtT/file',
			images_urls: {
				'192': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/_DpyO7eRxHtT/images/192.webp',
				'384': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/_DpyO7eRxHtT/images/384.webp',
				'576': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/_DpyO7eRxHtT/images/576.webp',
				'768': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/_DpyO7eRxHtT/images/768.webp',
				'960': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/_DpyO7eRxHtT/images/960.webp',
				'1152': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/_DpyO7eRxHtT/images/1152.webp',
				'1344': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/_DpyO7eRxHtT/images/1344.webp',
				'1536': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/_DpyO7eRxHtT/images/1536.webp',
				'1728': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/_DpyO7eRxHtT/images/1728.webp',
				'1920': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/_DpyO7eRxHtT/images/1920.webp',
				default: 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/_DpyO7eRxHtT/images/1920.jpeg'
			},
			mime_type: 'image/jpeg',
			category_id: '1f0ca0db-d0fa-4b03-9703-9f152615ed0c',
			size_in_bytes: 523625,
			tags: [],
			metadata: {
				description: 'An image of a cupcake',
				custom_attributes: {}
			}
		},
		revision: {
			id: 'rev_8aZQpL2xV3',
			created_at: '2024-02-15T10:14:22.318Z',
			created_by: 'user-1'
		},
		user: { id: 'user-2', role: 'User' }
	},
	sent_at: '2024-02-18T18:45:12.501Z'
}
```

<a id="asset-revision-removed">

### Asset revision removed

Name: `asset.revision.removed`\
Description: Triggered whenever an asset revision is removed from the history.

<a id="payload-8">

#### Payload

* `workspace_id` – The identifier of the workspace for which the action was initialized.
* `asset` – The details of the asset whose revision has been removed.
* `revision` – The details of the revision that has been removed.
* `user` – The details of a user performing this action.

<a id="example-8">

#### Example

The following example presents a webhook request sent after a user removes a historical revision of an asset.

```json
{
	environment_id: '6afdca1ba1e38969dea1',
	event: 'asset.revision.removed',
	payload: {
		workspace_id: '80e839331c4d8827c474',
		asset: {
			id: '_DpyO7eRxHtT',
			name: 'Cupcake',
			extension: 'jpeg',
			url: 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/_DpyO7eRxHtT/file',
			images_urls: {
				'192': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/_DpyO7eRxHtT/images/192.webp',
				'384': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/_DpyO7eRxHtT/images/384.webp',
				'576': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/_DpyO7eRxHtT/images/576.webp',
				'768': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/_DpyO7eRxHtT/images/768.webp',
				'960': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/_DpyO7eRxHtT/images/960.webp',
				'1152': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/_DpyO7eRxHtT/images/1152.webp',
				'1344': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/_DpyO7eRxHtT/images/1344.webp',
				'1536': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/_DpyO7eRxHtT/images/1536.webp',
				'1728': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/_DpyO7eRxHtT/images/1728.webp',
				'1920': 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/_DpyO7eRxHtT/images/1920.webp',
				default: 'https://ckbox.dev/6afdca1ba1e38969dea1/assets/_DpyO7eRxHtT/images/1920.jpeg'
			},
			mime_type: 'image/jpeg',
			category_id: '1f0ca0db-d0fa-4b03-9703-9f152615ed0c',
			size_in_bytes: 523625,
			tags: [],
			metadata: {
				description: 'An image of a cupcake',
				custom_attributes: {}
			}
		},
		revision: {
			id: 'rev_8aZQpL2xV3',
			created_at: '2024-02-15T10:14:22.318Z',
			created_by: 'user-1',
		},
		user: { id: 'user-2', role: 'User' }
	},
	sent_at: '2024-02-18T18:48:03.224Z'
}
```

<a id="folders">

## Folders

The following events can be triggered for folders in CKBox.

<a id="folder-created">

### Folder created

Name: `folder.created`\
Description: Triggered when a folder is created.

<a id="payload-9">

#### Payload

* `workspace_id` – The identifier of the workspace for which the action was initialized.
* `folder` – The details of the created folder.
* `user` – The details of a user performing this action

<a id="example-9">

#### Example

The following example presents a webhook request sent after a user creates a folder.

```json
{
	environment_id: '6afdca1ba1e38969dea1',
	event: 'folder.created',
	payload: {
		workspace_id: '80e839331c4d8827c474',
		folder: {
			id: 'hr8zl8N_8-un',
			name: 'Folder',
			category_id: '957165c8-bb91-4792-922d-72c572b5b12d'
		},
		user: { id: 'user-1', role: 'User' }
	},
	sent_at: '2024-02-18T18:41:37.953Z'
}
```

<a id="folder-modified">

### Folder modified

Name: `folder.modified`\
Description: Triggered when the folder is modified.

<a id="payload-10">

#### Payload

* `workspace_id` – The identifier of the workspace for which the action was initialized.
* `folder` – The details of the modified folder.
* `user` – The details of a user performing this action

<a id="example-10">

#### Example

The following example presents a webhook request sent after a user modifies the folder.

```json
{
	environment_id: '6afdca1ba1e38969dea1',
	event: 'folder.modified',
	payload: {
		workspace_id: '80e839331c4d8827c474',
		folder: {
			id: 'hr8zl8N_8-un',
			name: 'Images',
			category_id: '957165c8-bb91-4792-922d-72c572b5b12d'
		},
		user: { id: 'user-1', role: 'User' }
	},
	sent_at: '2024-02-18T18:42:42.351Z'
}
```

<a id="folder-removed">

### Folder removed

Name: `folder.removed`\
Description: Triggered when the folder is removed.

<a id="payload-11">

#### Payload

* `workspace_id` – The identifier of the workspace for which the action was initialized.
* `folder` – The details of the removed folder.
* `user` – The details of a user performing this action

<a id="example-11">

#### Example

The following example presents a webhook request sent after a user removes the folder.

```json
{
	environment_id: '6afdca1ba1e38969dea1',
	event: 'folder.removed',
	payload: {
		workspace_id: '80e839331c4d8827c474',
		folder: {
			id: 'hr8zl8N_8-un',
			name: 'Images',
			category_id: '957165c8-bb91-4792-922d-72c572b5b12d'
		},
		user: { id: 'user-1', role: 'User' }
	},
	sent_at: '2024-02-18T18:43:30.861Z'
}
```

<a id="next-steps">

## Next steps

* [Learn how to manage webhooks](management.md).
* [Read more about testing webhooks in a dedicated article](testing.md).
* [Check the list of events available in CKBox](events.md).

---

Full index of the CKBox documentation: [llms.txt](../../../llms.txt)
