Restore a site from a backup
Try itPuts a backup ZIP (from Export / back up) back onto a site's DRAFT: the design, business details, every page and section, the head code and the forms' questions. Its pictures are checked and copied into the site's library (ones still there are reused). Messages, blog posts, events, collections, store, gifts, members and redirects already on the site are kept. The editor's rules apply — section schemas, safe links, one home page, the package's page limit. Nothing goes live until you publish.
/api/v1/sites/{site_id}/restore-backupAuthentication
An API key as Authorization: Bearer or x-api-key. It needs the sites:write scope — edit draft pages and sections.
Parameters
Named placeholders go in the path; the rest in a JSON body.
site_idstringPath · required- The site's id.1 to 100 characters
backup_base64stringBody · required- The backup ZIP's bytes, base64 (up to 60 MB before encoding). Over MCP the whole message is capped at 256 KiB, so send real backups through REST.8 to 83951616 characters
Response
201 with JSON on success (schema on the right). Errors use the standard envelope; a retry with the same Idempotency-Key gets the first answer back (how retries work).
curl -X POST 'https://websites.workflowcorp.com/api/v1/sites/SITE_ID/restore-backup' \
-H "Authorization: Bearer $WEBSITEBUDDY_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"backup_base64":""}'{
"site_id": "SITE_ID",
"backup_base64": ""
}{
"type": "object",
"properties": {
"site_id": {
"type": "string"
},
"draft_revision": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"restored": {
"type": "object",
"properties": {
"exported_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "When the backup was made."
},
"pages": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"sections": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"forms": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"collections": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"pictures": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Pictures copied into the site's library."
},
"pictures_left_out": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"reason": {
"type": "string"
}
},
"required": [
"name",
"reason"
],
"additionalProperties": false
}
}
},
"required": [
"exported_at",
"pages",
"sections",
"forms",
"collections",
"pictures",
"pictures_left_out"
],
"additionalProperties": false
}
},
"required": [
"site_id",
"draft_revision",
"restored"
],
"additionalProperties": false
}