Skip to main content

Endpoint

POST /storage/{path}/copy
Auth: API Key required
Folders cannot be copied, only files. To copy a folder, copy its files individually.

Path parameters

path
string
required
Path to the file relative to the storage root. Use the id from List Storage.photo.jpg · photos/portrait.jpg

Body parameters

destination
string
Path to the destination folder, relative to the storage root. Omit or leave empty to copy into the same folder as the source.archive · photos/2024

Response

{
  "success": true,
  "path": "photos/portrait copy.jpg"
}
success
boolean
true if the copy succeeded.
path
string
The path of the new copy. If a file already exists at the target name, a unique name is generated automatically (e.g. portrait copy.jpg, portrait copy (1).jpg).
Status codes: 200 success · 404 not found · 500 error

Example

curl -X POST http://localhost:3000/storage/photos/portrait.jpg/copy \
  -H "Authorization: Bearer <api_key>" \
  -H "Content-Type: application/json" \
  -d '{"destination": "archive"}'

Move File or Folder

Move instead of duplicating.

List Storage

Browse all files and folders.