Rename a file or folder at the specified path.
curl -X PUT "https://storage.cludz.net/storage/{uuid}/documents/old-name.pdf" \
-H "Token: YOUR_STORAGE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"new_name": "new-name.pdf"}'
| Field | Type | Description |
|---|---|---|
new_name | string | New file/folder name (max 50 chars) |
{
"statusCode": 200,
"message": "Renamed successfully"
}
When renaming a folder, all nested files and subfolders are automatically updated:
curl -X PUT "https://storage.cludz.net/storage/{uuid}/old-folder/" \
-H "Token: YOUR_STORAGE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"new_name": "new-folder"}'
/ * ? < > | : " \ ' are removed_Rename operations require an active subscription:
{
"statusCode": 403,
"message": "Subscription expired. Please renew to modify files."
}
| Status | Message |
|---|---|
400 | Invalid name |
400 | Invalid JSON body |
401 | Authentication required |
403 | No write permission |
403 | Subscription expired |
409 | Destination already exists |
500 | Failed to rename file system object |
const response = await fetch('https://storage.cludz.net/storage/{uuid}/docs/old-file.pdf', {
method: 'PUT',
headers: {
'Token': 'YOUR_STORAGE_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
new_name: 'renamed-file.pdf'
})
});
import requests
response = requests.put(
'https://storage.cludz.net/storage/{uuid}/docs/old-file.pdf',
headers={
'Token': 'YOUR_STORAGE_TOKEN',
'Content-Type': 'application/json'
},
json={'new_name': 'renamed-file.pdf'}
)