# ImageKit

ImageKit.io is a comprehensive media management solution offering real-time image and video optimization, transformation, and delivery through a global content delivery network (CDN).

- **Category:** images & design
- **Auth:** API_KEY
- **Composio Managed App Available?** N/A
- **Tools:** 26
- **Triggers:** 0
- **Slug:** `IMAGEKIT_IO`
- **Version:** 20260227_00

## Tools

### Bulk Job Status

**Slug:** `IMAGEKIT_IO_BULK_JOB_STATUS`

Retrieve the status of a bulk folder operation. Use this tool to monitor the progress of asynchronous Copy Folder or Move Folder operations by providing the jobId returned from those operations.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `jobId` | string | Yes | The unique identifier (jobId) returned by bulk operations like Copy Folder or Move Folder. Use this to track the progress of asynchronous folder operations. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Bulk Move Files

**Slug:** `IMAGEKIT_IO_BULK_MOVE_FILES`

Tool to move multiple files in bulk. Use when you need to relocate up to 100 ImageKit files to a specified folder in one API call.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `fileIds` | array | Yes | List of ImageKit file IDs to move. Maximum 100 file IDs per request. These are unique identifiers obtained from list assets or file upload responses. |
| `destinationPath` | string | Yes | Destination folder path where files should be moved. Must start with '/' (e.g., '/new-folder/', '/images/archive/'). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Bulk Remove Tags

**Slug:** `IMAGEKIT_IO_BULK_REMOVE_TAGS`

Tool to remove tags from multiple files in bulk. Use when you need to strip specified tags from up to 50 existing files in one API call.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `tags` | array | Yes | List of tag names to remove from the specified files. Tags that do not exist on a file will be silently ignored. |
| `fileIds` | array | Yes | List of unique file IDs from which to remove the specified tags. You can specify up to 50 file IDs in a single request. Use the 'List and Search Assets' action to find file IDs. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Copy Folder

**Slug:** `IMAGEKIT_IO_COPY_FOLDER`

Initiate an asynchronous bulk copy of a folder and all its contents to a new location. Use this tool when you need to: - Duplicate an entire folder structure including all nested files and subfolders - Create a backup of a folder at a different location - Copy a folder with or without file version history This is an asynchronous operation that returns immediately with a job ID. The actual copy happens in the background. Use IMAGEKIT_IO_BULK_JOB_STATUS with the returned jobId to check when the operation completes. Note: If a folder with the same name exists at the destination, permissions from the existing destination folder will be preserved.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `destinationPath` | string | Yes | The destination path where the folder will be copied to (e.g., '/backup'). The source folder will be copied inside this path. |
| `includeVersions` | boolean | No | Whether to include all file versions in the copy. If true, all versions of each file are copied. Defaults to false (only current versions). |
| `sourceFolderPath` | string | Yes | The full path of the source folder to copy (e.g., '/images/banners'). Must start with '/'. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Custom Metadata Field

**Slug:** `IMAGEKIT_IO_CREATE_CUSTOM_METADATA_FIELD`

Create a new custom metadata field in ImageKit DAM. Use this tool to define custom metadata fields that can be attached to assets (images, videos, etc.) in your ImageKit media library. Once created, you can assign values to these fields on individual assets for better organization and searchability. Supported field types: - Text/Textarea: For string values with optional length constraints - Number: For numeric values with optional min/max constraints - Date: For ISO8601 date strings with optional date range constraints - Boolean: For true/false values - SingleSelect/MultiSelect: For predefined options (requires selectOptions) Note: Field names must be unique across all fields (including deleted ones). Field types cannot be changed after creation.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | Yes | Unique identifier name for the field, used in API operations. Must be unique across all custom metadata fields including deleted ones. Use lowercase letters, numbers, and underscores (e.g., 'product_price', 'category'). |
| `label` | string | Yes | Human-readable display label shown in the ImageKit dashboard UI. Must be unique across all non-deleted fields. Example: 'Product Price', 'Category', 'SKU'. |
| `schema` | object | Yes | Schema configuration defining the field's data type, constraints, and validation rules. The type determines which other properties are applicable. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Folder

**Slug:** `IMAGEKIT_IO_CREATE_FOLDER`

Creates a new folder in ImageKit.io media library. Use this to organize assets into structured folder hierarchies. The folder will be created at the specified parent path. If the parent folder doesn't exist, the API will return an error.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `folderName` | string | Yes | Name of the new folder to create. Must be a valid folder name without path separators. Example: 'my-images', 'product_photos'. |
| `parentFolderPath` | string | Yes | Absolute path of the parent folder where the new folder will be created. Use '/' for root directory, or specify a path like '/images' or '/assets/uploads'. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Custom Metadata Field

**Slug:** `IMAGEKIT_IO_DELETE_CUSTOM_METADATA_FIELD`

