Preview an error page
Answers the page as visitors would get it, with the tags filled in from sample values and everything a page may not contain removed. Nothing is saved.
Path parameters
The id of a site row. A website's production site and each of its environments has its own id. Digits only. At least 1.
Body
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.
maintenance404500502503504Values 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.
Fields
The value of the {{host}} tag.
The value of the {{request_id}} tag.
An unsaved support email for the {{support_email}} tag, checked as a save checks it. Null shows none. Up to 254 characters.
The value of the {{time_utc}} tag.
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.
Returns
200 The page and what the check found.
Fields of the 200 answer
The size of the page as it would be saved.
Fields of each item
error stops a save; warning does not.
The value used for each tag.
The page as visitors would get it.
If it is refused
| Status | Reason | What to do |
|---|---|---|
401 | none | 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. |
Reasons are listed by name in Errors and refusals.
The same task elsewhere
curl -X POST https://manage.corefinity.com/api/corestack/sites/1042/error-pages/preview \
-H "Authorization: Bearer $COREFINITY_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"message": "Back at 10:00 UTC",
"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>"
}'use Illuminate\Support\Facades\Http;
$response = Http::withToken(env('COREFINITY_TOKEN'))
->acceptJson()
->post('https://manage.corefinity.com/api/corestack/sites/1042/error-pages/preview', [
'message' => 'Back at 10:00 UTC',
'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();const res = await fetch('https://manage.corefinity.com/api/corestack/sites/1042/error-pages/preview', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.COREFINITY_TOKEN}`,
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({
message: 'Back at 10:00 UTC',
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);import os
import requests
res = requests.post(
"https://manage.corefinity.com/api/corestack/sites/1042/error-pages/preview",
headers={
"Authorization": f"Bearer {os.environ['COREFINITY_TOKEN']}",
"Accept": "application/json",
},
json={
"message": "Back at 10:00 UTC",
"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{
"bytes": 249,
"diagnostics": [],
"html": "<!DOCTYPE html><html><head>\n<meta name=\"robots\" content=\"noindex\"><meta name=\"viewport\" content=\"width=device-width\"><title>Back soon</title></head><body><h1>Back soon</h1><p>Back at 10:00 UTC</p></body></html>",
"samples": {
"host": "www.harbourandfinch.example.com",
"message": "Back at 10:00 UTC",
"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"
}
}{
"message": "Unauthenticated."
}{
"code": "company_unavailable",
"message": "Your company is unavailable.",
"reason": "company_unavailable"
}{
"code": "feature_off",
"message": "Not found.",
"reason": "feature_off"
}{
"code": "managed_elsewhere",
"message": "This site is managed by another control panel",
"reason": "managed_elsewhere"
}{
"bytes": 70112,
"code": "too_large",
"max_bytes": 65536,
"message": "This page is larger than 64 KB.",
"page": "503",
"reason": "too_large"
}{
"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"
}{
"code": "rate_limited",
"message": "Too many attempts on this environment. Try again shortly.",
"reason": "rate_limited",
"retry_after_seconds": 60
}