CorefinityCorefinityDocs
Open the Control PanelControl Panel
SSH keys · 11 of 14

Delete an SSH key

Removes a key, a Legacy key included, from its owner. Send the key's fingerprint in confirm_fingerprint, in the request body; the key stops working on every environment it reached through this owner, and remaining_sources lists the places the same key is still held. Removing a company key needs the Delete or the Edit Company SSH Keys permission.

DELETE/api/ssh/keys/{key}

Path parameters

keyintegerRequired

The id of a key, as the key lists answer it in id. Digits only. At least 1.

Body

confirm_fingerprintstringRequired

The key's fingerprint, exactly as the lists answer it.

Returns

202 The removal was started. Follow change_id with GET /ssh/changes/{change}. Poll the operation until it finishes.

Fields of the 202 answer
change_idintegerRequired
remaining_sourcesarray of objectsRequired

Places the same key is still held. It keeps working through them.

Fields of each item
environmentsintegerRequired
layerstringRequired
agencycompanywebsiteenvironmentuserlegacysystem
ownerobjectRequired

Where a key is held: a company, a website, an environment or a person.

Fields
idintegerRequired

The id of the company, website, environment or user.

namestringRequired
typestringRequired
companywebsiteenvironmentuser

If it is refused

StatusReasonWhat to do
401noneSend a valid token as Authorization: Bearer <token>.
403company_unavailableYour company is unavailable.
403forbiddenThe person is not allowed to do this.
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.
404not_foundNot found.
409ssh_managed_on_another_environmentThis environment's SSH is managed on another environment. Make the change on the environment the answer names.
422confirm_mismatchSend the confirmation exactly as the field named in field asks for it.
422invalid_argumentsThe arguments do not match the tool's input schema, or the Control Panel refused a field. Fix the fields named in the answer and call again.
429ssh_throttledToo many SSH key changes — try again in a minute.
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/ssh/keys/7305 \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "confirm_fingerprint": "SHA256:o6poLLVqPDVYtxLTdagh8mUo96coeRXfX7Uxorxr158"
  }'
{
  "change_id": 48215,
  "remaining_sources": []
}
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