Create a site and deploy it
Create a WordPress site, follow it until it is ready, connect its repository and deploy.
Creating a site opens a contract for it. This recipe creates the WordPress site journal.harbourandfinch.example.com, switches it to git deployments and deploys its repository.
Before you start
- A token with the
readandwritescopes and the Deploy tick, which starting the deployment needs, andexecto read the new site's login in step 4. - A role with the Manage Deployment Source, Manage Deployment Repositories and Create Deployments permissions, for steps 5 to 7.
- Steps 2 to 8 need two-factor enrolment when your company requires it.
- No step waits for a maintenance window.
Every successful create is billable. There is no test mode.
Choose a version
List the application versions offered where the site will run. This step is optional.
curl "https://manage.corefinity.com/api/app-versions?platform=wordpress&placement=region:uk" \ -H "Authorization: Bearer $COREFINITY_TOKEN" -H "Accept: application/json"Create the site
Send where the site runs, its package, the site itself and the environments to create with it.
content: freshinstalls the application;content: emptyleaves the site empty for your own code.curl -X POST https://manage.corefinity.com/api/corestack/sites \ -H "Authorization: Bearer $COREFINITY_TOKEN" -H "Accept: application/json" \ -H "Content-Type: application/json" \ -d '{ "placement": {"kind": "platform", "region": "uk"}, "package": "cs4", "site": {"platform": "wordpress", "domain": "journal.harbourandfinch.example.com", "content": "fresh", "php_version": "8.3"}, "environments": [] }'Status Meaning 201The create has started 202The create is accepted and waits for room Either way the answer carries the new site and the operation to follow. Note
site.idandoperation.id.Follow the operation
Read the operation every few seconds until its
statusiscompletedorfailed; see Long-running work.curl https://manage.corefinity.com/api/corestack/operations/5120 \ -H "Authorization: Bearer $COREFINITY_TOKEN" -H "Accept: application/json"Read the first login
A fresh install creates an administrator, shown once; skip this step for an
emptysite. This request needs theexecscope and no body, and answers200.curl -X POST https://manage.corefinity.com/api/corestack/sites/1051/provisioning/reveal \ -H "Authorization: Bearer $COREFINITY_TOKEN" -H "Accept: application/json"{ "credentials": { "admin": {"url": "https://journal.harbourandfinch.example.com/wp-admin/", "username": "journal_admin", "password": "Example-admin-2026"}, "revealed_at": "2026-11-03T09:20:00+00:00", "note": "Shown once. Store it in your password manager." }, "revealed_at": "2026-11-03T09:20:00+00:00", "remaining": 0 }Switch the site to git deployments
A new site deploys by upload. Switching to git answers
201with theoperationthat moves the site's files into the releases layout; follow it as in step 3.The switch replaces the upload layout with the releases layout; switching back to
manualmoves the files back.curl -X PUT https://manage.corefinity.com/api/corestack/sites/1051/deployments/mode \ -H "Authorization: Bearer $COREFINITY_TOKEN" -H "Accept: application/json" \ -H "Content-Type: application/json" \ -d '{"mode": "git"}'Connect the repository
Read the site's deployment settings to find, in
connections, theidof a repository connection you may use. Then set the repository and branch, which answers200with the settings as they are now.curl https://manage.corefinity.com/api/corestack/sites/1051/deployments \ -H "Authorization: Bearer $COREFINITY_TOKEN" -H "Accept: application/json" curl -X PUT https://manage.corefinity.com/api/corestack/sites/1051/deployments/repository \ -H "Authorization: Bearer $COREFINITY_TOKEN" -H "Accept: application/json" \ -H "Content-Type: application/json" \ -d '{"connection_id": 4217, "repo": "northwind-digital/harbourandfinch", "branch": "main", "root_directory": null, "auto_deploy": false}'Deploy
Deploy the connected branch. A deployment replaces the release the site serves with one built from that branch.
The answer is
201with the new deployment,statusqueued.curl -X POST https://manage.corefinity.com/api/corestack/sites/1051/deployments \ -H "Authorization: Bearer $COREFINITY_TOKEN" -H "Accept: application/json" \ -H "Content-Type: application/json" \ -d '{}'Follow the deployment
A deployment is read on the site's deployment settings, not on the operations endpoint. Read them again until the deployment at the top of
deploymentshas thestatussucceeded,failed,cancelledorskipped.curl https://manage.corefinity.com/api/corestack/sites/1051/deployments \ -H "Authorization: Bearer $COREFINITY_TOKEN" -H "Accept: application/json"
Create in a CoreCluster
To create the site in one of your CoreClusters, send the same request to POST /. The site is sized by a tier there, not a package; the endpoint's reference page lists its fields.
If it is refused
| Status | reason | What to do |
|---|---|---|
422 | invalid | Correct the field named in field and errors. A rule of the create can refuse a field with a reason of its own; the message says why |
403 | forbidden | You may not create sites for this company, or your role lacks the permission named in permission |
404 | feature_off | Site creation, or deployments, is not on for your company |
409 | no_payment_method | Add a card or a Direct Debit mandate to your billing account first |
429 | rate_limited | A person can create 100 sites an hour. Wait for the seconds in Retry-After; see Rate limits |
409 | already_revealed | The login was shown already or has expired, or the site has none: an empty site, or an install that has not finished |
409 | mode | The site still deploys by upload; do step 5 first and wait for its operation |
422 | no_repository | No repository is connected; do step 6 first |
409 | deployment_running | Wait for the running deployment to finish |
409 | busy | Another change to the site is in progress. Wait for it to finish |