Skip to main content
Version: v3

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 optionsv3
projectId stringrequired

Project identifier.

Possible values: Value must match regular expression ^prj_[A-Za-z0-9]+$

application/json

Bodyrequired

    pathstringrequired

    File to write or delete, relative to the workspace root.

    actionstring

    update writes content (the default); delete removes the file.

    Available optionsupdatedelete
    contentstring

    The file's full new content, encoded as encoding says.

    encodingstring

    How content is encoded; utf-8 by default.

    Available optionsutf-8base64
application/json

File written in the dev sandbox.

Schema
    okbooleanrequired

    The file was written or deleted.

    Available optionstrue
    pathstringrequired

    The file, relative to the workspace root.