Permanently deletes a custom metadata field from ImageKit. This action is irreversible. Note: Even after deletion, you cannot create a new field with the same name. Use 'List Custom Metadata Fields' first to get the field ID if needed. Rate limit: 5 requests/second for custom metadata field operations.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `fieldId` | string | Yes | The unique ID of the custom metadata field to delete. Obtain this ID from the 'List Custom Metadata Fields' action or from the response when creating a field. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete File

**Slug:** `IMAGEKIT_IO_DELETE_FILE`

Permanently deletes a file from ImageKit by its unique file ID. WARNING: This action is irreversible. The file and all its versions will be permanently removed. Note: Cached versions of the file may still be served until the cache expires. Use the purge cache endpoint if immediate removal from CDN is required. Use this tool when you need to: - Remove unwanted or obsolete files from the media library - Clean up test uploads - Delete files that should no longer be accessible The file ID can be obtained from the 'List and Search Assets' or 'Upload File' actions.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `fileId` | string | Yes | The unique ID of the file to delete. This `fileId` is returned by the upload and list assets APIs. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete File Version

**Slug:** `IMAGEKIT_IO_DELETE_FILE_VERSION`

Permanently deletes a specific non-current file version from ImageKit.io. Use this when you need to remove an older version of a file while keeping the current version intact. Note: This action is irreversible. To delete all versions of a file, use the Delete File action instead.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `fileId` | string | Yes | The unique identifier of the file. This can be obtained from the List and Search Assets API or the Upload API response. |
| `versionId` | string | Yes | The unique identifier of the specific file version to delete. Obtain this from the List File Versions API. Note: Cannot delete the current (latest) version - use Delete File for that. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Folder

**Slug:** `IMAGEKIT_IO_DELETE_FOLDER`

Permanently delete a folder and all its contents from ImageKit Media Library. WARNING: This is a destructive operation that cannot be undone. All files and subfolders within the specified folder will be permanently removed. Use this when you need to: - Remove an entire folder structure - Clean up unused folders - Delete test/temporary folders The operation is idempotent - deleting a non-existent folder will not raise an error.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `folderPath` | string | Yes | Full path of the folder to delete, starting from the root of your ImageKit Media Library. Must not be empty. Example: 'images/uploads' or '/images/uploads'. The folder and ALL its contents (files and subfolders) will be permanently deleted. This operation cannot be undone. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Multiple Files

**Slug:** `IMAGEKIT_IO_DELETE_MULTIPLE_FILES`

Permanently delete multiple files from ImageKit media library in a single batch operation. Use this tool when you need to: - Remove up to 100 files at once by their unique file IDs - Clean up unused assets from your media library - Bulk delete files after migration or reorganization Important notes: - Deletion is permanent and includes all file versions - Cached CDN responses are NOT automatically purged (use Purge Cache action if needed) - File IDs can be obtained from 'List and Search Assets' or upload responses Returns the list of successfully deleted file IDs. On partial success (some files deleted, some failed), also returns an errors array with per-file failure details.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `fileIds` | array | Yes | Array of unique file IDs to delete. Each fileId can be obtained from the 'List and Search Assets' action or from upload responses. Maximum 100 file IDs per request. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Upload Authentication Parameters

**Slug:** `IMAGEKIT_IO_GET_AUTHENTICATION_PARAMETERS`

Tool to generate authentication parameters for client-side file uploads. Use when preparing client-side uploads.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `token` | string | No | Optional one-time token; if not provided, a UUID4 will be generated |
| `expireIn` | integer | No | Expiration time in seconds for the signature (max 3600) |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get File Details

**Slug:** `IMAGEKIT_IO_GET_FILE_DETAILS`

Tool to retrieve details of a specific file. Use after uploading or listing assets to get full metadata.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `fileId` | string | Yes | The unique fileId of the uploaded file; returned by list, search, or upload APIs. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get File Metadata

**Slug:** `IMAGEKIT_IO_GET_FILE_METADATA`

Tool to retrieve metadata of an uploaded file. Use after confirming a successful upload to get EXIF, pHash, dimensions, and other image metadata.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `fileId` | string | Yes | Unique ID of the uploaded file (returned by upload or list APIs). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get File Version Details

**Slug:** `IMAGEKIT_IO_GET_FILE_VERSION_DETAILS`

Tool to retrieve details of a specific file version. Use after listing or uploading assets when you need to inspect version metadata.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `fileId` | string | Yes | Unique fileId of the uploaded file; returned by list, search, or upload APIs. |
| `versionId` | string | Yes | Unique versionId of the specific file version to retrieve. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Usage

**Slug:** `IMAGEKIT_IO_GET_USAGE`

