Restore file version
put
https://api.imagekit.io
/v1/files/:fileId/versions/:versionId/restore
Restore file version API

Response structure and status code (application/JSON)

In case of an error, you will get an error code along with the error message. On success, you will receive a 200 status code with the file object in JSON-encoded response body.

Examples

Here is the example request to understand the API usage.
cURL
1
# The unique fileId and versionId of the uploaded file. fileId and versionId (versionInfo.id) is returned in response of list files API and upload API.
2
curl -X PUT "https://api.imagekit.io/v1/files/fileId/versions/versionId/restore" \
3
-u your_private_api_key:
Copied!