Make a site from a backup
Try itMakes a new DRAFT site from a backup ZIP (from Export / back up) — to rebuild an archived site or move one between accounts. Brings the design, business details, pages and sections, forms' questions, content collections and pictures (checked and copied into the new site's library); messages and orders stay with the old site. Same wholesale fee, SETUP charge and ledger as Create a site from a template; a backup with more pages than the package holds is refused (409), never cut short. Send expected_setup_cents/expected_monthly_cents to refuse if the price changed.
/api/v1/site-backupsAuthentication
An API key as Authorization: Bearer or x-api-key. It needs the sites:create scope — make new sites (each adds the wholesale fee to your bill).
Parameters
Named placeholders go in the path; the rest in a JSON body.
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
namestringBody · optional- The site's name in your account. Omitted = the name in the backup.2 to 80 characters
slugstringBody · optional- The free address's subdomain. Taken → a number is added.
client_idstringBody · optional- The client it is for (List clients).At most 100 characters
package_idstringBody · optional- From List packages. Omitted = the default package.At most 100 characters
retail_setup_centsintegerBody · optional- Your price to the client, setup. Needs a creator who may see prices.0 to 100000000
retail_monthly_centsintegerBody · optional- Your price to the client, monthly. Needs a creator who may see prices.0 to 100000000
expected_setup_centsintegerBody · optional- Refuse unless the wholesale setup fee is exactly this.0 to 100000000
expected_monthly_centsintegerBody · optional- Refuse unless the wholesale monthly fee is exactly this.0 to 100000000
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/site-backups' \
-H "Authorization: Bearer $WEBSITEBUDDY_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"backup_base64":""}'{
"backup_base64": ""
}{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"slug": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"draft",
"live",
"suspended",
"archived"
]
},
"taken_down": {
"type": "boolean",
"description": "You took the site down (status suspended): not served, not billed from the next run, data kept. put_site_back_up reverses it."
},
"address": {
"type": "string",
"description": "The free address, e.g. https://rosies-diner.websites.workflowcorp.com/"
},
"custom_domain": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "The verified primary custom domain, if any."
},
"client_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"template_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"package": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"page_limit": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"name",
"page_limit"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"published_version": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"published_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"unpublished_changes": {
"type": "boolean",
"description": "The draft has edits that are not live yet."
},
"editor_url": {
"type": "string"
},
"prices": {
"anyOf": [
{
"type": "object",
"properties": {
"wholesale_setup_cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"wholesale_monthly_cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"retail_setup_cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"retail_monthly_cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"wholesale_setup_cents",
"wholesale_monthly_cents",
"retail_setup_cents",
"retail_monthly_cents"
],
"additionalProperties": false
},
{
"type": "null"
}
],
"description": "Only when the key's creator may see prices (billing.view); null otherwise."
},
"is_sample": {
"type": "boolean"
},
"created_at": {
"type": "string"
},
"page_count": {
"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": [
"id",
"name",
"slug",
"status",
"taken_down",
"address",
"custom_domain",
"client_id",
"template_id",
"package",
"published_version",
"published_at",
"unpublished_changes",
"editor_url",
"prices",
"is_sample",
"created_at",
"page_count",
"restored"
],
"additionalProperties": false
}