CorefinityCorefinityDocs
Open the Control PanelControl Panel
Variables and secrets · 7 of 8

Delete a deployment variable

Removes the variable from the environment and answers the list that is left. The next deployment no longer has it.

DELETE/api/corestack/sites/{site}/deployments/variables/{name}

Path parameters

siteintegerRequired

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.

namestringRequired

The variable's name, without the CF_ prefix builds see it with: letters, digits and underscores, starting with a letter or underscore, at most 64 characters. Any other name is refused 422 invalid on name.

Returns

200 The environment's variables after the removal.

Fields of the 200 answer
dataarray of objectsRequired
Fields of each item
log_visibilitystring or nullRequired

Whether the value may appear in deployment logs. hidden masks it there.

hiddenshownnull
maskedstringRequired

The mask shown in place of the value. A value of 16 characters or more also shows its last four.

namestringRequired

The name, without the CF_ prefix builds see it with.

overridesobject or any or null

The company whose variable of the same name this one takes the place of. Null when there is none.

replaces_platformbooleanRequired

Whether the name is one CoreStack sets itself, so this value replaces the platform's.

tool_credentialstring or nullRequired

A sentence saying the build tool named never reads this variable, when the name is one a build tool reads its own credentials from and no stage reads it. Null otherwise.

updated_atstring or nullRequired

When the variable last changed, in UTC. Format: date-time.

updated_byany or null

Always null at present.

used_inarray of stringsRequired

The deployment stages whose commands read the variable.

builddatabasepost_deploy
inheritedarray of objects

The company variables that reach this environment. Present while deployment templates are on for your company.

Fields of each item
companyobjectRequired
Fields
idintegerRequired

At least 1.

namestringRequired
levelstringRequired

Whose variable it is, such as owner for the company that owns the site.

namestringRequired
overriddenbooleanRequired

Whether the environment has a variable of its own with this name, whose value is used instead.

sharedbooleanRequired

Whether an agency shares it with the companies it manages.

used_byarray of stringsRequired

The deployment stages whose commands read it.

If it is refused

StatusReasonWhat to do
401noneSend a valid token as Authorization: Bearer <token>.
403company_unavailableYour company is unavailable.
403scope_requiredUse a token with the scope named in scope.
403two_factor_requiredTurn on two-factor on your account, then send again.
404feature_offThis feature is not on for your organisation yet.
409managed_elsewhereThis site is read-only here. Change it in the control panel that manages it.
422invalidFix the field named in field; errors says why.
429rate_limitedWait for the seconds in Retry-After.

Reasons are listed by name in Errors and refusals.

The same task elsewhere

curl -X DELETE https://manage.corefinity.com/api/corestack/sites/1042/deployments/variables/API_TOKEN \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json"
{
  "data": [
    {
      "log_visibility": "shown",
      "masked": "••••••••.com",
      "name": "API_URL",
      "overrides": null,
      "replaces_platform": false,
      "tool_credential": null,
      "updated_at": "2026-11-09T10:42:07Z",
      "updated_by": null,
      "used_in": []
    }
  ],
  "inherited": []
}
Try it

Try it is off for this endpointIt deletes data that cannot be brought back. Copy the request and run it yourself when you are sure.

Was this helpful?
Open in ClaudeOpen in ChatGPT