---
title: "Update a site's package"
url: https://docs.corefinity.com/api/reference/sites/update-site-package
type: endpoint
last_updated: 2026-11-13
feature: upgrades
related:
  - https://docs.corefinity.com/guides/sites/size-and-capacity/upgrade-a-package.md
  - https://docs.corefinity.com/mcp/tools/corestack_site_package_change.md
---
# Update a site's package

Moves a site to a larger package, billed at the new price from the hour the change starts; a smaller package
is arranged with support. `apply` chooses when: a change that waits answers `queued` with the `item` that
waits and no `operation` yet. Send a quote's `id` as `quote_id` to make the change only at the price you were
shown.

```http
POST /api/corestack/sites/{site}/package
```

- Scope: `write`
- Two-factor: required on your account (all)
- Rate limit: 10 a minute
- Long-running: answers with an operation to poll
- Try it in the console: off. It can add to your bill. Copy the request and run it yourself when you are sure.

## Path parameters

- `site` (integer, required): The id of a site row. A website's production site and each of its environments has its own id. Digits only.

## Body

- `apply` (string): When a change that needs a maintenance window is applied. `now` applies it at once. `tonight` queues it for the site's next window. `window` means the same as `tonight`. An endpoint that takes `window` only while maintenance windows are on for your company says so, and refuses it `422` on `apply` otherwise. One of `now`, `tonight`, `window`. Defaults to `now`.
- `confirm_domain` (string, required): The site's domain, typed to confirm.
- `package` (string, required): The package to move to, by its code, such as `CS8`.
- `quote_id` (string or null): The `id` of a quote from `POST /corestack/billing/quote`. With it, the change is refused `409 stale` when the price is no longer the quote's.

## Request

### curl

```bash
curl -X POST https://manage.corefinity.com/api/corestack/sites/1042/package \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "confirm_domain": "harbourandfinch.example.com",
    "package": "CS8"
  }'
```

### PHP

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

$response = Http::withToken(env('COREFINITY_TOKEN'))
    ->acceptJson()
    ->post('https://manage.corefinity.com/api/corestack/sites/1042/package', [
        'confirm_domain' => 'harbourandfinch.example.com',
        'package' => 'CS8',
    ]);

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

### Node

```javascript
const res = await fetch('https://manage.corefinity.com/api/corestack/sites/1042/package', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.COREFINITY_TOKEN}`,
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    confirm_domain: 'harbourandfinch.example.com',
    package: 'CS8',
  }),
});

// 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/sites/1042/package",
    headers={
        "Authorization": f"Bearer {os.environ['COREFINITY_TOKEN']}",
        "Accept": "application/json",
    },
    json={
        "confirm_domain": "harbourandfinch.example.com",
        "package": "CS8",
    },
)

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

## Responses

### 201 The change has started, or is queued, in which case `queued` is `true`.

