Proxy a single /_edit call through desktop auth (no long-lived edit token on laptop).
POST/ai-builder-api/cli/projects/:projectId/sandbox/edit
Writes or deletes one file in the app's sandbox. Then start a run with externalAgent: true to check, build and deploy the edits.
Request
Version stringrequired
The API version.
Available options
v3projectId stringrequired
Project identifier.
Possible values: Value must match regular expression ^prj_[A-Za-z0-9]+$
- application/json
- Body
- Example (auto)
Bodyrequired
pathstringrequired
File to write or delete, relative to the workspace root.
actionstring
update writes content (the default); delete removes the file.
Available options
updatedeletecontentstring
The file's full new content, encoded as encoding says.
encodingstring
How content is encoded; utf-8 by default.
Available options
utf-8base64{
"path": "apps/clientportal-custom-app/pages/welcome.vue",
"action": "update",
"content": "<template><h1>Welcome</h1></template>\n",
"encoding": "utf-8"
}
File written in the dev sandbox.
- application/json
- Schema
- Example (auto)
Schema
okbooleanrequired
The file was written or deleted.
Available options
truepathstringrequired
The file, relative to the workspace root.
{
"ok": true,
"path": "apps/clientportal-custom-app/pages/welcome.vue"
}