# Build and manage a CubeSites website with JSON

Use the renderer-generated website schema and guide to build or manage a CubeSites site with JSON.

## Example file

```json
{
  "format": "cubesites-site",
  "version": 2,
  "name": "Your Company",
  "pages": [
    {
      "title": "Home",
      "slug": "",
      "sections": [
        {
          "type": "hero",
          "props": {
            "heading": "Your Company",
            "intro": "[Add a truthful description of your business]"
          },
          "style": {
            "padding": "lg"
          }
        }
      ]
    }
  ]
}
```

## Generated references

- [JSON Schema](https://cubesites.co.uk/spec/cubesites-site.schema.json)
- [Assistant guide](https://cubesites.co.uk/spec/cubesites-site-guide.md)

## API

- `POST /api/v1/workspaces/{workspaceId}/sites/validate`: Validate JSON without writing.
- `POST /api/v1/workspaces/{workspaceId}/sites/import?dryRun=1`: Preview an import without creating a site.
- `POST /api/v1/workspaces/{workspaceId}/sites/import`: Create a site from a JSON file.
- `GET /api/v1/workspaces/{workspaceId}/sites/{siteId}/json`: Get the current editable site as JSON.
- `PUT /api/v1/workspaces/{workspaceId}/sites/{siteId}/json`: Apply JSON to a draft. Add ?prune=1 to remove pages absent from the file.
---

CubeSites is a trading name of Cube Systems Limited, part of Crushed Ice Group. Registered in England and Wales, company number 17220899. Registered office: Unit 11, Olney Business Park, Osier Way, Olney, Buckinghamshire, MK46 5FP. ICO registration number ZC216972.

Contact: hello@cubesites.co.uk | 01234 672 617 | https://cubesites.co.uk/contact
