CorefinityCorefinityDocs
Open the Control PanelControl Panel
Domains · 7 of 8

Update a site's main domain

Starts the change that a preview described. Send the preview's preview_token and, in confirm_domain, the site's current main domain typed exactly.

POST/api/corestack/sites/{site}/url-change

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

confirm_domainstringRequired

The site's current main domain, typed exactly.

confirm_replacementsboolean

True to let point_dns replace DNS records that already exist. Defaults to false.

new_primarystringRequired
point_dnsboolean

True to point DNS through your connected Cloudflare account as part of the change. Defaults to false.

preview_tokenstringRequired

The preview_token of a preview of the same new_primary and www, at most 15 minutes old.

wwwstring
wwwbare

Returns

201 The change started. Follow it by id.

Fields of the 201 answer
applied_atstring or null
can_retryboolean or null
clusterobject or any or null

The cluster the operation runs on.

committed_atstring or null
completed_atstring or nullRequired
created_atstring or nullRequired
environmentobject or any or null
errorstring or nullRequired

Why the operation failed, in plain words. Null unless status is failed.

failure_reasonstring or null

A stable code for the failure.

from_versionstring or null
hotboolean or null

True when the change applies without a maintenance window.

idintegerRequired
installobject or null
labelstring or null
notesarray of objects

What the operation did differently on purpose. Empty when nothing.

Fields of each item
codestringRequired
textstringRequired
parent_operation_idinteger or null
requested_byany

Who asked for the change.

reset_targetany

Present on some site creations and copies.

resultany

Always null here. A one-time result is read once with the reveal endpoint.

result_statestring
nonependingavailableviewed
retried_by_operation_idinteger or null
retries_operation_idinteger or null
retry_requiresany

What a retry needs first, if anything.

revealedany

Who revealed a one-time result and when, when there was one.

scopestringRequired
siteclusterbatch
siteobject or any or null

The website the operation belongs to. Null for a cluster's own operation.

statusstringRequired

Where a change is. completed and failed are final; every other status means the change is still running and blocks another change to the same site.

pendingcommittedrolling_outexecutingcompletedfailed
status_labelstringRequired
stepstring or null

The key of the step the operation is at. Null once it has completed.

stepsarray of objectsRequired
Fields of each item
keystring
labelstring
statestring

One of done, current, todo, failed or skipped.

subjectobject or null
summarystring or null
to_versionstring or null
typestringRequired

The kind of change, such as crons_change or redirects_change.

type_labelstringRequired

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.
409maintenanceThe site is in maintenance mode, which blocks this. Switch maintenance mode off first.
409preview_onlyThe environment has no domain attached yet. Attach one first.
422confirm_mismatchSend the confirmation exactly as the field named in field asks for it.
422preview_tokenRun the preview again. It is older than 15 minutes.
429rate_limitedWait for the seconds in Retry-After.
502noneRead the message; it says what happened.

Reasons are listed by name in Errors and refusals.

The same task elsewhere

curl -X POST https://manage.corefinity.com/api/corestack/sites/1042/url-change \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "confirm_domain": "harbourandfinch.example.com",
    "new_primary": "harbourandfinch.example.net",
    "preview_token": "pReViEw-ToKeN-0123456789abcdefghijklmnopqr",
    "www": "bare"
  }'
{
  "applied_at": null,
  "can_retry": false,
  "cluster": {
    "id": 1017,
    "name": "Northwind UK 1"
  },
  "committed_at": null,
  "completed_at": null,
  "created_at": "2026-11-06T09:33:40Z",
  "environment": {
    "env_id": "rs-harbourandfinch-example-com",
    "hostname": "harbourandfinch-example-com.northwind.cfstack.example.net",
    "id": 1042,
    "name": "Production",
    "role": "production",
    "role_label": "Production",
    "slug": "production"
  },
  "error": null,
  "failure_reason": null,
  "from_version": null,
  "hot": false,
  "id": 77173,
  "label": "New address added",
  "notes": [],
  "parent_operation_id": null,
  "requested_by": {
    "id": 5021,
    "name": "Eleanor Finch"
  },
  "result": null,
  "result_state": "none",
  "retried_by_operation_id": null,
  "retries_operation_id": null,
  "retry_requires": null,
  "scope": "site",
  "site": {
    "domain": "harbourandfinch.example.com",
    "id": 1042
  },
  "status": "pending",
  "status_label": "Saving change",
  "step": "committed",
  "steps": [
    {
      "key": "committed",
      "label": "New address added",
      "state": "current"
    },
    {
      "key": "rewritten",
      "label": "Site URL updated",
      "state": "todo"
    },
    {
      "key": "finalising",
      "label": "Redirect saved",
      "state": "todo"
    },
    {
      "key": "finalised",
      "label": "Old address redirects",
      "state": "todo"
    }
  ],
  "summary": "harbourandfinch.example.com → harbourandfinch.example.net",
  "to_version": null,
  "type": "url_change",
  "type_label": "Primary URL"
}
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