Skip to main content
POST
Move file

Authorizations

Authorization
string
header
required

Use a JWT bearer token or a Veryfront API key in the Authorization header.

Path Parameters

project_reference
string
required

Project slug, UUID, or domain that identifies the project.

file_path
string
required

Current file path (URL-encoded, for example, pages%2Findex.mdx).

Query Parameters

ref
string

Mutable content to address: main or branch:. Omit for main. Release and environment selectors return 400. Supplied aliases must name the same content.

Example:

"branch:feature-x"

branch
string

Branch name or ID; legacy alias for ref=branch:. Supplied aliases must agree.

branch_id
string<uuid>

Branch UUID; legacy alias for ref=branch:. Supplied aliases must agree.

Body

application/json
destination_path
string
required

Destination file path. The source receives a deletion version and the destination receives a new file ID derived from its path; immutable history remains.

Minimum string length: 1
expected_version_id
string

Expected source version observed by the caller; a stale version returns 409. The move also fences its captured source version and requires an absent destination.

Response

The file at its new path.

id
string | null
required

File ID, or null when the content source supplies none.

path
string
required

Project-relative source path.

version_id
string | null

Current version ID, or null when the content source supplies none.

type
enum<string>

File kind: page, function, component or file.

Available options:
page,
function,
component,
file
content
string

Full text content.

size_bytes
number

Size of the content encoded as UTF-8, in bytes.

binary
object
checksum
string | null

SHA-256 content hash, or null when unavailable.

updated_at
string

Last content update time, RFC 3339.