Skip to main content
PUT
Upsert project 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

file_path
string
required

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
content
string
required

File content

expected_checksum
string

Expected current checksum when updating an existing file; ignored on creation. Omission disables this guard.

expected_version_id
string

Expected current version ID when updating an existing file; ignored on creation. Omission disables this guard.

expected_absent
boolean

True requires absence atomically when creating; an existing file returns 409. False or omission retains upsert behavior.

Response

File updated successfully

id
string
required

Path-derived file identifier.

path
string
required

Normalized stored file path.

content
string
required

Text supplied by this write request.

size
number
required

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

updated_at
string
required

Response timestamp for the successful update.