CorefinityCorefinityDocs
Open the Control PanelControl Panel
Enterprise copies · 1 of 5

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.

POST/api/enterprise-copies

Body

confirm_target_sitestringRequired

The site's name, as the preview answers it in confirm.

enterprise_env_idintegerRequired

The CoreStack Enterprise environment to copy from. 1 to 2147483647.

target_site_idintegerRequired

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
copyobjectRequired
Fields
copiedobject or any or nullRequired

What the run copied. Null until it has ended.

copied_atstring or nullRequired

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.

copy_ofinteger or nullRequired

The copy this one followed, when it was made by a re-sync. At least 1.

created_atstring or nullRequired

When the copy was started. Format: date-time.

database_bytesinteger or nullRequired

The size of the environment's database, measured when the copy started.

errorstring or nullRequired

For a failed copy, what happened and what to do next.

failure_reasonstring or nullRequired

For a failed copy, the stable code of why.

files_bytesinteger or nullRequired

The size of the environment's files, measured when the copy started.

finishablebooleanRequired

Whether the copy itself is ready to be finished. The site's own checks are made when you finish it.

finished_atstring or nullRequired

When the copy was finished. Format: date-time.

idintegerRequired

At least 1.

operationobject or any or nullRequired

The copy's run, as an operation of the site.

phasestringRequired

presync until the copy ends, then done (finished, or followed by a newer copy) or failed.

source_environment_idintegerRequired

At least 1.

statestringRequired

running while the copy runs, waiting once its run has ended, failed when it failed.

stepstring or nullRequired

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.

superseded_byinteger or nullRequired

The copy a re-sync made after this one. At least 1.

target_cluster_idintegerRequired

At least 1.

target_site_idintegerRequired

At least 1.

unactivated_atstring or nullRequired

When the site was last checked to be a copy and not a live site. Format: date-time.

pollstringRequired

The path to read the copy at.

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.
404noneCheck the id. You see only what your account can reach.
409consumer_hold_offCopies are paused at the moment. Try again later.
409copy_existsThe target already has an unfinished copy. Finish or re-sync that one.
409neutralise_offCopies are paused at the moment. Try again later.
409platform_mismatchThe site and the environment run different platforms. Copy into a site of the same platform.
409source_movingThe environment has a move open, or has moved to CoreStack. Copy it once the move is settled, or copy from its new site.
409source_unsupportedThis environment cannot be copied as it is. Contact support to find out why.
409target_busyThe environment to copy or restore into is busy with another change. Nothing was changed. Wait, then try again.
409target_crons_onThe site to copy into has its scheduled tasks on. Switch them off before copying into it.
409target_liveThe site to copy into has a domain attached, and a copy never overwrites a live site. Choose a site that is not live.
409target_not_readyThe site to copy into is not ready to take a copy. Read the message: wait until it is ready, or choose another site.
409target_too_smallThe site's disk (20.0 GiB) cannot hold this copy (40.0 GiB of files and database).
409target_unprotectedThe site to copy into is not protected by HTTP authentication over the whole environment. Protect it first: copied data must never be public.
422confirm_mismatchSend the confirmation exactly as the field named in field asks for it.
422invalidFix the field named in field; errors says why.
429rate_limitedWait 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
  }'
{
  "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"
}
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