```json
{
  "item": {
    "applied_at": null,
    "customer_change": {
      "can_cancel": true,
      "requested_at": "2026-11-03T09:00:00Z",
      "requested_by": {
        "id": 2041,
        "name": "Eleanor Finch"
      },
      "summary": "Change package",
      "type": "package_change"
    },
    "error": null,
    "id": 7201,
    "kind": "customer_change",
    "label": "Change package",
    "position": 1,
    "source_operation": null,
    "status": "pending"
  },
  "operation": null,
  "pending": {
    "batch": {
      "id": 7101,
      "not_before": null,
      "priority": 0,
      "status": "open",
      "window_date": "2026-11-03"
    },
    "can_apply_now": {
      "available": true,
      "reason": null
    },
    "environment": {
      "id": 1042,
      "name": "Production",
      "role": "production",
      "slug": "production"
    },
    "items": [
      {
        "applied_at": null,
        "customer_change": {
          "can_cancel": true,
          "requested_at": "2026-11-03T09:00:00Z",
          "requested_by": {
            "id": 2041,
            "name": "Eleanor Finch"
          },
          "summary": "Change package",
          "type": "package_change"
        },
        "error": null,
        "id": 7201,
        "kind": "customer_change",
        "label": "Change package",
        "position": 1,
        "source_operation": null,
        "status": "pending"
      }
    ],
    "site": {
      "domain": "harbourandfinch.example.com",
      "id": 1042
    },
    "tier": null,
    "window": {
      "date": "2026-11-03",
      "ends_at": "2026-11-04T07:00:00Z",
      "label": "Tonight 21:00–07:00 (Europe/London)",
      "starts_at": "2026-11-03T21:00:00Z"
    }
  },
  "queued": true,
  "quote": {
    "applies": "now",
    "currency": "GBP",
    "effective_from": "2026-11-03T09:00:00Z",
    "expires_at": "2026-11-03T09:15:00Z",
    "id": "689f95c6-7747-4255-a377-fb5effe807cd",
    "lines": [
      {
        "after": {
          "amount": "600.00",
          "currency": "GBP"
        },
        "before": {
          "amount": "300.00",
          "currency": "GBP"
        },
        "delta": {
          "amount": "300.00",
          "currency": "GBP"
        },
        "key": "package",
        "label": "Package: CS4 → CS8"
      }
    ],
    "monthly_after": {
      "amount": "600.00",
      "currency": "GBP"
    },
    "monthly_before": {
      "amount": "300.00",
      "currency": "GBP"
    },
    "monthly_delta": {
      "amount": "300.00",
      "currency": "GBP"
    },
    "prorata": {
      "amount": {
        "amount": "277.02",
        "currency": "GBP"
      },
      "from": "2026-11-03T09:00:00Z",
      "hours": 687,
      "to": "2026-12-01T00:00:00Z"
    },
    "tax": {
      "amount": {
        "amount": "60.00",
        "currency": "GBP"
      },
      "kind": "standard",
      "note": "UK VAT 20 %",
      "rate_percent": 20
    },
    "trial": null
  },
  "site": {
    "access_summary": {
      "apply_state": "never",
      "company_keys": 0,
      "keys": 0,
      "users": 0
    },
    "actions": {
      "apply_pending_now": {
        "available": true,
        "reason": null
      },
      "attach_domain": {
        "available": false,
        "reason": "This environment already has a domain attached"
      },
      "change_url": {
        "available": false,
        "reason": "Domains are switched off at the moment"
      },
      "clone": {
        "available": false,
        "reason": "Copying data into an environment is switched off at the moment"
      },
      "create_environment": {
        "available": true,
        "reason": null
      },
      "delete": {
        "available": true,
        "reason": null
      },
      "go_live": {
        "available": false,
        "reason": "This environment already has a domain attached"
      },
      "maintenance": {
        "available": true,
        "reason": null
      },
      "push_to_live": {
        "available": false,
        "reason": "This is production"
      },
      "restore_deleted": {
        "available": false,
        "reason": "This site is not deleted"
      },
      "terminal": {
        "available": false,
        "reason": "The terminal is available once the site is running"
      }
    },
    "adoption": "adopted",
    "billing": {
      "account_id": 9102
    },
    "cloudflare": {
      "connected": false,
      "zone": null
    },
    "cluster": {
      "id": 1017,
      "name": "CoreStack"
    },
    "commands": [],
    "compute_family": "general",
    "counts": {
      "crons": 1
    },
    "crons_enabled": true,
    "database": {
      "host": "127.0.0.1",
      "name": "wordpress",
      "password_revealable": true,
      "port": 3306,
      "username": "application",
      "via": "SSH tunnel"
    },
    "deleted": null,
    "deploy_mode": "manual",
    "deploy_mode_label": "Manual",
    "deployments_summary": {
      "last": null,
      "mode": "manual"
    },
    "domain": "harbourandfinch.example.com",
    "domains_summary": {
      "aliases": 1,
      "dns": "unknown",
      "noindex": false,
      "primary": "harbourandfinch.example.com",
      "tls": "none",
      "www": null
    },
    "email_summary": {
      "sending_domain": null,
      "state": "not_set_up"
    },
    "environment": {
      "env_id": "rs-northwind-harbourandfinch-example-com",
      "hostname": "harbourandfinch-example-com.northwind.cfstack.example.net",
      "id": 1042,
      "name": "Production",
      "role": "production",
      "role_label": "Production",
      "slug": "production"
    },
    "environments": [
      {
        "env_id": "rs-northwind-harbourandfinch-example-com",
        "hostname": "harbourandfinch-example-com.northwind.cfstack.example.net",
        "id": 1042,
        "name": "Production",
        "role": "production",
        "role_label": "Production",
        "slug": "production"
      }
    ],
    "health": "unknown",
    "hosting": {
      "cluster_kind": "platform",
      "label": "CoreStack"
    },
    "http_auth_summary": {
      "apply_state": "applied",
      "enabled": false,
      "rules": 0,
      "users": 0
    },
    "id": 1042,
    "kind": "corestack",
    "lifecycle": "active",
    "limits": {
      "cpu_millicores": 2000,
      "disk_bytes": 10737418240,
      "memory_bytes": 4294967296
    },
    "live": null,
    "logs": null,
    "maintenance": {
      "bypass_corefinity": 1,
      "bypass_ips": [],
      "enabled": false,
      "since": null
    },
    "mariadb": {
      "version": "11.4"
    },
    "mode": "production",
    "mode_label": "Domain attached",
    "operation": null,
    "operations": [],
    "package": {
      "code": "CS4",
      "key": "cs4",
      "name": "CS4"
    },
    "pending_changes": {
      "count": 1,
      "outcome_at": null,
      "state": "pending",
      "window_starts_at": "2026-11-03T21:00:00Z"
    },
    "php": {
      "version": "8.3"
    },
    "platform": {
      "key": "wordpress",
      "label": "WordPress"
    },
    "platform_plugins": {
      "anchor": "#platform-plugins",
      "enabled": true,
      "layout": "classic",
      "reason": null
    },
    "platform_url": "https://harbourandfinch-example-com.northwind.cfstack.example.net",
    "preview": {
      "label": "Platform address",
      "protected": false,
      "url": "https://harbourandfinch-example-com.northwind.cfstack.example.net"
    },
    "primary_url": "https://harbourandfinch.example.com",
    "production_hosts": [
      "harbourandfinch.example.com",
      "www.harbourandfinch.example.com"
    ],
    "provisioning": null,
    "removed": false,
    "restore": null,
    "runtime": {
      "container_memory_limits": {
        "cli": 268435456,
        "mariadb": 1073741824,
        "nginx": 134217728,
        "php": 2617245696,
        "redis": 134217728
      },
      "mariadb": {
        "options": [
          {
            "allowed": false,
            "current": true,
            "label": "MariaDB 11.4",
            "reason": "This is the current version",
            "version": "11.4"
          },
          {
            "allowed": false,
            "current": false,
            "label": "MariaDB 11.8",
            "reason": "Live status is unavailable. Try again in a minute.",
            "version": "11.8"
          },
          {
            "allowed": false,
            "current": false,
            "label": "MariaDB 12.3",
            "reason": "Upgrade one LTS release at a time",
            "version": "12.3"
          }
        ],
        "upgrade_only": true,
        "version": "11.4"
      },
      "node": {
        "major": null,
        "status": null
      },
      "php": {
        "eol_date": "2027-12-31",
        "options": [
          {
            "ack_detail": [],
            "allowed": true,
            "changes": [],
            "current": false,
            "eol_date": "2026-12-31",
            "label": "PHP 8.2",
            "reason": null,
            "requires_ack": [],
            "status": "security",
            "version": "8.2"
          },
          {
            "ack_detail": [],
            "allowed": false,
            "changes": [],
            "current": true,
            "eol_date": "2027-12-31",
            "label": "PHP 8.3",
            "reason": "This is the current version",
            "requires_ack": [],
            "status": "supported",
            "version": "8.3"
          },
          {
            "ack_detail": [],
            "allowed": true,
            "changes": [],
            "current": false,
            "eol_date": "2028-12-31",
            "label": "PHP 8.4",
            "reason": null,
            "requires_ack": [],
            "status": "supported",
            "version": "8.4"
          },
          {
            "ack_detail": [],
            "allowed": true,
            "changes": [],
            "current": false,
            "eol_date": "2029-12-31",
            "label": "PHP 8.5",
            "reason": null,
            "requires_ack": [],
            "status": "supported",
            "version": "8.5"
          }
        ],
        "status": "supported",
        "version": "8.3"
      },
      "requests": {
        "cpu_millicores": 100,
        "memory_bytes": 536870912
      }
    },
    "settings": {
      "auto_deploy": false,
      "http_auth_enabled": false,
      "scheduled_snapshots": true
    },
    "site": {
      "domain": "harbourandfinch.example.com",
      "id": 1042
    },
    "site_id": "rs-northwind-harbourandfinch-example-com",
    "snapshots": {
      "count": 0,
      "effective_frequency": "6h",
      "effective_label": "Every 6 hours",
      "latest": null,
      "latest_ready_at": null,
      "next_scheduled_at": "2026-11-03T12:03:00Z",
      "overridden": false,
      "stored_gb": 0
    },
    "ssh": {
      "command": "ssh -p 20001 web@ssh-northwind.example.net",
      "host": "ssh-northwind.example.net",
      "key_management": false,
      "keys": [],
      "port": 20001,
      "sftp_command": "sftp -P 20001 web@ssh-northwind.example.net",
      "tunnel_command": "ssh -N -L 3306:127.0.0.1:3306 -p 20001 web@ssh-northwind.example.net",
      "user": "web",
      "users": 0
    },
    "tier": "cs4",
    "uat_size": null,
    "usage": {
      "cpu_millicores": null,
      "disk_used_bytes": null,
      "memory_bytes": null,
      "observed_at": null,
      "source": null
    }
  }
}
```

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

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

