Update a file. Requires project.files.write.
Arguments
inputUpdateFileInput!requiredinput.filePathString!requiredinput.contentString!requiredReplacement textual content in main or the selected branch, stored as a new immutable version. Source-file MIME type is not writable.
input.expectedChecksumStringExpected current content checksum. Null or omission disables this guard.
input.expectedVersionIdStringExpected current version ID. Null or omission disables this guard.
input.refStringCanonical content selector: main, branch:<name-or-id>, release:<version> or env:<name>. An unresolvable reference is rejected; it never falls back to main. A release or environment is read-only, so a write addressed to one is refused rather than applied elsewhere.
input.branchIdStringLegacy alias for ref=branch:<value>. Supplying both is accepted when they name the same content and rejected when they do not.
Responses
mutation UpdateFile($input: UpdateFileInput!) { updateFile(input: $input) { path success error id versionId type content sizeBytes checksum updatedAt }}{ "data": { "updateFile": { "path": "string", "success": false, "error": "string", "id": "string", "versionId": "string", "type": "string", "content": "string", "sizeBytes": 0, "checksum": "string", "updatedAt": "2026-01-01T00:00:00Z" } }}The UpdateFilePayload! in data.updateFile.