CorefinityCorefinityDocs
Open the Control PanelControl Panel
Error pages · 2 of 12

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.

PUT/api/corestack/sites/{site}/error-pages

Path parameters

siteintegerRequired

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

configobjectRequired

The configuration to save. A code, page or the support email left out goes back to its default.

Fields
codesobject
Fields
404string
pageapp
500string
pageapp
502string
pageapp
503string
pageapp
504string
pageapp
pagesobject
Fields
404object
Fields
messagestring or null

One line of plain text the page shows through the {{message}} tag, at most 300 characters. Null shows the default message.

sourcestring or null

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.

500object
Fields
messagestring or null

One line of plain text the page shows through the {{message}} tag, at most 300 characters. Null shows the default message.

sourcestring or null

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.

502object
Fields
messagestring or null

One line of plain text the page shows through the {{message}} tag, at most 300 characters. Null shows the default message.

sourcestring or null

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.

503object
Fields
messagestring or null

One line of plain text the page shows through the {{message}} tag, at most 300 characters. Null shows the default message.

sourcestring or null

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.

504object
Fields
messagestring or null

One line of plain text the page shows through the {{message}} tag, at most 300 characters. Null shows the default message.

sourcestring or null

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.

maintenanceobject
Fields
messagestring or null

One line of plain text the page shows through the {{message}} tag, at most 300 characters. Null shows the default message.

sourcestring or null

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.

support_emailstring or null

An email address, with no spaces, quotes, <, > or & in it. Null or left out shows none. Up to 254 characters.

notestring or null

Why, shown in the history. Only its first 200 characters are kept.

versionintegerRequired

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
operationobject or any or nullRequired

The change to follow. Null when nothing was started.

revisionobject or any or nullRequired

The new revision. Null when nothing changed.

warningsarray of objects

What was removed from a page, and other warnings.

Fields of each item
codestringRequired
columninteger or null
lineinteger or null
messagestringRequired
pagestring
severitystringRequired

error stops a save; warning does not.

Fields of the 201 answer
operationobject or any or nullRequired

The change to follow. Null when nothing was started.

revisionobject or any or nullRequired

The new revision. Null when nothing changed.

warningsarray of objects

What was removed from a page, and other warnings.

Fields of each item
codestringRequired
columninteger or null
lineinteger or null
messagestringRequired
pagestring
severitystringRequired

error stops a save; warning does not.

If it is refused

StatusReasonWhat to do
401noneSend a valid token as Authorization: Bearer <token>.
403company_unavailableYour company is unavailable.
403scope_requiredUse a token with the scope named in scope.
403two_factor_requiredTurn on two-factor on your account, then send again.
404feature_offThis feature is not on for your organisation yet.
409managed_elsewhereThis site is read-only here. Change it in the control panel that manages it.
409operation_in_progressA change to the environment is in progress. Try again when it has finished.
409restore_runningA restore is running on the site. Wait for it to finish, then try again.
409staleWhat you read has changed since you read it. Read it again, then send the change with its new version or quote.
409switch_reconcile_failedThe maintenance switch could not be checked on the site, so nothing was changed. Try again shortly.
413too_largeThe upload is larger than the limit for one file.
422error_pages_lockedCorefinity has locked the environment's error pages. Contact support to change them.
422invalidFix the field named in field; errors says why.
422invalid_pageAn error page cannot be saved as it is. Fix the errors the answer lists.
422runtime_lacks_capabilityThe site's runtime does not support this yet. It is available after the site's platform update.
429rate_limitedWait 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
  }'
{
  "operation": null,
  "revision": null
}
Try it

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.

Was this helpful?
Open in ClaudeOpen in ChatGPT