# Apply a site config document

> Applies every path the document names in one transaction; a path it leaves out stays as it is. A currency change that relabels lesson type prices answers 409, and so does a document that leaves out an extra site with a live custom domain (`errors` names `domainBound:<host>`). Needs a `site:write` token.

```json
{
  "/api/v1/site-config": {
    "put": {
      "operationId": "replaceSiteConfig",
      "tags": [
        "Site config"
      ],
      "summary": "Apply a site config document",
      "description": "Applies every path the document names in one transaction; a path it leaves out stays as it is. A currency change that relabels lesson type prices answers 409, and so does a document that leaves out an extra site with a live custom domain (`errors` names `domainBound:<host>`). Needs a `site:write` token.",
      "security": [
        {
          "bearerAuth": []
        }
      ],
      "requestBody": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/SiteConfig"
            }
          }
        }
      },
      "responses": {
        "200": {
          "description": "Applied.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImportResult"
              }
            }
          }
        },
        "400": {
          "description": "The document is not JSON, is too large or does not match the schema.",
          "content": {
            "application/problem+json": {
              "schema": {
                "$ref": "#/components/schemas/Problem"
              }
            }
          }
        },
        "401": {
          "description": "Missing, unknown, revoked or expired token.",
          "content": {
            "application/problem+json": {
              "schema": {
                "$ref": "#/components/schemas/Problem"
              }
            }
          }
        },
        "403": {
          "description": "The token's scope does not allow this request.",
          "content": {
            "application/problem+json": {
              "schema": {
                "$ref": "#/components/schemas/Problem"
              }
            }
          }
        },
        "409": {
          "description": "The currency change needs the dashboard's confirmation, or an extra site left out of the document still has a live custom domain.",
          "content": {
            "application/problem+json": {
              "schema": {
                "$ref": "#/components/schemas/Problem"
              }
            }
          }
        }
      }
    }
  }
}
```
