DeluxHostAPI Reference
Storage files

Copy a file or folder

POST
/v1/services/{orderId}/storage/files/copy

Copies inside the live box; symlinks and special files are skipped. Needs a storage node agent with copy support (otherwise 400, details.code agent_outdated).

Authorization

apiToken storage:files:write
headerAuthorizationBearer <token>

A personal API token: Authorization: Bearer dh_live_…. See Authentication for scopes.

Scope: storage:files:write

Path Parameters

orderId*number

Request Body

application/json
  1. body
overwrite?boolean

Replace 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).

from*string
to*string

Response Body

Operation completed or accepted; asynchronous actions may still be running.

application/json
  1. response
copied*boolean
from*string
to*string
bytes*number
entries*number
curl -X POST 'https://api.deluxhost.net/v1/services/0/storage/files/copy' \  -H "Authorization: Bearer $DELUXHOST_TOKEN" \  -H 'Content-Type: application/json' \  -d '{  "from": "string",  "to": "string"}'
Example Response
{  "copied": true,  "from": "string",  "to": "string",  "bytes": 0,  "entries": 0}