Create a file. Requires project.files.write.
Arguments
inputCreateFileInput!requiredinput.filePathString!requiredFile path to create in main or the selected branch. Atomically fails if the path already exists, including concurrent creation; it does not overwrite.
input.contentString!requiredinput.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 CreateFile($input: CreateFileInput!) { createFile(input: $input) { id path success error versionId type content sizeBytes checksum updatedAt }}{ "data": { "createFile": { "id": "string", "path": "string", "success": false, "error": "string", "versionId": "string", "type": "string", "content": "string", "sizeBytes": 0, "checksum": "string", "updatedAt": "2026-01-01T00:00:00Z" } }}The CreateFilePayload! in data.createFile.