SoftSolzSoftSolz
HomeAPI GuideAPI ReferenceWidget Tester
site builder

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.

POSThttps://app.softsolz.uk/api/v1/services/site-builder/projects/{id}/files/apply

Recent Requests

Log in to see full request history
TimeStatusUser Agent
Make a request to see history.

Path Params

idstringrequired

Headers

Authorizationstringrequired

Bearer token: `Bearer sk_live_...` (or `sk_test_...` for sandbox). A login token will not work here.

Idempotency-Keystring

Optional idempotency key for safe retries.

Body Params

operationsarray of objects

Changes to apply in order.

expected_versionstring

content_version you last read; refused with 409 STALE_VERSION when the site changed since.

labelstring

Short 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": []
}
}