CorefinityCorefinityDocs
Open the Control PanelControl Panel
Environment variables · 3 of 4

Delete a variable

Removes the variable from the environment, by its stored name as it is. The next deployment no longer has it.

DELETE/api/environments/{environment}/variables/{name}

Path parameters

environmentintegerRequired

The id of a CoreStack Enterprise environment. Not the same number as a site row id. At least 1.

namestringRequired

The variable's name, without the CF_ prefix builds see it with. A new name is letters, digits and underscores, starting with a letter or underscore, at most 64 characters; a variable the environment already has is found by its stored name as it is, whatever the rules were when it was saved.

Returns

204 The variable was removed. No body.

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.
404noneCheck the id. You see only what your account can reach.
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/environments/1311/variables/API_TOKEN \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json"
{
  "message": "Unauthenticated."
}
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