Create an Enterprise copy
Copies the environment's files and database into the site, replacing everything the site holds; nothing is written on the environment. Send the site's name as confirm_target_site, as the preview answers it in confirm, then read the copy at poll until state is no longer running.
Body
The site's name, as the preview answers it in confirm.
The CoreStack Enterprise environment to copy from. 1 to 2147483647.
The CoreCluster site to copy into. Everything it holds is replaced. 1 to 2147483647.
Returns
202 The copy started. Follow it at poll. Poll the operation until it finishes.
Fields of the 202 answer
Fields
What the run copied. Null until it has ended.
When the copy's run last ended. A copy's times are sent in UTC with a +00:00 offset, not Z. Format: date-time.
The copy this one followed, when it was made by a re-sync. At least 1.
When the copy was started. Format: date-time.
The size of the environment's database, measured when the copy started.
For a failed copy, what happened and what to do next.
For a failed copy, the stable code of why.
The size of the environment's files, measured when the copy started.
Whether the copy itself is ready to be finished. The site's own checks are made when you finish it.
When the copy was finished. Format: date-time.
At least 1.
The copy's run, as an operation of the site.
presync until the copy ends, then done (finished, or followed by a newer copy) or failed.
At least 1.
running while the copy runs, waiting once its run has ended, failed when it failed.
Where the copy is: guard, transfer, fixups and check while it runs, copied once its run has ended, superseded when a re-sync followed it, finished when it was finished.
The copy a re-sync made after this one. At least 1.
At least 1.
At least 1.
When the site was last checked to be a copy and not a live site. Format: date-time.
The path to read the copy at.
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 | none | Check the id. You see only what your account can reach. |
409 | consumer_hold_off | Copies are paused at the moment. Try again later. |
409 | copy_exists | The target already has an unfinished copy. Finish or re-sync that one. |
409 | neutralise_off | Copies are paused at the moment. Try again later. |
409 | platform_mismatch | The site and the environment run different platforms. Copy into a site of the same platform. |
409 | source_moving | The environment has a move open, or has moved to CoreStack. Copy it once the move is settled, or copy from its new site. |
409 | source_unsupported | This environment cannot be copied as it is. Contact support to find out why. |
409 | target_busy | The environment to copy or restore into is busy with another change. Nothing was changed. Wait, then try again. |
409 | target_crons_on | The site to copy into has its scheduled tasks on. Switch them off before copying into it. |
409 | target_live | The site to copy into has a domain attached, and a copy never overwrites a live site. Choose a site that is not live. |
409 | target_not_ready | The site to copy into is not ready to take a copy. Read the message: wait until it is ready, or choose another site. |
409 | target_too_small | The site's disk (20.0 GiB) cannot hold this copy (40.0 GiB of files and database). |
409 | target_unprotected | The site to copy into is not protected by HTTP authentication over the whole environment. Protect it first: copied data must never be public. |
422 | confirm_mismatch | Send the confirmation exactly as the field named in field asks for it. |
422 | invalid | Fix the field named in field; errors says why. |
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 POST https://manage.corefinity.com/api/enterprise-copies \
-H "Authorization: Bearer $COREFINITY_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"confirm_target_site": "harbourandfinch-example-com-staging",
"enterprise_env_id": 1312,
"target_site_id": 1043
}'use Illuminate\Support\Facades\Http;
$response = Http::withToken(env('COREFINITY_TOKEN'))
->acceptJson()
->post('https://manage.corefinity.com/api/enterprise-copies', [
'confirm_target_site' => 'harbourandfinch-example-com-staging',
'enterprise_env_id' => 1312,
'target_site_id' => 1043,
]);
$data = $response->json();const res = await fetch('https://manage.corefinity.com/api/enterprise-copies', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.COREFINITY_TOKEN}`,
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({
confirm_target_site: 'harbourandfinch-example-com-staging',
enterprise_env_id: 1312,
target_site_id: 1043,
}),
});
// 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/enterprise-copies",
headers={
"Authorization": f"Bearer {os.environ['COREFINITY_TOKEN']}",
"Accept": "application/json",
},
json={
"confirm_target_site": "harbourandfinch-example-com-staging",
"enterprise_env_id": 1312,
"target_site_id": 1043,
},
)
data = res.json() if res.content else None{
"copy": {
"copied": null,
"copied_at": null,
"copy_of": null,
"created_at": "2026-11-03T12:00:00+00:00",
"database_bytes": 10737418240,
"error": null,
"failure_reason": null,
"files_bytes": 32212254720,
"finishable": false,
"finished_at": null,
"id": 6202,
"operation": {
"id": 5142,
"status": "executing",
"step": "protected"
},
"phase": "presync",
"source_environment_id": 1312,
"state": "running",
"step": "guard",
"superseded_by": null,
"target_cluster_id": 1017,
"target_site_id": 1043,
"unactivated_at": null
},
"poll": "/api/enterprise-copies/6202"
}{
"message": "Unauthenticated."
}{
"code": "company_unavailable",
"message": "Your company is unavailable.",
"reason": "company_unavailable"
}{
"message": "Not found."
}{
"code": "consumer_hold_off",
"message": "Copies are paused at the moment. Try again later.",
"reason": "consumer_hold_off"
}{
"code": "confirm_mismatch",
"field": "confirm_target_site",
"message": "Type the site's name (harbourandfinch-example-com-trial) to confirm: the copy replaces its files and its database.",
"reason": "confirm_mismatch"
}{
"code": "rate_limited",
"message": "Too many requests. Try again in 60 seconds.",
"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.