Update how a site deploys
Switches the site between deploying from git (git) and by upload (manual). Switching to git answers 201 with the operation that moves the site's files into the releases layout; switching to manual answers 200 with the command that moves them back, or null when the site already deploys by upload. Your role needs the Manage Deployment Source permission.
Path parameters
The id of a site row. A website's production site and each of its environments has its own id. Digits only. At least 1.
Body
gitmanualWith mode git on a site whose conversion is pending, converts again.
Returns
200 The settings, and the command that switches the site to manual deployments, if one was started.
201 The settings, and the operation that moves the site's files into the releases layout.
Fields of the 200 answer
The command that switches the site to manual deployments. Null when the site already deploys by upload.
How a site deploys, with its last 10 deployments.
Fields
Whether something can be done now and, when it cannot, why not.
Fields
Whether something can be done now and, when it cannot, why not.
Fields
Whether something can be done now and, when it cannot, why not.
Fields
Whether something can be done now and, when it cannot, why not.
Fields
Whether something can be done now and, when it cannot, why not.
Fields
Whether something can be done now and, when it cannot, why not.
Fields
Whether something can be done now and, when it cannot, why not.
Fields
Whether something can be done now and, when it cannot, why not.
Fields
Whether something can be done now and, when it cannot, why not.
Fields
The repository connections you may use on this site.
Fields of each item
The connection's id. 0 when the repository's connection no longer exists or is not one of the site's company.
The provider and the account's username.
True when the provider no longer accepts the connection.
One of github, gitlab, bitbucket or gitlab_self_hosted.
The operation that is moving the site's files into the releases layout, while one is running.
The last 10 deployments, newest first.
Fields of each item
The deployment's current attempt. A retry moves it on.
The pipeline the deployment ran with.
True for a failed deployment, and for one stopped in its after-deploy commands once its release was live, unless it is a rollback, a stop of it is still putting the earlier release back, or its release archive was removed.
True when the site can roll back to this deployment's release.
True for a running deployment, and for a failed one whose scheduled tasks and queues stay paused after its database stage failed (crons_paused.state database_failed) while no other deployment of the site is in progress.
On a failed or stopped deployment whose crons and queues stay paused: state (database_failed or revert_unfinished) and message. A stop or a retry resumes them.
Why a failed deployment failed, or what a queued one waits for.
The commit's author (name, avatar_url), when the push said.
The commit's page at the provider, when the push said.
The commit's merge request or pull request (ref, kind, url), when the push said.
The path of the deployment's page in the Control Panel.
True for the deployment whose release is live.
On a failed deployment that switched maintenance mode on, whether it was switched off again (state, message).
The branch and commit a deployment deploys.
Fields
The first line of the commit's message.
The id of the release the deployment made. Null until its release goes live.
Who started it. Null for a push.
What a retry would do when this is not the site's newest deployment. Such a retry needs confirm_older.
The stage a running deployment is at, or a failed one stopped at.
waiting is a push that arrived while deploy on push is off; skipped is a waiting deployment that a later one overtook.
waitingqueuedrunningsucceededfailedcancelledskippedOn a stopped deployment whose running step could not be confirmed ended (state, checked_at).
The step a running deployment is at, or a failed one stopped at.
What started it. manual is Deploy now, webhook a push, rollback a rollback.
manualwebhookapirollbackunknownreleases once the site's files are in the releases layout git deployments need. Otherwise plain.
releasesplainHow to change the site's files while it deploys by upload.
Fields
git deploys from a repository. manual deploys by upload.
gitmanualThe Node.js version the site's builds use, when one is set.
A summary of the site's deployment pipeline. bindings lists the pipelines a deployment can choose with binding_id (id, label, is_default). The deployment pipeline endpoints answer the rest.
The releases kept on the site.
Fields
The live release (id, deployed_at, ref).
How many releases are kept.
The release before it (id, deployed_at).
The connected repository. Null when none is connected.
Whether a repository of site content can be chosen on this site, and what a new connection starts from.
Fields
Fields of the 201 answer
A change the Control Panel is making or has made. A save or an action that starts work answers one in operation; read it again by id with GET / until status is completed or failed. Both answers have this shape; the few endpoints that answer a different one say so.
Fields
The cluster the operation runs on.
Why the operation failed, in plain words. Null unless status is failed.
A stable code for the failure.
True when the change applies without a maintenance window.
What the operation did differently on purpose. Empty when nothing.
Fields of each item
Who asked for the change.
Present on some site creations and copies.
Always null here. A one-time result is read once with the reveal endpoint.
nonependingavailableviewedWhat a retry needs first, if anything.
Who revealed a one-time result and when, when there was one.
siteclusterbatchThe website the operation belongs to. Null for a cluster's own operation.
Where a change is. completed and failed are final; every other status means the change is still running and blocks another change to the same site.
pendingcommittedrolling_outexecutingcompletedfailedThe key of the step the operation is at. Null once it has completed.
Fields of each item
One of done, current, todo, failed or skipped.
The kind of change, such as crons_change or redirects_change.
How a site deploys, with its last 10 deployments.
Fields
Whether something can be done now and, when it cannot, why not.
Fields
Whether something can be done now and, when it cannot, why not.
Fields
Whether something can be done now and, when it cannot, why not.
Fields
Whether something can be done now and, when it cannot, why not.
Fields
Whether something can be done now and, when it cannot, why not.
Fields
Whether something can be done now and, when it cannot, why not.
Fields
Whether something can be done now and, when it cannot, why not.
Fields
Whether something can be done now and, when it cannot, why not.
Fields
Whether something can be done now and, when it cannot, why not.
Fields
The repository connections you may use on this site.
Fields of each item
The connection's id. 0 when the repository's connection no longer exists or is not one of the site's company.
The provider and the account's username.
True when the provider no longer accepts the connection.
One of github, gitlab, bitbucket or gitlab_self_hosted.
The operation that is moving the site's files into the releases layout, while one is running.
The last 10 deployments, newest first.
Fields of each item
The deployment's current attempt. A retry moves it on.
The pipeline the deployment ran with.
True for a failed deployment, and for one stopped in its after-deploy commands once its release was live, unless it is a rollback, a stop of it is still putting the earlier release back, or its release archive was removed.
True when the site can roll back to this deployment's release.
True for a running deployment, and for a failed one whose scheduled tasks and queues stay paused after its database stage failed (crons_paused.state database_failed) while no other deployment of the site is in progress.
On a failed or stopped deployment whose crons and queues stay paused: state (database_failed or revert_unfinished) and message. A stop or a retry resumes them.
Why a failed deployment failed, or what a queued one waits for.
The commit's author (name, avatar_url), when the push said.
The commit's page at the provider, when the push said.
The commit's merge request or pull request (ref, kind, url), when the push said.
The path of the deployment's page in the Control Panel.
True for the deployment whose release is live.
On a failed deployment that switched maintenance mode on, whether it was switched off again (state, message).
The branch and commit a deployment deploys.
Fields
The first line of the commit's message.
The id of the release the deployment made. Null until its release goes live.
Who started it. Null for a push.
What a retry would do when this is not the site's newest deployment. Such a retry needs confirm_older.
The stage a running deployment is at, or a failed one stopped at.
waiting is a push that arrived while deploy on push is off; skipped is a waiting deployment that a later one overtook.
waitingqueuedrunningsucceededfailedcancelledskippedOn a stopped deployment whose running step could not be confirmed ended (state, checked_at).
The step a running deployment is at, or a failed one stopped at.
What started it. manual is Deploy now, webhook a push, rollback a rollback.
manualwebhookapirollbackunknownreleases once the site's files are in the releases layout git deployments need. Otherwise plain.
releasesplainHow to change the site's files while it deploys by upload.
Fields
git deploys from a repository. manual deploys by upload.
gitmanualThe Node.js version the site's builds use, when one is set.
A summary of the site's deployment pipeline. bindings lists the pipelines a deployment can choose with binding_id (id, label, is_default). The deployment pipeline endpoints answer the rest.
The releases kept on the site.
Fields
The live release (id, deployed_at, ref).
How many releases are kept.
The release before it (id, deployed_at).
The connected repository. Null when none is connected.
Whether a repository of site content can be chosen on this site, and what a new connection starts from.
Fields
If it is refused
| Status | Reason | What to do |
|---|---|---|
401 | none | 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. |
409 | bedrock_layout | The WordPress site is built with Bedrock, so it cannot switch to manual deployments yet. Keep deploying it with Git. |
409 | busy | Another operation is running on the site. Wait for it to finish. |
409 | layout_unknown | The Control Panel could not confirm whether this WordPress site is built with Bedrock, so it stays on Git deployments. Try again in a minute. |
422 | invalid | Fix the field named in field; errors says why. |
429 | rate_limited | Wait for the seconds in Retry-After. |
503 | none | Try again shortly. |
Reasons are listed by name in Errors and refusals.
The same task elsewhere
curl -X PUT https://manage.corefinity.com/api/corestack/sites/1042/deployments/mode \
-H "Authorization: Bearer $COREFINITY_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"mode": "git"
}'use Illuminate\Support\Facades\Http;
$response = Http::withToken(env('COREFINITY_TOKEN'))
->acceptJson()
->put('https://manage.corefinity.com/api/corestack/sites/1042/deployments/mode', [
'mode' => 'git',
]);
$data = $response->json();const res = await fetch('https://manage.corefinity.com/api/corestack/sites/1042/deployments/mode', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.COREFINITY_TOKEN}`,
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({
mode: 'git',
}),
});
// An answer with no body (204) has nothing to parse.
const text = await res.text();
const data = text && JSON.parse(text);import os
import requests
res = requests.put(
"https://manage.corefinity.com/api/corestack/sites/1042/deployments/mode",
headers={
"Authorization": f"Bearer {os.environ['COREFINITY_TOKEN']}",
"Accept": "application/json",
},
json={
"mode": "git",
},
)
data = res.json() if res.content else None{
"command": null,
"settings": {
"can_change_mode": {
"available": true,
"reason": null
},
"can_change_repository": {
"available": true,
"reason": null
},
"can_deploy": {
"available": false,
"reason": "Switch this site to git deployments first"
},
"can_retry_deployments": {
"available": true,
"reason": null
},
"can_rollback": {
"available": false,
"reason": "Switch this site to git deployments first"
},
"can_stop_deployments": {
"available": true,
"reason": null
},
"can_switch_to_git": {
"available": true,
"reason": null
},
"can_turn_off_auto_deploy": {
"available": true,
"reason": null
},
"can_turn_on_auto_deploy": {
"available": true,
"reason": null
},
"connections": [
{
"id": 4217,
"label": "GitLab (self-hosted) · daniel-reyes",
"needs_reauth": false,
"provider": "gitlab_self_hosted",
"provider_label": "GitLab (self-hosted)"
}
],
"conversion": null,
"deployments": [],
"layout": "plain",
"manual": {
"note": "Files you change over SFTP or in the terminal are live on refresh",
"sftp_command": "sftp -P 20001 [email protected]"
},
"mode": "manual",
"mode_label": "Manual",
"node": {
"adopted": false,
"major": null
},
"pipeline": {
"bindings": [],
"version": 3
},
"releases": {
"count": 0,
"current": null,
"keep": 5,
"previous": null
},
"repository": null,
"repository_options": {
"default_contents": "whole_site",
"default_target_path": null,
"layout_target_path": "wp-content",
"release_root": "",
"site_content": true
}
}
}{
"operation": {
"applied_at": "2026-11-09T09:16:40Z",
"can_retry": false,
"cluster": {
"id": 17,
"name": "Northwind UK 1"
},
"committed_at": null,
"completed_at": null,
"created_at": "2026-11-09T09:16:40Z",
"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"
},
"error": null,
"failure_reason": null,
"from_version": "plain",
"hot": false,
"id": 4410,
"install": null,
"label": "Release prepared",
"notes": [],
"parent_operation_id": null,
"requested_by": {
"id": 3301,
"name": "Daniel Reyes"
},
"reset_target": null,
"result": null,
"result_state": "none",
"retried_by_operation_id": null,
"retries_operation_id": null,
"retry_requires": null,
"revealed": null,
"scope": "site",
"site": {
"domain": "harbourandfinch.example.com",
"id": 1042
},
"status": "executing",
"status_label": "Preparing the first release",
"step": "prepared",
"steps": [
{
"key": "prepared",
"label": "Release prepared",
"state": "current"
},
{
"key": "converted",
"label": "Files moved into releases",
"state": "todo"
},
{
"key": "verified",
"label": "Verified",
"state": "todo"
}
],
"subject": null,
"summary": "Move the site's files into the releases layout",
"to_version": "releases",
"type": "releases_convert",
"type_label": "Deployment layout"
},
"settings": {
"can_deploy": {
"available": false,
"reason": "Connect a repository first"
},
"can_rollback": {
"available": false,
"reason": "There is no earlier release to roll back to"
},
"connections": [],
"conversion": {
"id": 4410,
"scope": "site",
"status": "executing",
"status_label": "Running",
"summary": "Move the site's files into the releases layout",
"to_version": "releases",
"type": "releases_convert",
"type_label": "Deployment layout"
},
"deployments": [],
"layout": "plain",
"manual": {
"note": "Files you change over SFTP or in the terminal are live on refresh",
"sftp_command": "sftp -P 20001 [email protected]"
},
"mode": "git",
"mode_label": "Git",
"node": {
"adopted": false,
"major": null
},
"pipeline": {
"bindings": [],
"version": 3
},
"releases": {
"count": 0,
"current": null,
"keep": 5,
"previous": null
},
"repository": null,
"repository_options": {
"default_contents": "whole_site",
"default_target_path": null,
"layout_target_path": "wp-content",
"release_root": "",
"site_content": true
}
}
}{
"message": "Unauthenticated."
}{
"code": "company_unavailable",
"message": "Your company is unavailable.",
"reason": "company_unavailable"
}{
"code": "feature_off",
"message": "Not found.",
"reason": "feature_off"
}{
"code": "bedrock_layout",
"message": "This WordPress site is built with Bedrock, so it cannot switch to manual deployments yet. Keep deploying it with Git.",
"reason": "bedrock_layout"
}{
"code": "invalid",
"errors": {
"mode": [
"This site already uses git deployments"
]
},
"field": "mode",
"message": "This site already uses git deployments",
"reason": "invalid"
}{
"code": "rate_limited",
"message": "Too many requests. Try again in 60 seconds.",
"reason": "rate_limited",
"retry_after_seconds": 60
}{
"message": "Site commands are switched off at the moment"
}Try it is off for this endpointIt runs commands on a live site. Copy the request and run it yourself when you are sure.