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.
Path parameters
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
A copy that waits its turn, as the Control Panel, this API and an MCP client all show it.
Fields
How many copies on the same website are in front of this one. Null once it is no longer in the queue.
When the copy stops waiting. Six hours after it was queued, by default. Format: date-time.
When it started, was cancelled, was refused or expired. Format: date-time.
The id getQueuedCopy and cancelQueuedCopy take. At least 1.
The same in plain words. Null once it has started.
The copy's operation once it has started, for getOperation. At least 1.
When the copy was queued. Format: date-time.
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.
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.
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.
waitingstartingstartedrefusedexpiredcancelledAn environment of a queued copy. Unlike the shared Named, name is null once the environment is gone.
Fields
The environment's site row id, the {site} of /corestack/sites/{site}. At least 1.
The environment's name. Null for a target that no longer exists.
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 | not_waiting | This copy is no longer waiting, so it cannot be cancelled. |
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 DELETE https://manage.corefinity.com/api/corestack/copy-queue/1 \
-H "Authorization: Bearer $COREFINITY_TOKEN" \
-H "Accept: application/json"use Illuminate\Support\Facades\Http;
$response = Http::withToken(env('COREFINITY_TOKEN'))
->acceptJson()
->delete('https://manage.corefinity.com/api/corestack/copy-queue/1');
$data = $response->json();const res = await fetch('https://manage.corefinity.com/api/corestack/copy-queue/1', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.COREFINITY_TOKEN}`,
Accept: 'application/json',
},
});
// 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.delete(
"https://manage.corefinity.com/api/corestack/copy-queue/1",
headers={
"Authorization": f"Bearer {os.environ['COREFINITY_TOKEN']}",
"Accept": "application/json",
},
)
data = res.json() if res.content else None{
"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"
}
}
}{
"message": "Unauthenticated."
}{
"code": "company_unavailable",
"message": "Your company is unavailable.",
"reason": "company_unavailable"
}{
"code": "feature_off",
"message": "Not found.",
"reason": "feature_off"
}{
"code": "not_waiting",
"message": "This copy is no longer waiting, so it cannot be cancelled.",
"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"
}
},
"reason": "not_waiting"
}{
"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 has not been cleared for the console. Copy the request and run it yourself when you are sure.