### 403 The token lacks the `write` scope (`scope_required`), your company requires two-factor authentication and you have not set it up (`two_factor_required`), you may not pay for a change (`billing_forbidden`: paying is for the paying company's owner and billing contacts), or you reach the site only as its managing agency (`forbidden`).

```json
{
  "code": "billing_forbidden",
  "message": "Billing is available to your company's owner and billing contacts.",
  "reason": "billing_forbidden"
}
```

### 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 changed. `same_package`: the site is on that package. `downgrade`: the package is smaller. `stale`: the price has moved since the quote. `cluster_site`: the site is inside a CoreCluster, whose package it takes. `no_payment_method`: the billing account has no card or mandate. `not_resizable`, `disk_not_growable`: the site's package or disk cannot be changed here: contact support. `compute_blocked`: there is no room for the larger package at the moment. `busy`, `snapshot_running`, `provisioning`, `deleted`: another change or a snapshot is running, or the site is being created or deleted. `change_pending`: another change of yours already waits for the night: apply it now or cancel it. `demo_keep_required`: the site is a demo that has not been kept (the answer adds `keep_url` and `change`). `managed_elsewhere`: the site is managed by another control panel.

```json
{
  "code": "downgrade",
  "message": "Choose a larger package; downgrades are arranged with support",
  "reason": "downgrade"
}
```

