Storage

Copy a file to a new path

Copies a file from fromPath to toPath within the same project bucket. The original file is preserved. Returns the FileObject of the newly created copy including its metadata.

Compatible with the Supabase Storage copy API.

Server only: requires the project's secret key (or service token). End-user tokens and publishable keys get 403 — a copy could plant a file at any path.

post/api/storage/{project_id}/copy

Request

  • Base URL
    https://core.blink.new
  • URL
    https://core.blink.new/api/storage/{project_id}/copy
  • Auth
    HTTP bearer

Path parameters

project_idstring required
Example:my-project-123

Unique identifier for the project

Request body

fromPathstring required

Source file path relative to the project bucket root

toPathstring required

Destination file path relative to the project bucket root

Example request

{
  "fromPath": "uploads/original.pdf",
  "toPath": "archive/original-copy.pdf"
}

Response

File copied successfully

Changes

No recorded changes to this operation across all 1 revision of this API.