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
Log in to see full request historyPath 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 objectsChanges 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_idintegerSnapshot 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
import { SoftSolz } from '@softsolz/sdk';
const client = new SoftSolz({ apiKey: process.env.SOFTSOLZ_API_KEY });
const result = await client.siteBuilder.applyProjectFiles('<id>', {});console.log(result);Credentials
Sent as a Bearer token. Stored only in your browser.
Response · 200
{ "data": { "changed": [], "deleted": [], "patch_failures": [], "snapshot_id": 0, "content_version": "string", "issues": [] }}