Replace a site's error pages
Saves the whole configuration at the version you read: the setting of every code, every page and the support email. Scripts and anything else a page may not contain are removed, and warnings lists what was; the change is then checked on the site: follow the operation in the answer.
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 configuration to save. A code, page or the support email left out goes back to its default.
Fields
Fields
pageapppageapppageapppageapppageappFields
Fields
One line of plain text the page shows through the {{message}} tag, at most 300 characters. Null shows the default message.
Your own HTML for the page, at most 64 KiB (65,536 bytes), and all pages at most 256 KiB together. Null shows the platform's page.
Fields
One line of plain text the page shows through the {{message}} tag, at most 300 characters. Null shows the default message.
Your own HTML for the page, at most 64 KiB (65,536 bytes), and all pages at most 256 KiB together. Null shows the platform's page.
Fields
One line of plain text the page shows through the {{message}} tag, at most 300 characters. Null shows the default message.
Your own HTML for the page, at most 64 KiB (65,536 bytes), and all pages at most 256 KiB together. Null shows the platform's page.
Fields
One line of plain text the page shows through the {{message}} tag, at most 300 characters. Null shows the default message.
Your own HTML for the page, at most 64 KiB (65,536 bytes), and all pages at most 256 KiB together. Null shows the platform's page.
Fields
One line of plain text the page shows through the {{message}} tag, at most 300 characters. Null shows the default message.
Your own HTML for the page, at most 64 KiB (65,536 bytes), and all pages at most 256 KiB together. Null shows the platform's page.
Fields
One line of plain text the page shows through the {{message}} tag, at most 300 characters. Null shows the default message.
Your own HTML for the page, at most 64 KiB (65,536 bytes), and all pages at most 256 KiB together. Null shows the platform's page.
An email address, with no spaces, quotes, <, > or & in it. Null or left out shows none. Up to 254 characters.
Why, shown in the history. Only its first 200 characters are kept.
The version from the last read. At least 0.
Returns
200 The configuration is the one the site already has. Nothing was started.
201 The change was saved. Follow operation; revision is the new revision.
Fields of the 200 answer
The change to follow. Null when nothing was started.
The new revision. Null when nothing changed.
What was removed from a page, and other warnings.
Fields of each item
error stops a save; warning does not.
Fields of the 201 answer
The change to follow. Null when nothing was started.
The new revision. Null when nothing changed.
What was removed from a page, and other warnings.
Fields of each item
error stops a save; warning does not.
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. |
409 | operation_in_progress | A change to the environment is in progress. Try again when it has finished. |
409 | restore_running | A restore is running on the site. Wait for it to finish, then try again. |
409 | stale | What you read has changed since you read it. Read it again, then send the change with its new version or quote. |
409 | switch_reconcile_failed | The maintenance switch could not be checked on the site, so nothing was changed. Try again shortly. |
413 | too_large | The upload is larger than the limit for one file. |
422 | error_pages_locked | Corefinity has locked the environment's error pages. Contact support to change them. |
422 | invalid | Fix the field named in field; errors says why. |
422 | invalid_page | An error page cannot be saved as it is. Fix the errors the answer lists. |
422 | runtime_lacks_capability | The site's runtime does not support this yet. It is available after the site's platform update. |
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 PUT https://manage.corefinity.com/api/corestack/sites/1042/error-pages \
-H "Authorization: Bearer $COREFINITY_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"config": {
"codes": {
"404": "app",
"500": "page",
"502": "page",
"503": "app",
"504": "page"
},
"pages": {
"404": {
"message": null,
"source": null
},
"500": {
"message": null,
"source": null
},
"502": {
"message": null,
"source": null
},
"503": {
"message": null,
"source": null
},
"504": {
"message": null,
"source": null
},
"maintenance": {
"message": "Back at 10:00 UTC",
"source": null
}
},
"support_email": "[email protected]"
},
"note": "Our app shows its own holding page",
"version": 2
}'use Illuminate\Support\Facades\Http;
$response = Http::withToken(env('COREFINITY_TOKEN'))
->acceptJson()
->put('https://manage.corefinity.com/api/corestack/sites/1042/error-pages', [
'config' => [
'codes' => (object) [
'404' => 'app',
'500' => 'page',
'502' => 'page',
'503' => 'app',
'504' => 'page',
],
'pages' => (object) [
'404' => [
'message' => null,
'source' => null,
],
'500' => [
'message' => null,
'source' => null,
],
'502' => [
'message' => null,
'source' => null,
],
'503' => [
'message' => null,
'source' => null,
],
'504' => [
'message' => null,
'source' => null,
],
'maintenance' => [
'message' => 'Back at 10:00 UTC',
'source' => null,
],
],
'support_email' => '[email protected]',
],
'note' => 'Our app shows its own holding page',
'version' => 2,
]);
$data = $response->json();const res = await fetch('https://manage.corefinity.com/api/corestack/sites/1042/error-pages', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.COREFINITY_TOKEN}`,
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({
config: {
codes: {
'404': 'app',
'500': 'page',
'502': 'page',
'503': 'app',
'504': 'page',
},
pages: {
'404': {
message: null,
source: null,
},
'500': {
message: null,
source: null,
},
'502': {
message: null,
source: null,
},
'503': {
message: null,
source: null,
},
'504': {
message: null,
source: null,
},
maintenance: {
message: 'Back at 10:00 UTC',
source: null,
},
},
support_email: '[email protected]',
},
note: 'Our app shows its own holding page',
version: 2,
}),
});
// 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.put(
"https://manage.corefinity.com/api/corestack/sites/1042/error-pages",
headers={
"Authorization": f"Bearer {os.environ['COREFINITY_TOKEN']}",
"Accept": "application/json",
},
json={
"config": {
"codes": {
"404": "app",
"500": "page",
"502": "page",
"503": "app",
"504": "page",
},
"pages": {
"404": {
"message": None,
"source": None,
},
"500": {
"message": None,
"source": None,
},
"502": {
"message": None,
"source": None,
},
"503": {
"message": None,
"source": None,
},
"504": {
"message": None,
"source": None,
},
"maintenance": {
"message": "Back at 10:00 UTC",
"source": None,
},
},
"support_email": "[email protected]",
},
"note": "Our app shows its own holding page",
"version": 2,
},
)
data = res.json() if res.content else None{
"operation": null,
"revision": null
}{
"operation": {
"can_retry": false,
"completed_at": null,
"created_at": "2026-11-06T09:16:40Z",
"error": null,
"id": 5123,
"outcome": null,
"status": "committed",
"steps": [
{
"at": "2026-11-06T09:16:40Z",
"detail": "No problems",
"key": "check",
"label": "Check",
"state": "done"
},
{
"at": null,
"detail": null,
"key": "commit",
"label": "Commit",
"state": "current"
},
{
"at": null,
"detail": null,
"key": "apply",
"label": "Apply",
"state": "todo"
},
{
"at": null,
"detail": null,
"key": "verify",
"label": "Verify",
"state": "todo"
}
]
},
"revision": {
"id": 313,
"number": 3,
"status": "applying"
},
"warnings": []
}{
"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": "error_pages_locked",
"message": "Corefinity has locked this environment's error pages. Contact support to change them.",
"reason": "error_pages_locked"
}{
"code": "rate_limited",
"message": "Too many attempts on this environment. Try again shortly.",
"reason": "rate_limited",
"retry_after_seconds": 60
}Try it is off for this endpointIt overwrites data that cannot be brought back. Copy the request and run it yourself when you are sure.