Copy the environment again
Copies the environment into the same site again, once this copy's run has ended: the answer is a new copy whose copy_of is this one. Only the site's latest copy can be re-synced, whether it is resting, finished or failed; the site and the environment are checked again as a start checks them, and confirm_target_site is asked again because everything the site holds is replaced.
Path parameters
The id of a copy, as a start or a re-sync answers it. Digits only; 0 or an id above 2147483647 is refused 422.
Body
The name of the copy's site, as the preview answers it in confirm.
Returns
202 A new 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 | copy_not_latest | A newer copy of the site exists. Re-sync that one. |
409 | copy_running | The copy is still running. Wait for its run to end. |
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/6201/resync \
-H "Authorization: Bearer $COREFINITY_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"confirm_target_site": "harbourandfinch-example-com-trial"
}'use Illuminate\Support\Facades\Http;
$response = Http::withToken(env('COREFINITY_TOKEN'))
->acceptJson()
->post('https://manage.corefinity.com/api/enterprise-copies/6201/resync', [
'confirm_target_site' => 'harbourandfinch-example-com-trial',
]);
$data = $response->json();const res = await fetch('https://manage.corefinity.com/api/enterprise-copies/6201/resync', {
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-trial',
}),
});
// 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/6201/resync",
headers={
"Authorization": f"Bearer {os.environ['COREFINITY_TOKEN']}",
"Accept": "application/json",
},
json={
"confirm_target_site": "harbourandfinch-example-com-trial",
},
)
data = res.json() if res.content else None{
"copy": {
"copied": null,
"copied_at": null,
"copy_of": 6201,
"created_at": "2026-11-03T14:30:00+00:00",
"database_bytes": 10737418240,
"error": null,
"failure_reason": null,
"files_bytes": 32212254720,
"finishable": false,
"finished_at": null,
"id": 6202,
"operation": {
"id": 5143,
"status": "executing",
"step": "protected"
},
"phase": "presync",
"source_environment_id": 1311,
"state": "running",
"step": "guard",
"superseded_by": null,
"target_cluster_id": 1017,
"target_site_id": 1081,
"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": "copy_not_latest",
"message": "A newer copy of this site exists: re-sync that one.",
"reason": "copy_not_latest"
}{
"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.