---
title: "Check whether a new site fits"
url: https://docs.corefinity.com/api/reference/sites/check-cluster-site-capacity
type: endpoint
last_updated: 2026-11-13
feature: sites
related:
  - https://docs.corefinity.com/guides/sites/create-and-manage/site-overview.md
  - https://docs.corefinity.com/mcp/tools/corestack_capacity_check.md
---
# Check whether a new site fits

Checks whether a new CoreStack site with this package would fit in a region, without creating or reserving
anything. `ok` is false when the create would be refused, and `blocking` says why.

```http
POST /api/corestack/capacity/check
```

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

## Body

- `company` (integer): Your own company. Any other company is refused `422` on `company`.
- `compute_family` (string): The server type. One is accepted only while it is offered to your company and in the region. One of `general`, `optimised`. Defaults to `general`.
- `environments` (array of objects): One entry for each staging environment to create with the site.
  - `uat_size` (string, required): A staging size key, such as `xsmall`.
- `package` (string, required): The key of an active CoreStack package, such as `cs4`.
- `region` (string, required): A region key of two to four lower-case letters, such as `uk`.

## Request

### curl

```bash
curl -X POST https://manage.corefinity.com/api/corestack/capacity/check \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "package": "cs4",
    "region": "uk"
  }'
```

### PHP

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

$response = Http::withToken(env('COREFINITY_TOKEN'))
    ->acceptJson()
    ->post('https://manage.corefinity.com/api/corestack/capacity/check', [
        'package' => 'cs4',
        'region' => 'uk',
    ]);

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

### Node

```javascript
const res = await fetch('https://manage.corefinity.com/api/corestack/capacity/check', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.COREFINITY_TOKEN}`,
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    package: 'cs4',
    region: 'uk',
  }),
});

// 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/capacity/check",
    headers={
        "Authorization": f"Bearer {os.environ['COREFINITY_TOKEN']}",
        "Accept": "application/json",
    },
    json={
        "package": "cs4",
        "region": "uk",
    },
)

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

## Responses

### 200 The result of the check.

```json
{
  "added": {
    "cpu_millicores": 4500,
    "disk_bytes": 236223201280,
    "environments": 1,
    "memory_bytes": 19327352832,
    "sites": 1
  },
  "blocking": [],
  "cluster": {
    "id": 1009,
    "name": "CoreStack"
  },
  "current": null,
  "evaluated_at": "2026-11-04T11:32:06Z",
  "node_pending": null,
  "ok": true,
  "package": {
    "key": "cs4",
    "name": "CS4"
  },
  "projected": null,
  "rows": [
    {
      "node_pending": null,
      "role": "production",
      "tier": "shared",
      "uat_size": null
    },
    {
      "node_pending": null,
      "role": "staging",
      "tier": "shared",
      "uat_size": "xsmall"
    }
  ],
  "storage_pending": false,
  "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 you cannot create sites for your company (`forbidden`).

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

### 404 The feature is not on for your company.

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

### 422 A field is missing, wrong or not part of this request.

```json
{
  "code": "invalid",
  "errors": {
    "package": [
      "Choose a package"
    ]
  },
  "field": "package",
  "message": "Choose a package",
  "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 | `forbidden` | The person is not allowed to do this. |
| 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. |
| 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: [Site overview](https://docs.corefinity.com/guides/sites/create-and-manage/site-overview.md)
- MCP tool: [`corestack_capacity_check`](https://docs.corefinity.com/mcp/tools/corestack_capacity_check.md)
