CMS sync
Two-way sync between a site's content and an external CMS.
Get the CMS connection
Returns {connected: false} when the site has no connection, so this is safe to call before one is set up.
path Parameters
idHeaders
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
Get the CMS connection › Responses
Success
Disconnect the CMS
Forgets the connection and the per-page links to it. Content is kept on both sides — this stops syncing, it does not delete anything.
path Parameters
idHeaders
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
Disconnect the CMS › Responses
Success
Get sync automation
What this site does about its CMS unattended: whether the nightly comparison covers it, what it may pull without being asked, and the URL the CMS calls when its content changes.
path Parameters
idHeaders
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
Get sync automation › Responses
Success
Set sync automation
Sets the standing rules. autoPull is off, unedited (pages the CMS changed that nobody has touched here since we last sent them) or all; a page that changed on both sides is never pulled automatically under any of them. Nothing here ever pushes — copy reaching a live website stays a person's decision.
path Parameters
idHeaders
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
Set sync automation › Request Body optional
scanautoPullnotifySet sync automation › Responses
Success
Connect a CMS
Stores the credentials for a CMS and verifies them against it. Nothing is synced yet — pull or push afterward.
path Parameters
idHeaders
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
Connect a CMS › Request Body
providersettingsdryRunConnect a CMS › Responses
Success
Preview a sync
Compares both sides and returns the plan — what would be created, updated, and what conflicts. Read-only: nothing moves until you pull or push.
path Parameters
idquery Parameters
directionHeaders
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
Preview a sync › Responses
Success
Pull content
Brings the CMS's content into the site. Preview it first with GET /sites/{id}/cms/plan, which reports what a pull would change without changing it.
A pull touching more than a handful of pages answers 202 with a job instead of the result: hundreds of rate-limited calls to a CMS take minutes, which is longer than any request should be held open. Follow the run at GET /sites/{id}/cms/sync-jobs/{job_id}. Send background: true to be given a job whatever the size.
path Parameters
idHeaders
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
Pull content › Request Body optional
resolutionnodeIdsexternalIdspublishforcebackgrounddryRunPull content › Responses
Success
Push content
Sends the site's content to the CMS. Local edits win over anything changed in the CMS since the last sync; the plan endpoint reports those conflicts before you commit to them.
Answers 202 with a job once the push is larger than a handful of pages — see pullFromCms.
path Parameters
idHeaders
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
Push content › Request Body optional
resolutionnodeIdsexternalIdspublishforcebackgrounddryRunPush content › Responses
Success
Scan for changes
Same comparison as the plan, and it remembers the verdict on the site so the page tree can show where the two sides disagree without comparing again. Use the plan endpoint for a read that leaves nothing behind.
path Parameters
idquery Parameters
directionHeaders
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
Scan for changes › Responses
Success
Pull content schemas
Mirrors the CMS's component definitions into a content-schema library, so generated content is shaped the way the CMS expects it.
path Parameters
idHeaders
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
Pull content schemas › Responses
Success
Push content schemas
Sends the workspace's content schemas to the CMS as component definitions, so pages pushed afterward have somewhere to land.
path Parameters
idHeaders
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
Push content schemas › Responses
Success
List sync runs
Every recent pull and push for this site, newest first: who ran it, what it moved, how long it took and which pages it could not settle.
path Parameters
idquery Parameters
limitHeaders
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
List sync runs › Responses
Success
Get a sync run
Progress and outcome of one run. done and failed advance against total while it works; stalled reports a run whose worker was lost, which can be resumed without losing what it applied.
path Parameters
idjob_idHeaders
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
Get a sync run › Responses
Success
Cancel a sync run
Stops the run at its next checkpoint. Pages already synced stay synced — this is a stop, not a rollback.
path Parameters
idjob_idHeaders
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
Cancel a sync run › Responses
Success
Resume a sync run
Continues a run that stalled or failed, from its last checkpoint. Pages it already settled are not touched again.
path Parameters
idjob_idHeaders
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
Resume a sync run › Responses
Success
Retry failed pages
Starts a new run over exactly the pages the named run could not settle. The original run keeps its record.
path Parameters
idjob_idHeaders
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
Retry failed pages › Responses
Success
Create a change webhook
Issues the URL to register in the CMS, so a change there is noticed in seconds rather than at the next scheduled comparison. Called again it replaces the URL, which is how one is rotated. Send secret to have deliveries checked against the provider's signature. Refused where the connected CMS cannot call a URL.
path Parameters
idHeaders
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
Create a change webhook › Responses
Success
Delete a change webhook
Withdraws the URL. Deliveries to it stop being accepted immediately; the site falls back to the scheduled comparison.
path Parameters
idHeaders
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
Delete a change webhook › Responses
Success
Compare a page
Both versions of one page, field by field, with the differing fields first — what a conflict needs in order to be decidable.
path Parameters
idpage_idHeaders
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
Compare a page › Responses
Success
Merge a page
Settles a page that changed on both sides by keeping each field from the side named in choices — {"title": "local", "body": "remote"}. Fields nobody names keep the local value; _name, _slug and _text name the three that are not content fields. The merged copy is written here and then sent to the CMS under the same approval gate as any push, so on a site under review it waits for a reviewer and the response reports awaitingApproval.
path Parameters
idpage_idHeaders
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
Merge a page › Responses
Success
Pull one page
Replaces the local copy of this page with the CMS's. The local version is discarded.
path Parameters
idpage_idHeaders
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
Pull one page › Responses
Success
Push one page
Pushes a single page named explicitly. force bypasses the approval gate and the nothing-changed check, since the caller asked for this page by name; a genuine conflict is still reported unless resolution says how to settle it.
path Parameters
idpage_idHeaders
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
Push one page › Responses
Success
List CMS providers
The providers a site can connect to, and the fields each one needs to connect. Static catalog — it reflects no workspace data.
Headers
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
List CMS providers › Responses
Success
