Skip to content

Make a site from a client's current website

Try it

Reads an existing website and makes a new DRAFT site from it: its pages, headings, paragraphs, lists and buttons become sections in the template + design you pick, and its pictures and logo are copied into the site's own picture library (checked: real photos only — the logo may be an SVG — up to 8 MB, at least 120×80 pixels, up to 40). The phone and email go into the site's details; a Contact page gets the template's contact form. Same wholesale fee, package page limit and ledger as Create a site from a template. The answer carries the review report (also Get a site's import report). Send expected_setup_cents/expected_monthly_cents to refuse if the price changed.

POST/api/v1/site-imports

Authentication

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).

sites:createAdds to your billIdempotency-Key requiredMCP tool: import_site

Parameters

Named placeholders go in the path; the rest in a JSON body.

addressstringBody · required
The client's current website, e.g. theirbusiness.com.3 to 500 characters
template_idstringBody · required
The look: from List templates.1 to 100 characters
stylestringBody · optional
A design style slug. Omitted = the template's own look.One of: altered, clean-modern, warm-classic, industrial, luxe, fresh-bright, coastal, heritage
namestringBody · optional
The site's name in your account. Omitted = the old site's title.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
curl -X POST 'https://websites.workflowcorp.com/api/v1/site-imports' \
  -H "Authorization: Bearer $WEBSITEBUDDY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"address":"oriontire.com","template_id":"TEMPLATE_ID","style":"industrial","client_id":"CLIENT_ID"}'
Example arguments
{
  "address": "oriontire.com",
  "template_id": "TEMPLATE_ID",
  "style": "industrial",
  "client_id": "CLIENT_ID"
}
Response schema
{
  "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
    },
    "report": {
      "type": "object",
      "properties": {
        "source": {
          "type": "string"
        },
        "site_title": {
          "type": "string"
        },
        "imported_at": {
          "type": "string"
        },
        "template": {
          "type": "string"
        },
        "design": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "pages": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "title": {
                "type": "string"
              },
              "slug": {
                "type": "string"
              },
              "source_url": {
                "type": "string"
              },
              "made": {
                "type": "boolean"
              },
              "sections": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "pictures": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "shortened": {
                "type": "boolean"
              }
            },
            "required": [
              "title",
              "slug",
              "source_url",
              "made",
              "sections",
              "pictures",
              "shortened"
            ],
            "additionalProperties": false
          }
        },
        "pictures": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "source_url": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enum": [
                  "added",
                  "skipped"
                ]
              },
              "reason": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "url": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "width": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "height": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "bytes": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "source_url",
              "status",
              "reason",
              "url",
              "width",
              "height",
              "bytes"
            ],
            "additionalProperties": false
          }
        },
        "skipped_pages": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "url": {
                "type": "string"
              },
              "reason": {
                "type": "string"
              }
            },
            "required": [
              "url",
              "reason"
            ],
            "additionalProperties": false
          }
        },
        "found": {
          "type": "object",
          "properties": {
            "phone": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "email": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "logo": {
              "type": "boolean"
            },
            "contact_form": {
              "type": "boolean"
            }
          },
          "required": [
            "phone",
            "email",
            "logo"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "source",
        "site_title",
        "imported_at",
        "template",
        "design",
        "pages",
        "pictures",
        "skipped_pages",
        "found"
      ],
      "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",
    "report"
  ],
  "additionalProperties": false
}