Skip to main content
PUT
Replace a pending file draft

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.

branchName
string
required

Branch name

filePath
string
required

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

Body

application/json
content
string
required

Full pending source-file body; empty strings are valid.

expected_draft_version
integer | null

Expected current draft sequence, not a committed version ID. 0 requires no prior draft; a stale value returns 409. Omit/null for an unconditional full-body replacement.

Required range: 0 <= x <= 2147483647

Response

Persisted pending draft

path
string
required
content
string
required
updated_at
string
required
file_id
string
version
integer

Current pending draft sequence; resets after commit/discard. Use as expected_draft_version for a guarded draft write.

Required range: x >= 1
entity_type
enum<string>

Canonical source-file type.

Available options:
page,
component,
function,
virtual_file