Write file

http
PUT /projects/{project_reference}/files/{file_path}

Create a file or replace its content. Requires project.files.write.

Parameters

NameInRequiredDescription
project_referencepathYes
file_pathpathYes
refquery
branchquery
branch_idquery

Request body

FieldTypeRequiredDescription
contentstringYesReplacement textual content in main or the selected branch, stored as a new immutable version. Source-file MIME type is not writable.
expected_checksumstringExpected current checksum when updating an existing file; ignored on creation. Omission disables this guard.
expected_version_idstringExpected current version ID when updating an existing file; ignored on creation. Omission disables this guard.
metadataobjectOptional durable file-version metadata for source provenance; service-owned visibility keys are rejected.
expected_absentbooleanTrue requires absence atomically when creating; an existing file returns 409. False or omission retains upsert behavior.

Responses

StatusDescription
200File updated successfully
201File created successfully
400Bad request
401Unauthorized
403Forbidden
404Not found
409Conflict
500Server error