### 422 `confirm_mismatch`: `confirm_domain` is not the site's domain. `invalid`: a field is missing or wrong (`field` names it). On `package` that is a package that does not exist, one the site's platform cannot run (its `errors` entry is the code `package_platform`), one too small for the site's data, or the id of an environment, which has no package of its own; on `apply`, `window` while maintenance windows are off. `feature_off`: `apply: tonight` while changes cannot wait for the night.

```json
{
  "code": "invalid",
  "errors": {
    "apply": [
      "The selected apply is invalid."
    ]
  },
  "field": "apply",
  "message": "The selected apply is invalid.",
  "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
}
```

### 502 The platform did not answer, or did not save the change. Send the request again in a minute. When the site's settings could not be read the answer is `upstream_unavailable`; when the change could not be saved it is a sentence only, with no `reason`.

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

## If it is refused

| Status | Reason | What to do |
|---|---|---|
| 401 |  | Send a valid token as `Authorization: Bearer <token>`. |
| 403 | `billing_forbidden` | Billing is for the organisation's owner and billing contacts. Ask one of them to do this. |
| 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. |
| 409 | `downgrade` | A smaller package cannot be chosen here. Choose a larger one; downgrades are arranged with support. |
| 409 | `same_package` | This is already the package. Choose a different one. |
| 409 | `stale` | What you read has changed since you read it. Read it again, then send the change with its new version or quote. |
| 422 | `invalid` | Fix the field named in `field`; `errors` says why. |
| 422 | `confirm_mismatch` | Send the confirmation exactly as the field named in `field` asks for it. |
| 422 | `feature_off` | This feature is not on for your organisation yet. |
| 429 | `rate_limited` | Wait for the seconds in `Retry-After`. |
| 502 |  | Read the message; it says what happened. |
| 502 | `upstream_unavailable` | A service the action depends on did not answer. Try again later. |

## The same task elsewhere

- Guide: [Upgrade package](https://docs.corefinity.com/guides/sites/size-and-capacity/upgrade-a-package.md)
- MCP tool: [`corestack_site_package_change`](https://docs.corefinity.com/mcp/tools/corestack_site_package_change.md)
