---
title: "Check what fits a CoreCluster"
url: https://docs.corefinity.com/api/reference/corecluster/check-cluster-capacity
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_capacity_check.md
---
# Check what fits a CoreCluster

Answers whether new sites and environments, the removal of others, or another package would fit the
CoreCluster, without creating or reserving anything. A proposal that would not fit still answers `200`, with
the reasons in `blocking`; an empty body answers the CoreCluster as it is now.

```http
POST /api/corestack/clusters/{cluster}/capacity/check
```

- Scope: `read`
- Two-factor: required on your account (all)
- Rate limit: 60 a minute
- Try it in the console: on

## Path parameters

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

## Body

- `environments` (array of objects): Environments to add.
  - `platform` (string, required): A platform, such as `wordpress`, `laravel` or `magento2`.
  - `tier` (string, required): A size the platform has, such as `S`, `M` or `L`.
- `package` (string or null): The key of another package to measure against. Leave it out to use the CoreCluster's own.
- `remove` (array of integers): The site row ids of sites and environments of the CoreCluster to take away first, as numbers. At most 50.
- `sites` (array of objects): Sites to add.

## Request

### curl

```bash
curl -X POST https://manage.corefinity.com/api/corestack/clusters/1017/capacity/check \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "sites": [
      {
        "platform": "wordpress",
        "tier": "S"
      }
    ]
  }'
```

### PHP

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

$response = Http::withToken(env('COREFINITY_TOKEN'))
    ->acceptJson()
    ->post('https://manage.corefinity.com/api/corestack/clusters/1017/capacity/check', [
        'sites' => [
            [
                'platform' => 'wordpress',
                'tier' => 'S',
            ],
        ],
    ]);

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

### Node

```javascript
const res = await fetch('https://manage.corefinity.com/api/corestack/clusters/1017/capacity/check', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.COREFINITY_TOKEN}`,
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    sites: [
      {
        platform: 'wordpress',
        tier: 'S',
      },
    ],
  }),
});

// 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.post(
    "https://manage.corefinity.com/api/corestack/clusters/1017/capacity/check",
    headers={
        "Authorization": f"Bearer {os.environ['COREFINITY_TOKEN']}",
        "Accept": "application/json",
    },
    json={
        "sites": [
            {
                "platform": "wordpress",
                "tier": "S",
            },
        ],
    },
)

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

## Responses

### 200 The capacity of the CoreCluster now and with the proposal.

```json
{
  "added": {
    "cpu_millicores": 150,
    "disk_bytes": 10737418240,
    "environments": 0,
    "memory_bytes": 805306368,
    "sites": 1
  },
  "blocking": [],
  "cluster": {
    "id": 1017,
    "name": "Northwind UK 1"
  },
  "current": {
    "basis": "p95",
    "cpu": {
      "capacity_millicores": 4000,
      "level": "ok",
      "percent": 6,
      "used_p95_millicores": 240
    },
    "evaluated_at": "2026-11-14T09:50:00Z",
    "level": "ok",
    "memory": {
      "capacity_bytes": 17179869184,
      "level": "ok",
      "percent": 6,
      "used_p95_bytes": 1073741824
    },
    "package": {
      "cores": 4,
      "key": "xsmall",
      "memory_bytes": 17179869184,
      "name": "Extra small"
    },
    "sites": {
      "count": 1,
      "environments": 0
    },
    "storage": {
      "capacity_bytes": 214748364800,
      "level": "ok",
      "percent": 5,
      "provisioned_bytes": 10737418240
    }
  },
  "evaluated_at": "2026-11-14T09:50:00Z",
  "ok": true,
  "package": {
    "key": "xsmall",
    "name": "Extra small"
  },
  "projected": {
    "basis": "mixed",
    "cpu": {
      "capacity_millicores": 4000,
      "level": "ok",
      "percent": 9,
      "used_p95_millicores": 390
    },
    "evaluated_at": "2026-11-14T09:50:00Z",
    "level": "ok",
    "memory": {
      "capacity_bytes": 17179869184,
      "level": "ok",
      "percent": 10,
      "used_p95_bytes": 1879048192
    },
    "package": {
      "cores": 4,
      "key": "xsmall",
      "memory_bytes": 17179869184,
      "name": "Extra small"
    },
    "sites": {
      "count": 2,
      "environments": 0
    },
    "storage": {
      "capacity_bytes": 214748364800,
      "level": "ok",
      "percent": 10,
      "provisioned_bytes": 21474836480
    }
  },
  "warnings": []
}
```

### 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 it is something you cannot see. Both answer the same body.

```json
{
  "message": "Not found."
}
```

### 422 The proposal is not one (`invalid`): a field that is not part of the request, a row that is not a known platform and size, more than 50 rows in all, a `remove` id that is not on the CoreCluster, or a package that does not exist.

```json
{
  "code": "invalid",
  "errors": {
    "remove.0": [
      "That site or environment is not on this cluster"
    ]
  },
  "field": "remove.0",
  "message": "That site or environment is not on this cluster",
  "reason": "invalid"
}
```

### 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
}
```

## 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 |  | Check the id. You see only what your account can reach. |
| 422 | `invalid` | Fix the field named in `field`; `errors` says why. |
| 429 | `rate_limited` | Wait for the seconds in `Retry-After`. |

## The same task elsewhere

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