# Remove the custom domain

> Takes the live domain off the school. Needs a `domain:write` token.

```json
{
  "/api/v1/domain": {
    "delete": {
      "operationId": "deleteDomain",
      "tags": [
        "Domain"
      ],
      "summary": "Remove the custom domain",
      "description": "Takes the live domain off the school. Needs a `domain:write` token.",
      "security": [
        {
          "bearerAuth": []
        }
      ],
      "responses": {
        "200": {
          "description": "Removed, with the domain as it was.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Domain"
              }
            }
          }
        },
        "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"
              }
            }
          }
        },
        "404": {
          "description": "The school has no live custom domain.",
          "content": {
            "application/problem+json": {
              "schema": {
                "$ref": "#/components/schemas/Problem"
              }
            }
          }
        }
      }
    }
  }
}
```
