---
title: "Delete a CoreCluster"
url: https://docs.corefinity.com/api/reference/corecluster/delete-cluster
type: endpoint
last_updated: 2026-11-13
feature: clusters
related:
  - https://docs.corefinity.com/guides/corecluster/cluster-overview.md
  - https://docs.corefinity.com/mcp/tools/corecluster_delete.md
---
# Delete a CoreCluster

Deletes the CoreCluster for good, with its capacity and SSH address; read
`GET /corestack/clusters/{cluster}/deletion` first. Without `allow_non_empty` only an empty CoreCluster is
deleted; with it, every site, environment and deleted site in its grace period goes too, with no final
snapshot, and so do their snapshots, except the ones the preview counts in `kept_snapshots`, which stay until
their retention ends. The CoreCluster reads `state` `deleting` until it is gone, then answers `404`.

```http
DELETE /api/corestack/clusters/{cluster}
```

- Scope: `destructive`
- Two-factor: required on your account (all)
- Rate limit: 5 a minute
- Long-running: answers with an operation to poll
- Try it in the console: off. It deletes data that cannot be brought back. Copy the request and run it yourself when you are sure.

## Path parameters

- `cluster` (integer, required): The id of a CoreCluster. Digits only.

## Body

- `allow_non_empty` (boolean): True to delete everything that is still on the CoreCluster with it. Defaults to `false`.
- `confirm_name` (string, required): The CoreCluster's name, exactly.

## Request

### curl

```bash
curl -X DELETE https://manage.corefinity.com/api/corestack/clusters/1017 \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "confirm_name": "Northwind spare"
  }'
```

### PHP

```php
use Illuminate\Support\Facades\Http;

$response = Http::withToken(env('COREFINITY_TOKEN'))
    ->acceptJson()
    ->delete('https://manage.corefinity.com/api/corestack/clusters/1017', [
        'confirm_name' => 'Northwind spare',
    ]);

$data = $response->json();
```

### Node

```javascript
const res = await fetch('https://manage.corefinity.com/api/corestack/clusters/1017', {
  method: 'DELETE',
  headers: {
    Authorization: `Bearer ${process.env.COREFINITY_TOKEN}`,
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    confirm_name: 'Northwind spare',
  }),
});

// An answer with no body (204) has nothing to parse.
const text = await res.text();
const data = text && JSON.parse(text);
```

### Python

```python
import os
import requests

res = requests.delete(
    "https://manage.corefinity.com/api/corestack/clusters/1017",
    headers={
        "Authorization": f"Bearer {os.environ['COREFINITY_TOKEN']}",
        "Accept": "application/json",
    },
    json={
        "confirm_name": "Northwind spare",
    },
)

data = res.json() if res.content else None
```

## Responses

### 202 The deletion has started.

```json
{
  "operation": {
    "applied_at": null,
    "can_retry": false,
    "cluster": {
      "id": 1017,
      "name": "Northwind UK 1"
    },
    "committed_at": null,
    "completed_at": null,
    "created_at": "2026-11-14T10:00:00Z",
    "environment": null,
    "error": null,
    "failure_reason": null,
    "from_version": null,
    "hot": false,
    "id": 5140,
    "install": null,
    "label": "Sites removed",
    "notes": [],
    "parent_operation_id": null,
    "requested_by": {
      "id": 2041,
      "name": "Eleanor Finch"
    },
    "result": null,
    "result_state": "none",
    "retried_by_operation_id": null,
    "retries_operation_id": null,
    "retry_requires": null,
    "scope": "cluster",
    "site": null,
    "status": "pending",
    "status_label": "Removing the sites, 1 site left",
    "step": "sites_removed",
    "steps": [
      {
        "key": "requested",
        "label": "Requested",
        "state": "done"
      },
      {
        "key": "sites_removed",
        "label": "Sites removed",
        "state": "current"
      },
      {
        "key": "snapshots_deleted",
        "label": "Snapshots deleted",
        "state": "todo"
      }
    ],
    "subject": null,
    "summary": "Delete cluster",
    "to_version": null,
    "type": "cluster_delete",
    "type_label": "Delete cluster"
  }
}
```

### 401 No token, or a token that is not valid.

```json
{
  "message": "Unauthenticated."
}
```

### 403 The token lacks the scope (`scope_required`, with the `scope` to use), your company requires two-factor authentication and you have not set it up, or your account has no company that can use Managed Clusters, for example because the company was closed (`company_unavailable` or `company_not_enabled`, whichever the route checks first). For Managed Clusters routes; any other route uses `ForbiddenScopeOrTwoFactor`.

```json
{
  "code": "company_unavailable",
  "message": "Your company is unavailable.",
  "reason": "company_unavailable"
}
```

### 404 The id does not exist or is something you cannot see, or the feature is not on for your company (`feature_off`).

```json
{
  "code": "feature_off",
  "message": "Not found.",
  "reason": "feature_off"
}
```

### 409 Nothing was started. `reason` says why: `cluster_not_empty` (something is still on the CoreCluster and `allow_non_empty` was not true; `details.totals` counts it), `cluster_deleting` (it is already being deleted), `cluster_busy` (it is still being set up, is moving to a new package, or another change to it is running), `legacy_cluster` (Corefinity manages it, so it cannot be deleted here) or `staff_removal` (a site on it can only be removed by Corefinity).

```json
{
  "code": "cluster_deleting",
  "message": "This cluster is being deleted",
  "reason": "cluster_deleting"
}
```

### 422 `confirm_name` is missing or is not the CoreCluster's name exactly (`confirm_mismatch`), or a field is wrong or not part of the request (`invalid`).

```json
{
  "code": "confirm_mismatch",
  "errors": {
    "confirm_name": [
      "Type the cluster's name to confirm"
    ]
  },
  "field": "confirm_name",
  "message": "Type the cluster's name to confirm",
  "reason": "confirm_mismatch"
}
```

### 429 Too many requests (`rate_limited`). Wait for the number of seconds in `Retry-After`, which `retry_after_seconds` repeats.

```json
{
  "code": "rate_limited",
  "message": "Too many requests. Try again in 60 seconds.",
  "reason": "rate_limited",
  "retry_after_seconds": 60
}
```

### 502 The platform could not be read or written to, so the deletion did not start and the CoreCluster is as it was.

```json
{
  "message": "The change could not be saved. Contact support."
}
```

### 503 Corefinity has switched this action off for the moment. Try again later.

```json
{
  "code": "switched_off",
  "message": "Deleting is switched off at the moment",
  "reason": "switched_off",
  "switch": "delete"
}
```

## If it is refused

| Status | Reason | What to do |
|---|---|---|
| 401 |  | 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 | `cluster_deleting` | The cluster is being deleted. Nothing can be changed on it. |
| 409 | `cluster_not_empty` | The cluster still holds sites, environments or snapshots. Show the person what would be removed and call again only with their agreement. |
| 409 | `legacy_cluster` | Corefinity manages this cluster. Contact support to change its package or delete it. |
| 409 | `cluster_busy` | Another change to the cluster is running. Wait for it to finish, then try again. |
| 409 | `staff_removal` | The cluster holds something only Corefinity can remove. Contact support to delete it. |
| 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`. |
| 502 |  | Read the message; it says what happened. |
| 503 | `switched_off` | Corefinity has switched this action off for the moment. Try again later. |

## The same task elsewhere

- Guide: [Cluster overview](https://docs.corefinity.com/guides/corecluster/cluster-overview.md)
- MCP tool: [`corecluster_delete`](https://docs.corefinity.com/mcp/tools/corecluster_delete.md)
