# Delete Cluster

`DELETE /vault/hyok/clusters/{cluster_id}` · Keys & Secrets · HYOK Clusters & Hosts

Deletes a cluster and its host memberships. It is refused while a project is attached: detach the project first. Deleting a cluster that is already gone returns 404. Needs `ORG_ADMIN`.

## Parameters

| Name | In | Required | Description |
|---|---|---|---|
| `orgId` | query | yes | The organisation's id. Example: `"org_O3QAqchb6v7d"`. |
| `cluster_id` | path | yes | The cluster's id: `hyokcluster_` and a UUID. Example: `"hyokcluster_2d7e9f1a-4b6c-4d8e-9f0a-1b2c3d4e5f6a"`. |

## Responses

- **204**: The cluster was deleted.

## Errors

| HTTP | Description |
|---|---|
| 404 | No such cluster. |
| 409 | `K9O_HYOK_CLUSTER_IN_USE`: a project is attached. |
| 500 | An internal error. Retry later. |

## Code samples

### cURL

```bash
curl -X DELETE 'https://<org>.api-<region>.k9o.io/@storefront/vault/hyok/clusters/<clusterId>' \
  -H 'Authorization: Bearer $K9O_TOKEN'
```

### fetch

```javascript
const res = await fetch('https://<org>.api-<region>.k9o.io/@storefront/vault/hyok/clusters/<clusterId>', {
  method: 'DELETE',
  headers: {
    'Authorization': `Bearer ${process.env.K9O_TOKEN}`
  },
});
const { data, meta } = await res.json();
```


Canonical page: https://docs.kilimanjaro.dev/api-playground/keys-secrets/delete-cluster