Retrieve ImageKit account usage metrics for a specified date range. Returns bandwidth consumption and media library storage usage. The response includes data from startDate up to (but not including) endDate. Maximum allowed date range is 90 days.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `endDate` | string | Yes | End date in YYYY-MM-DD format. Must be after startDate. Data returned excludes the end date. Maximum date range is 90 days. |
| `startDate` | string | Yes | Start date in YYYY-MM-DD format. Must be before endDate. Maximum date range is 90 days. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List and Search Media Assets

**Slug:** `IMAGEKIT_IO_LIST_AND_SEARCH_ASSETS`

List and search media assets (files, folders, file-versions) in your ImageKit media library. Use this tool to: - Browse all assets with optional pagination (limit/skip) - Filter by type (file, folder, file-version, or all) - Filter by name, tags, or file type (image/non-image) - Search with advanced Lucene-style queries (e.g., 'size > 1000000 AND tags IN ["banner"]') - Sort results by name, date, size, or dimensions Returns a list of asset objects with metadata including URLs, dimensions, tags, and timestamps.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | No | Filter assets by exact name match. Ignored when 'searchQuery' is provided. |
| `path` | string | No | Folder path to limit search scope. Must start and end with '/' (e.g., '/images/banners/'). |
| `skip` | integer | No | Number of results to skip for pagination. Defaults to 0. |
| `sort` | string ("ASC_NAME" | "DESC_NAME" | "ASC_CREATED" | "DESC_CREATED" | "ASC_UPDATED" | "DESC_UPDATED" | "ASC_HEIGHT" | "DESC_HEIGHT" | "ASC_WIDTH" | "DESC_WIDTH" | "ASC_SIZE" | "DESC_SIZE") | No | Sort order for results. Options include sorting by name, creation date, update date, dimensions, or file size in ascending/descending order. |
| `tags` | string | No | Comma-separated list of tags to filter by. Assets matching ANY of the tags are returned. Ignored when 'searchQuery' is provided. |
| `type` | string ("file" | "file-version" | "folder" | "all") | No | Filter by asset type: 'file' (default), 'file-version', 'folder', or 'all'. |
| `limit` | integer | No | Maximum number of results to return (1-1000). Defaults to 10 if not specified. |
| `fileType` | string ("all" | "image" | "non-image") | No | Filter by media type: 'all' (default), 'image' (images only), or 'non-image' (videos, documents, etc.). |
| `searchQuery` | string | No | Advanced Lucene-style query string for filtering. Supports operators like =, <, >, IN, AND, OR. Example: 'createdAt > "7d" AND tags IN ["banner"]'. When provided, 'type', 'name', and 'tags' parameters are ignored. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Custom Metadata Fields

**Slug:** `IMAGEKIT_IO_LIST_CUSTOM_METADATA_FIELDS`

List all custom metadata fields defined in the ImageKit Media Library. Use this tool to: - Retrieve all metadata field definitions (name, label, type, constraints) - Get field IDs required for updating or deleting fields - View field configurations (required, default values, select options) - Include soft-deleted fields when needed for auditing

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `includeDeleted` | boolean | No | Set to true to include deleted metadata fields in the response. Deleted fields will have isDeleted=true. Defaults to false. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List File Versions

**Slug:** `IMAGEKIT_IO_LIST_FILE_VERSIONS`

Retrieves all versions of a specific file in ImageKit. Returns a list of file version objects including metadata like version ID, creation date, and publication status. Use this to view file history, compare versions, or find a specific version to restore. Requires a valid fileId which can be obtained from the List Assets API or Upload API response.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `fileId` | string | Yes | The unique fileId of the file whose versions you want to retrieve. You can get this ID from the List Assets API or the Upload API response. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Move Folder

**Slug:** `IMAGEKIT_IO_MOVE_FOLDER`

Move a folder from one location to another in your ImageKit media library. This operation is asynchronous - it returns a jobId immediately, and the actual move happens in the background. The folder will be moved to become a subfolder of the destination path. Use IMAGEKIT_IO_BULK_JOB_STATUS with the returned jobId to check if the move has completed. Example: Moving '/photos/summer' to '/archive' will result in '/archive/summer'.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `destinationPath` | string | Yes | Absolute path of the destination parent folder where the source folder will be moved into. Must start with '/' (e.g., '/images/dest-folder'). Use '/' to move to root. |
| `sourceFolderPath` | string | Yes | Absolute path of the source folder to move. Must start with '/' (e.g., '/images/source-folder'). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Purge ImageKit Cache

**Slug:** `IMAGEKIT_IO_PURGE_CACHE`

