Digital Asset Management (DAM)
Managing assets
Rename file
You can rename an already existing file in the media library using rename file API. This operation would rename all file versions of the file.
Note: The old URLs will stop working. The file/file version URLs cached on CDN will continue to work unless a purge is requested.
put/v1/files/rename
Request body
Example request
{
"filePath": "/path/to/file.jpg",
"newFileName": "newFileName.jpg",
"purgeCache": true
}Response
On success, you will receive purgeRequestId in the response body, which can be used to get the purge request status. This is only sent if the purgeCache is set to true in the request. Otherwise, the response is an empty JSON.