Skip to main content

write_file

Create or overwrite a project file. The write takes effect on the next run or generation.

warning

The allowlist is strict. Only paths under Features/ or Configurations/ are writable, no .. segments, content ≤ 256 KB. Generated specs and template scaffolding are owned by the pipeline and can't be written. See Files & configurations.

Request

PUT /api/v1/ops/projects/{project}/files/content
ParameterInTypeRequiredDescription
projectpathstringyesThe project's public id.
pathbodystringyesThe file path, e.g. Configurations/Mobile.config.js.
contentbodystringyesThe full file content (writes are whole-file).
curl -X PUT -H "Authorization: Bearer $TESTVIBE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"path": "Configurations/Mobile.config.js", "content": "module.exports = { … };"}' \
"$TESTVIBE_SERVER/api/v1/ops/projects/$PROJECT/files/content"

Response

{ "ok": true }

Errors

HTTPWhen
400 invalid_requestPath missing, outside Features//Configurations/, contains .., or content over 256 KB.
404 not_foundNo such project in this workspace.