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.
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 site's current main domain, typed exactly.
True to let point_dns replace DNS records that already exist. Defaults to false.
True to point DNS through your connected Cloudflare account as part of the change. Defaults to false.
The preview_token of a preview of the same new_primary and www, at most 15 minutes old.
wwwbareReturns
201 The change started. Follow it by id.
Fields of the 201 answer
The cluster the operation runs on.
Why the operation failed, in plain words. Null unless status is failed.
A stable code for the failure.
True when the change applies without a maintenance window.
What the operation did differently on purpose. Empty when nothing.
Fields of each item
Who asked for the change.
Present on some site creations and copies.
Always null here. A one-time result is read once with the reveal endpoint.
nonependingavailableviewedWhat a retry needs first, if anything.
Who revealed a one-time result and when, when there was one.
siteclusterbatchThe website the operation belongs to. Null for a cluster's own operation.
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_outexecutingcompletedfailedThe key of the step the operation is at. Null once it has completed.
Fields of each item
One of done, current, todo, failed or skipped.
The kind of change, such as crons_change or redirects_change.
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 | maintenance | The site is in maintenance mode, which blocks this. Switch maintenance mode off first. |
409 | preview_only | The environment has no domain attached yet. Attach one first. |
422 | confirm_mismatch | Send the confirmation exactly as the field named in field asks for it. |
422 | preview_token | Run the preview again. It is older than 15 minutes. |
429 | rate_limited | Wait for the seconds in Retry-After. |
502 | none | Read 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"
}'use Illuminate\Support\Facades\Http;
$response = Http::withToken(env('COREFINITY_TOKEN'))
->acceptJson()
->post('https://manage.corefinity.com/api/corestack/sites/1042/url-change', [
'confirm_domain' => 'harbourandfinch.example.com',
'new_primary' => 'harbourandfinch.example.net',
'preview_token' => 'pReViEw-ToKeN-0123456789abcdefghijklmnopqr',
'www' => 'bare',
]);
$data = $response->json();const res = await fetch('https://manage.corefinity.com/api/corestack/sites/1042/url-change', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.COREFINITY_TOKEN}`,
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({
confirm_domain: 'harbourandfinch.example.com',
new_primary: 'harbourandfinch.example.net',
preview_token: 'pReViEw-ToKeN-0123456789abcdefghijklmnopqr',
www: 'bare',
}),
});
// 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/url-change",
headers={
"Authorization": f"Bearer {os.environ['COREFINITY_TOKEN']}",
"Accept": "application/json",
},
json={
"confirm_domain": "harbourandfinch.example.com",
"new_primary": "harbourandfinch.example.net",
"preview_token": "pReViEw-ToKeN-0123456789abcdefghijklmnopqr",
"www": "bare",
},
)
data = res.json() if res.content else None{
"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"
}{
"message": "Unauthenticated."
}{
"code": "company_unavailable",
"message": "Your company is unavailable.",
"reason": "company_unavailable"
}{
"code": "feature_off",
"message": "Not found.",
"reason": "feature_off"
}{
"code": "maintenance",
"message": "Switch the maintenance page off before changing the site's hosts",
"reason": "maintenance"
}{
"code": "confirm_mismatch",
"errors": {
"confirm_domain": [
"Type the current domain to confirm"
]
},
"field": "confirm_domain",
"message": "Type the current domain to confirm",
"reason": "confirm_mismatch"
}{
"code": "rate_limited",
"message": "Too many requests. Try again in 60 seconds.",
"reason": "rate_limited",
"retry_after_seconds": 60
}{
"message": "The DNS check could not run. Try again in a moment."
}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.