---
title: "Check an error page without saving"
url: https://docs.corefinity.com/api/reference/site-settings/check-site-error-page
type: endpoint
last_updated: 2026-11-13
feature: error-pages
related:
  - https://docs.corefinity.com/guides/sites/site-settings/error-and-maintenance-pages.md
  - https://docs.corefinity.com/mcp/tools/corestack_error_pages_validate.md
---
# Check an error page without saving

Checks one page's HTML: what would be removed on a save, what would stop it, and warnings, each with its line and column. Leave `source` out to check the platform's page with your `message`. Nothing is saved.

```http
POST /api/corestack/sites/{site}/error-pages/validate
```

- Scope: `read`
- Two-factor: required on your account (all)
- Rate limit: 60 a minute; 120 a minute for each person
- Try it in the console: on

## Path parameters

- `site` (integer, required): The id of a site row. A website's production site and each of its environments has its own id. Digits only.

## Body

- `message` (string or null): The message for the `{{message}}` tag, in place of the saved one. One line of plain text, at most 300 characters. Left out or null, the default message is used.
- `page` (string, required) One of `maintenance`, `404`, `500`, `502`, `503`, `504`.
- `sample` (object): Values to show in place of the samples, for these four only. The other tags (`status_code`, `status_text`, `message`, `site_name`, `retry_after`) cannot be set here, and any other key is refused `invalid`.
  - `host` (string or null): The value of the `{{host}}` tag.
  - `request_id` (string or null): The value of the `{{request_id}}` tag.
  - `support_email` (string or null): An unsaved support email for the `{{support_email}}` tag, checked as a save checks it. Null shows none.
  - `time_utc` (string or null): The value of the `{{time_utc}}` tag.
- `source` (string or null): The page's HTML, at most 64 KiB (65,536 bytes; a longer one answers 413 `too_large`). Left out or null, the platform's page is used.

## Request

### curl

```bash
curl -X POST https://manage.corefinity.com/api/corestack/sites/1042/error-pages/validate \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "page": "503",
    "source": "<!DOCTYPE html><html><head><meta name=\"viewport\" content=\"width=device-width\"><title>Back soon</title></head><body><h1>Back soon</h1><p>{{message}}</p></body></html>"
  }'
```

### PHP

```php
use Illuminate\Support\Facades\Http;

$response = Http::withToken(env('COREFINITY_TOKEN'))
    ->acceptJson()
    ->post('https://manage.corefinity.com/api/corestack/sites/1042/error-pages/validate', [
        'page' => '503',
        'source' => '<!DOCTYPE html><html><head><meta name="viewport" content="width=device-width"><title>Back soon</title></head><body><h1>Back soon</h1><p>{{message}}</p></body></html>',
    ]);

$data = $response->json();
```

### Node

```javascript
const res = await fetch('https://manage.corefinity.com/api/corestack/sites/1042/error-pages/validate', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.COREFINITY_TOKEN}`,
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    page: '503',
    source: '<!DOCTYPE html><html><head><meta name="viewport" content="width=device-width"><title>Back soon</title></head><body><h1>Back soon</h1><p>{{message}}</p></body></html>',
  }),
});

// An answer with no body (204) has nothing to parse.
const text = await res.text();
const data = text && JSON.parse(text);
```

### Python

```python
import os
import requests

res = requests.post(
    "https://manage.corefinity.com/api/corestack/sites/1042/error-pages/validate",
    headers={
        "Authorization": f"Bearer {os.environ['COREFINITY_TOKEN']}",
        "Accept": "application/json",
    },
    json={
        "page": "503",
        "source": "<!DOCTYPE html><html><head><meta name=\"viewport\" content=\"width=device-width\"><title>Back soon</title></head><body><h1>Back soon</h1><p>{{message}}</p></body></html>",
    },
)

data = res.json() if res.content else None
```

## Responses

### 200 What the check found. An empty `diagnostics` means the page can be saved as it is.

```json
{
  "bytes": 294,
  "diagnostics": [],
  "samples": {
    "host": "www.harbourandfinch.example.com",
    "message": "This site is being updated. Please try again in a few minutes.",
    "request_id": "4f2c9a1e7b3d4c5a8e6f0b1a2c3d4e5f",
    "retry_after": "300",
    "site_name": "harbourandfinch.example.com",
    "status_code": "503",
    "status_text": "Down for maintenance",
    "support_email": "",
    "time_utc": "2026-11-24T09:30:00+00:00"
  }
}
```

### 401 No token, or a token that is not valid.

```json
{
  "message": "Unauthenticated."
}
```

### 403 The token lacks the scope (`scope_required`, with the `scope` to use), or your company requires two-factor authentication and you have not set it up. For routes outside Managed Clusters.

```json
{
  "code": "company_unavailable",
  "message": "Your company is unavailable.",
  "reason": "company_unavailable"
}
```

### 404 The id does not exist or is something you cannot see, or the feature is not on for your company (`feature_off`).

```json
{
  "code": "feature_off",
  "message": "Not found.",
  "reason": "feature_off"
}
```

### 409 The site is managed by another control panel, so it cannot be changed here.

```json
{
  "code": "managed_elsewhere",
  "message": "This site is managed by another control panel",
  "reason": "managed_elsewhere"
}
```

### 413 `source` is over 64 KiB (`too_large`). `page` names the page; `bytes` and `max_bytes` say by how much.

```json
{
  "bytes": 70112,
  "code": "too_large",
  "max_bytes": 65536,
  "message": "This page is larger than 64 KB.",
  "page": "503",
  "reason": "too_large"
}
```

### 422 A field is missing or wrong (`invalid`, with `field` and `errors`): a `page` that is not one, a field that is not text, a `sample` key other than the four it takes (`field` is `sample.<key>`), a `message` over 300 characters or with a line break in it, or a `sample.support_email` that is not an address.

```json
{
  "code": "invalid",
  "errors": {
    "page": [
      "page is one of maintenance, 404, 500, 502, 503, 504."
    ]
  },
  "field": "page",
  "message": "page is one of maintenance, 404, 500, 502, 503, 504.",
  "reason": "invalid"
}
```

### 429 Too many requests (`rate_limited`): the API's general limit, or the 120 checks and previews a minute you have across the API, the Control Panel and AI assistants. Wait for `Retry-After`, which `retry_after_seconds` repeats.

```json
{
  "code": "rate_limited",
  "message": "Too many attempts on this environment. Try again shortly.",
  "reason": "rate_limited",
  "retry_after_seconds": 60
}
```

## If it is refused

| Status | Reason | What to do |
|---|---|---|
| 401 |  | Send a valid token as `Authorization: Bearer <token>`. |
| 403 | `company_unavailable` | Your company is unavailable. |
| 403 | `scope_required` | Use a token with the scope named in `scope`. |
| 403 | `two_factor_required` | Turn on two-factor on your account, then send again. |
| 404 | `feature_off` | This feature is not on for your organisation yet. |
| 409 | `managed_elsewhere` | This site is read-only here. Change it in the control panel that manages it. |
| 413 | `too_large` | The upload is larger than the limit for one file. |
| 422 | `invalid` | Fix the field named in `field`; `errors` says why. |
| 429 | `rate_limited` | Wait for the seconds in `Retry-After`. |

## The same task elsewhere

- Guide: [Error pages](https://docs.corefinity.com/guides/sites/site-settings/error-and-maintenance-pages.md)
- MCP tool: [`corestack_error_pages_validate`](https://docs.corefinity.com/mcp/tools/corestack_error_pages_validate.md)