Purge CDN and ImageKit internal caches for a specific URL or URL pattern. Use this action when you need to: - Invalidate cached content after updating an image - Force CDN to fetch the latest version of a file - Clear cache for a directory using wildcard (*) Note: Cache purging is asynchronous. Use the returned requestId with IMAGEKIT_IO_PURGE_STATUS to check completion. Monthly purge limits apply based on your pricing plan (typically 1000 URLs/month).

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `url` | string | Yes | Full ImageKit URL to purge from CDN and internal caches. Must be a complete URL starting with https://ik.imagekit.io/. Supports trailing wildcard (*) ONLY if ANY ONE of these conditions is met: (1) Path has 2+ levels of nesting (e.g., '/folder/subfolder/*'), OR (2) Path is 15+ characters long (excluding imagekit ID), OR (3) URL ends with complete filename.ext* (e.g., 'image.jpg*'). Wildcards within the path (e.g., '/folder/*/file.jpg') are NOT supported. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Check purge cache status

**Slug:** `IMAGEKIT_IO_PURGE_STATUS`

Tool to check the status of a cache purge request. Use after initiating a purge to retrieve its current state. Example: "What's the status of purge request id abc123?"

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `requestId` | string | Yes | The unique purge request ID returned by the IMAGEKIT_IO_PURGE_CACHE action. This is a 24-character hexadecimal string (e.g., '697f89468b615a27030736c3') used to track the cache purge operation. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Rename File

**Slug:** `IMAGEKIT_IO_RENAME_FILE`

Renames an existing file in the ImageKit media library. Use this action when you need to change a file's name. Important: Old URLs will stop working after rename (unless CDN cache is active). This operation renames all file versions. Set purgeCache=True to clear CDN cached content for the old URL. Returns 404 if file not found, 409 if a file with the new name already exists in the same folder.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `filePath` | string | Yes | The full path of the file to rename in the media library, including any folder path. Must start with '/'. Example: '/images/logo.jpg' or '/folder/subfolder/image.png'. |
| `purgeCache` | boolean | No | Whether to purge CDN cache for the old file URLs. When True, a purge request is issued (counts against monthly purge quota). Cache is only purged for the current file version. Default: False. |
| `newFileName` | string | Yes | The new name for the file including the file extension. This is just the filename, not a path. Example: 'new-logo.jpg' or 'renamed_document.pdf'. Note: Old URLs will stop working after rename. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Restore File Version

**Slug:** `IMAGEKIT_IO_RESTORE_FILE_VERSION`

Restores a non-current file version to become the current version in ImageKit. Use this to revert a file to a previous state. First use the List File Versions API to find the versionId of the version you want to restore.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `fileId` | string | Yes | The unique fileId of the file whose version you want to restore. Obtainable from list files API or upload response. |
| `versionId` | string | Yes | The unique versionId of the non-current file version to restore as the current version. Obtainable from versionInfo.id in the list file versions API response. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Custom Metadata Field

**Slug:** `IMAGEKIT_IO_UPDATE_CUSTOM_METADATA_FIELD`

Updates an existing custom metadata field's label or schema constraints in ImageKit DAM. Use this to: - Change the display label of a metadata field - Update validation constraints (min/max values, min/max length) - Set or modify the default value - Change whether the field is required Note: The field type and name cannot be changed after creation. At least one of 'label' or 'schema' must be provided in the request.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `label` | string | No | New display label for the custom metadata field. This is the human-readable name shown in the UI. |
| `schema` | object | No | Schema updates for a custom metadata field. At least one property must be provided. Use minValue/maxValue for Number or Date type fields, and minLength/maxLength for Text/Textarea fields. |
| `fieldId` | string | Yes | Unique identifier of the custom metadata field to update. Obtain this from the List Custom Metadata Fields API. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update File Details

**Slug:** `IMAGEKIT_IO_UPDATE_FILE_DETAILS`

Update file details in ImageKit media library. Use this tool to modify tags, custom coordinates, custom metadata, AI tags, apply extensions (like background removal), or change publication status. Note: When updating publication status via 'publish', no other parameters can be included in the request.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `tags` | array | No | Array of tags to set on the file. This replaces all existing tags. Use an empty array to remove all tags. |
| `fileId` | string | Yes | The unique fileId of the uploaded file. Obtain this from list, search, or upload APIs. |
| `publish` | object | No | Options for controlling file publication status. |
| `extensions` | array | No | Extensions to apply, such as background removal or auto-tagging. Each object must have 'name' (e.g., 'remove-bg', 'google-auto-tagging') and optionally 'options'. |
| `webhookUrl` | string | No | URL to receive webhook notifications when async extensions complete. Must be a valid HTTPS URL. |
| `removeAITags` | array | No | List of AI-generated tags to remove from the file. The tags must exactly match existing AI tags. |
| `customMetadata` | object | No | Key-value pairs for custom metadata fields. Keys must match pre-defined custom metadata field names. |
| `customCoordinates` | string | No | Define the area of interest in the image as 'x,y,width,height'. Used for smart cropping. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |
