# Site config file

> Export and import the whole site as one file, and the management API that reads and replaces it.

**Site config** is for owners and admins, at the bottom of the [Site](/docs/teacher/site) page.

The site config file is a JSON document that describes your site: identity, design, language and money settings, FAQ, home sections, pages, navigation, email text and extra sites. Keep it in version control to review changes before they go live.

## Export [#export]

**Export** downloads `site-config.json`. Images are named by the storage key of an upload your school already has, never by a link.

## Import [#import]

Choose a file and Aula shows every path it would change before anything is saved. Import then applies all changes at once, or none if one is refused.

- A partial file changes only what it names; a path it leaves out stays as it is.
- Unknown keys are ignored and listed.
- The file may be at most 256 KB.
- A change of currency relabels the prices of your lesson types, so Aula asks you to confirm it first.
- Colors, fonts, links, addresses and placeholders follow the same rules as the forms and are refused with the path of the field.
- An image key must be one of your own uploads.
- Extra sites are matched by key. A site the file leaves out of its list is archived, and naming the key again restores it.

## Management API [#management-api]

The same document is available over HTTPS for tools that manage the site as code.

- `GET /api/v1/site-config` returns the document and needs a token with the `site:read` scope.
- `PUT /api/v1/site-config` applies a document like an import and needs `site:write`. It answers 400 with the paths that were refused and 409 when the change would relabel prices.
- `GET /api/v1/domain` reads the custom domain.
- `GET /api/v1/openapi.json` is the OpenAPI document, which carries the JSON Schema of the config file as its `SiteConfig` schema.

Send the token as `Authorization: Bearer aula_...`. A token belongs to one school and `site:write` also reads. Creating and revoking tokens from settings, versions with preview and publish, and the Pulumi provider are not available yet; this page will describe them when they ship.
