CorefinityCorefinityDocs
Open the Control PanelControl Panel
Copies · 2 of 4

Cancel a copy that waits its turn

Cancels a queued copy while its state is waiting, so nothing is copied. A copy that is being started (starting), has started, or ended without starting answers 409 here; one that has started runs to its end.

DELETE/api/corestack/copy-queue/{queued}

Path parameters

queuedintegerRequired

The id of the waiting copy, queued.id in the answer that queued it. Digits only. At least 1.

Returns

200 The copy was cancelled before it started.

Fields of the 200 answer
queuedobjectRequired

A copy that waits its turn, as the Control Panel, this API and an MCP client all show it.

Fields
aheadinteger or nullRequired

How many copies on the same website are in front of this one. Null once it is no longer in the queue.

deadline_atstring or nullRequired

When the copy stops waiting. Six hours after it was queued, by default. Format: date-time.

ended_atstring or nullRequired

When it started, was cancelled, was refused or expired. Format: date-time.

idintegerRequired

The id getQueuedCopy and cancelQueuedCopy take. At least 1.

messagestring or nullRequired

The same in plain words. Null once it has started.

operation_idinteger or nullRequired

The copy's operation once it has started, for getOperation. At least 1.

queued_atstring or nullRequired

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

reasonstring or nullRequired

A stable code for why it waits or why it ended, such as target_busy, clone_in_progress, busy, snapshot_slot, cancelled, access_ended or two_factor_required. Null once it has started.

sourceobject or any or nullRequired

The environment the copy comes from. Null when you may not see that environment (a copy from another website), where message calls it "the environment it copies from", and when it no longer exists.

statestringRequired

waiting or starting while it is in the queue; started once the copy runs (follow operation_id); refused when a rule failed as it started, or the access that queued it has ended; expired when it could not start before deadline_at; cancelled.

waitingstartingstartedrefusedexpiredcancelled
targetobjectRequired

An environment of a queued copy. Unlike the shared Named, name is null once the environment is gone.

Fields
idintegerRequired

The environment's site row id, the {site} of /corestack/sites/{site}. At least 1.

namestring or nullRequired

The environment's name. Null for a target that no longer exists.

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.
404feature_offThis feature is not on for your organisation yet.
409not_waitingThis copy is no longer waiting, so it cannot be cancelled.
429rate_limitedWait for the seconds in Retry-After.

Reasons are listed by name in Errors and refusals.

The same task elsewhere

curl -X DELETE https://manage.corefinity.com/api/corestack/copy-queue/1 \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json"
{
  "queued": {
    "ahead": null,
    "deadline_at": "2026-11-03T13:00:00Z",
    "ended_at": "2026-11-03T07:02:31Z",
    "id": 6120,
    "message": "Cancelled before it started.",
    "operation_id": null,
    "queued_at": "2026-11-03T07:00:00Z",
    "reason": "cancelled",
    "source": {
      "id": 1042,
      "name": "Production"
    },
    "state": "cancelled",
    "target": {
      "id": 1043,
      "name": "Staging"
    }
  }
}
Try it

Try it is off for this endpointIt has not been cleared for the console. Copy the request and run it yourself when you are sure.

Was this helpful?
Open in ClaudeOpen in ChatGPT