Rename a file or folder
POST
apiToken storage:files:writeheader
AuthorizationBearer <token>A personal API token: Authorization: Bearer dh_live_…. See Authentication for scopes.
Scope: storage:files:write
orderId*numberapplication/json- body
overwrite?booleanReplace an existing item of the same kind (file over file, folder over folder). Without it an existing destination is a 409 with details.code already_exists; a file and a folder never replace each other (409, type_mismatch).
oldPath*stringnewPath*stringOperation completed or accepted; asynchronous actions may still be running.
application/json- response
renamed*booleanoldPath*stringnewPath*stringcurl -X POST 'https://api.deluxhost.net/v1/services/0/storage/files/rename' \ -H "Authorization: Bearer $DELUXHOST_TOKEN" \ -H 'Content-Type: application/json' \ -d '{ "oldPath": "string", "newPath": "string"}'Example Response
{ "renamed": true, "oldPath": "string", "newPath": "string"}