Write, patch or delete up to 40 files in one guarded change
The way to build the site. The batch is applied atomically after a snapshot: every file is checked by the content guard (422 unsafe_site_content names the file and the reason), index.html can never be removed (422 index_required), uploaded assets cannot be overwritten with text (422 not_editable), and the stylesheet keeps the managed design tokens. Send expected_version from your last read; 409 STALE_VERSION means someone else changed the site, so read again. 409 site_busy means the dashboard chat is mid-change, wait a few seconds and retry. Fix every error in issues before publishing.
https://app.softsolz.uk/api/v1/services/site-builder/projects/{id}/files/applyRecent Requests
Kept only in this browserPath Params
idstringrequiredHeaders
AuthorizationstringrequiredBearer token: Bearer sk_live_... (or sk_test_... for sandbox). A login token will not work here.
Idempotency-KeystringOptional idempotency key for safe retries.
Body Params
operationsarray of objectsrequiredChanges to apply in order.
expected_versionstringcontent_version you last read; refused with 409 STALE_VERSION when the site changed since.
labelstringShort description of the change, shown in the snapshot history.
Response
Response Body
changedarray of stringsPaths written.deletedarray of stringsPaths removed.patch_failuresarray of stringsPatches whose find text did not match exactly once. Re-read the file and send a corrected patch or a full write.snapshot_idstringSnapshot taken before the change; restore it to undo.content_versionstring | nullNew version to send as expected_version next time.issuesarray of objectsQuality issues on the changed files.Request
curl --request POST \ --url https://app.softsolz.uk/api/v1/services/site-builder/projects/{id}/files/apply \ --header 'Authorization: Bearer sk_live_your_key' \ --header 'Content-Type: application/json' \ --data '{ "operations": [ { "op": "write", "path": "index.html", "content": "<!doctype html>..." } ], "label": "Add the menu page"}'Credentials
Sent as a Bearer token and used in the samples above and in Try it. Kept only in this browser tab until you close it. Use an sk_test_ key to stay in your sandbox.
Response · 200
{ "data": { "changed": [ "index.html" ], "deleted": [], "patch_failures": [], "snapshot_id": "17", "content_version": "2026-09-17T09:31:00.000Z", "issues": [] }}