ImageKit icon

ImageKit

Interact with the ImageKit API

File → Rename

AI-generated

Summary

Rename a file by specifying its existing full path and a new file name, with the option to purge the CDN cache for the old file URL.

Inputs

  • File Path (required) — The full path of the file to rename (e.g. /path/to/file.jpg)
  • New File Name (required) — The new name for the file
  • Purge Cache — Whether to purge CDN cache for the old file URL; defaults to true

Output shape

a single record containing the renamed file details

Performs a PUT request to the /v1/files/rename endpoint. Returns the API response as a JSON object.

Links

Discussion