Attach a domain to a site
Takes the site or environment live on the hostnames you send. confirm_domain is the site's domain on production, or the domain you are attaching on any other environment, typed exactly. With point_dns the DNS records are written in your connected Cloudflare account before the attach starts, and each record written counts against your company's 60 Cloudflare changes an hour.
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
On production, the site's domain. On another environment, the canonical you are attaching. Typed exactly.
True to let point_dns replace DNS records that already exist. Defaults to false.
The Magento store shown on the primary; omitted or null uses Magento's default.
Up to 10 items.
True to attach before DNS points at the platform. Each hostname that does not point here yet needs the TXT record that proves it is yours; the refusal names the record and its value. Defaults to false.
True to point DNS through your connected Cloudflare account. Cannot be sent with pending_dns. Defaults to false.
True once you have checked in Cloudflare that the record of each hostname in the check's proxied_unconfirmed points at its expected_ip. Defaults to false.
For each extra domain on Shopware or Magento 2, redirect or storefront. Each Magento storefront needs an entry in stores.
redirectstorefrontMagento 2 only. Every key is a hostname in hosts with serve set to storefront; every such hostname needs an entry. One base_url address can be chosen per website or store view.
wwwbareReturns
201 The attach 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 | already_attached | The environment already has a domain. Change it under Domains instead. |
409 | not_connected | The outside account this needs is not connected for your company. Connect it first; the message names it. |
422 | confirm_mismatch | Send the confirmation exactly as the field named in field asks for it. |
422 | confirm_replacements | Existing DNS records would be replaced. Confirm to continue. |
422 | invalid | Fix the field named in field; errors says why. |
422 | too_many | Too many DNS changes in one go. Point the hosts in two steps. |
429 | rate_limited | Wait for the seconds in Retry-After. |
500 | none | Read the message; it says what happened. |
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/attach-domain \
-H "Authorization: Bearer $COREFINITY_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"canonical": "www.harbourandfinch.example.org",
"confirm_domain": "harbourandfinch.example.org",
"hosts": [
"harbourandfinch.example.org",
"www.harbourandfinch.example.org"
],
"www": "www"
}'use Illuminate\Support\Facades\Http;
$response = Http::withToken(env('COREFINITY_TOKEN'))
->acceptJson()
->post('https://manage.corefinity.com/api/corestack/sites/1042/attach-domain', [
'canonical' => 'www.harbourandfinch.example.org',
'confirm_domain' => 'harbourandfinch.example.org',
'hosts' => [
'harbourandfinch.example.org',
'www.harbourandfinch.example.org',
],
'www' => 'www',
]);
$data = $response->json();const res = await fetch('https://manage.corefinity.com/api/corestack/sites/1042/attach-domain', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.COREFINITY_TOKEN}`,
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({
canonical: 'www.harbourandfinch.example.org',
confirm_domain: 'harbourandfinch.example.org',
hosts: [
'harbourandfinch.example.org',
'www.harbourandfinch.example.org',
],
www: 'www',
}),
});
// 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/attach-domain",
headers={
"Authorization": f"Bearer {os.environ['COREFINITY_TOKEN']}",
"Accept": "application/json",
},
json={
"canonical": "www.harbourandfinch.example.org",
"confirm_domain": "harbourandfinch.example.org",
"hosts": [
"harbourandfinch.example.org",
"www.harbourandfinch.example.org",
],
"www": "www",
},
)
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:16:41Z",
"environment": {
"env_id": "rs-harbourandfinch-example-org",
"hostname": "example-org-example.cfstack.io",
"id": 1042,
"name": "Production",
"role": "production",
"role_label": "Production",
"slug": "production"
},
"error": null,
"failure_reason": null,
"from_version": null,
"hot": false,
"id": 77142,
"label": "Saved to the platform",
"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.org",
"id": 1042
},
"status": "pending",
"status_label": "Saving change",
"step": "committed",
"steps": [
{
"key": "checks",
"label": "DNS checked",
"state": "done"
},
{
"key": "committed",
"label": "Saved to the platform",
"state": "current"
},
{
"key": "rolled",
"label": "Change applied",
"state": "todo"
},
{
"key": "rewritten",
"label": "Site URL updated",
"state": "todo"
},
{
"key": "certificate",
"label": "Certificate issued",
"state": "todo"
},
{
"key": "live",
"label": "Domain attached",
"state": "todo"
}
],
"summary": "Attach www.harbourandfinch.example.org",
"to_version": null,
"type": "attach_domain",
"type_label": "Attach domain"
}{
"message": "Unauthenticated."
}{
"code": "company_unavailable",
"message": "Your company is unavailable.",
"reason": "company_unavailable"
}{
"code": "feature_off",
"message": "Not found.",
"reason": "feature_off"
}{
"code": "already_attached",
"message": "This environment already has a domain. Change it in the Domains tab.",
"reason": "already_attached"
}{
"code": "confirm_mismatch",
"errors": {
"confirm_domain": [
"Type the site's domain exactly to confirm"
]
},
"field": "confirm_domain",
"message": "Type the site's domain exactly to confirm",
"reason": "confirm_mismatch"
}{
"code": "rate_limited",
"message": "Too many Cloudflare changes this hour. Try again later.",
"reason": "rate_limited"
}{
"message": "Server Error"
}{
"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.