hosting

POST /v1/sites/{siteId}/repo/sync/resolve

Clear a held sync by choosing which side wins.

All hosting endpoints

All developer docs →

Authentication

Send an API key as a bearer token. The key must carry the hosting.deploy.manage permission; a key without it is refused with 403, not 404.

This endpoint takes no organisation id. Your key already identifies the organisation it belongs to, and the response is scoped to it.

Try it

Replace anything in angle brackets with your own values, and the key placeholder with a key from your dashboard.

curl -X POST https://api.zinndigital.com/v1/sites/{siteId}/repo/sync/resolve \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "keep": <string<site, repository>> }'

Signed in? The API console in your dashboard fills in your real organisation id and your own key, and runs the request against the live API so you can see the actual response. Open this endpoint in the API console

Details

keep: site commits this site's files on top of the repository's current tip, so the other commits stay in the history rather than being erased. keep: repository applies the repository to the site, discarding the unsynced changes on our side — which is destructive, and is the only path that may overwrite them. There is deliberately no merge option: a platform neither party asked to arbitrate should not produce a file that neither of them wrote. Requires hosting.deploy.manage.

Parameters

NameTypeRequiredWhat it is
siteId (path)UuidYesSite ID (UUIDv7).

Request body

NameTypeRequiredWhat it is
keepstring<site, repository>Yessite keeps this site's files and commits them on top of the repository's current tip. repository discards the unsynced changes on our side and takes the repository's version —…

Response

NameTypeRequiredWhat it is
site_idstringYes—
enabledbooleanYesWhether the customer has switched two-way sync on.
availablebooleanYesWhether it is permitted at all — true only once the customer has connected their OWN git account. False here makes enabled irrelevant; the engine will not sync either way.
unavailable_reasonstringNoA sentence the customer reads when available is false. Null when it is available.
subdirstringNoWhich directory of the site syncs. Empty means the whole document root.
statestring<idle, synced, conflict, adopt, error, unsupported>Yesunsupported is TERMINAL and is not a failure either: the site is served from its repository, so there are no separate files on our side to push back. It leaves the sweep's…
branchstringNo—
repositorystringNoowner/repo, or null when no repository is connected.
conflict_commitstringNoThe commit in the repository that we have not seen — the one the customer needs to look at before choosing. Null unless held.
last_sync_atstringNo—
last_sync_notestringNo—
runsSiteRepoSyncRun[]YesThe most recent runs, newest first. Includes the no-ops.

Errors this endpoint can return

401 · 403 · 404 · 422 · 429