# Create Cluster

`POST /vault/hyok/clusters` · Keys & Secrets · HYOK Clusters & Hosts

Groups registered hosts into a cluster. A project attaches to a cluster, not to a single host. A cluster with no hosts is created `inactive`. Needs `ORG_ADMIN`.

## Parameters

| Name | In | Required | Description |
|---|---|---|---|
| `orgId` | query | yes | The organisation's id. Example: `"org_O3QAqchb6v7d"`. |

## Request body

| Field | Type | Required | Description |
|---|---|---|---|
| `hostIds` | array of string | no | IDs of registered hosts to group into this cluster (may be empty → the cluster is created `inactive`). Example: `["hyokhost_9e8d7c6b-5a49-4f3e-8d2c-1b0a9f8e7d6c"]`. |
| `name` | string | yes | Human-readable cluster name. Example: `"luna-prod-eu"`. |
| `region` | string | yes | The region the cluster's hosts are in. A project in another region can't attach to the cluster. Example: `"de01"`. |

```json
{
  "name": "luna-prod-eu",
  "hostIds": [
    "hyokhost_9e8d7c6b-5a49-4f3e-8d2c-1b0a9f8e7d6c"
  ],
  "region": "de01"
}
```

## Responses

- **201**: The cluster was created.

| Field | Type | Required | Description |
|---|---|---|---|
| `attachedProjectIds` | array of string | yes | Project IDs currently in HYOK mode using this cluster. Example: `["3f2b8c1e-5d4a-4e6f-9a7b-1c2d3e4f5a6b"]`. |
| `createdAt` | string (date-time) | yes | Cluster creation timestamp. Example: `"2026-11-01T08:00:00.000Z"`. |
| `hostIds` | array of string | yes | IDs of hosts in this cluster. Example: `["hyokhost_9e8d7c6b-5a49-4f3e-8d2c-1b0a9f8e7d6c"]`. |
| `id` | string | yes | Cluster identifier — UUID prefixed `"hyokcluster_"`. Example: `"hyokcluster_0b6f2c1e-3d4a-4b5c-8d9e-0f1a2b3c4d5e"`. |
| `name` | string | yes | Human-readable cluster name. Example: `"luna-prod-eu"`. |
| `orgId` | string | yes | Owning org. Example: `"org_8kP3wQ9zLm2X"`. |
| `region` | string | yes | Region — must match the Kibo project's region pin at attach time. Example: `"de01"`. |
| `status` | enum ("active", "warning", "degraded", "inactive") | yes | HYOK cluster operational status. |


## Errors

| HTTP | Description |
|---|---|
| 400 | The name or the region is empty. |
| 401 | The request carries no authenticated caller. |
| 500 | An internal error. Retry later. |

## Code samples

### cURL

```bash
curl -X POST 'https://<org>.api-<region>.k9o.io/@storefront/vault/hyok/clusters' \
  -H 'Authorization: Bearer $K9O_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "luna-prod-eu",
  "hostIds": [
    "hyokhost_9e8d7c6b-5a49-4f3e-8d2c-1b0a9f8e7d6c"
  ],
  "region": "de01"
}'
```

### fetch

```javascript
const res = await fetch('https://<org>.api-<region>.k9o.io/@storefront/vault/hyok/clusters', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${process.env.K9O_TOKEN}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
  "name": "luna-prod-eu",
  "hostIds": [
    "hyokhost_9e8d7c6b-5a49-4f3e-8d2c-1b0a9f8e7d6c"
  ],
  "region": "de01"
}),
});
const { data, meta } = await res.json();
```


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