CorefinityCorefinityDocs
Open the Control PanelControl Panel
Access · 2 of 7

Delete a user's key

Removes a key of one of the site's users. confirm_fingerprint is optional; when you send it, it must be the key's fingerprint. On the built-in web user, only a key the list marks can_delete is removed here, answered as DELETE /ssh/keys/{key} answers and counted against the limit on key changes (30 a minute for you, 120 for your company); company, website and personal keys are removed where they were added.

DELETE/api/corestack/sites/{site}/access/keys/{key}

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.

keyintegerRequired

The id of a key, as a user's keys list answers it. Digits only. At least 1.

Body

confirm_fingerprintstring

The key's fingerprint, exactly. Checked only while SSH keys are on for your company.

Returns

202 The removal was started. For a named user's key the answer is the key, with the status removing, and its operation. For a key of the built-in web user, while SSH keys are on, it is a change_id. Poll the operation until it finishes.

Fields of the 202 answer

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.
403restrictedRestricted keys are changed by staff.
403two_factor_requiredTurn on two-factor on your account, then send again.
404feature_offThis feature is not on for your organisation yet.
409busyAnother operation is running on the site. Wait for it to finish.
409in_useIt is still in use, still being removed, or managed somewhere else. Read the message: wait for the removal, remove what uses it first, or remove it where the message says.
409managed_elsewhereThis site is read-only here. Change it in the control panel that manages it.
409ssh_key_duplicateThe key is already added here. Use the existing one.
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.
422ssh_person_managed_elsewhereThat username belongs to a person's own SSH login, managed in their profile. Choose another name.
429rate_limitedWait for the seconds in Retry-After.
429ssh_throttledToo many SSH key changes — try again in a minute.
502noneRead the message; it says what happened.
503noneTry again shortly.

Reasons are listed by name in Errors and refusals.

The same task elsewhere

curl -X DELETE https://manage.corefinity.com/api/corestack/sites/1042/access/keys/7312 \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "confirm_fingerprint": "SHA256:KhDfvkk2rdhCA9zaR3SurL80w/B/MbslK5FOxIaEpY0"
  }'
{
  "key": {
    "added_at": "2026-11-03T10:02:44+00:00",
    "added_by": null,
    "bits": null,
    "can_delete": true,
    "comment": null,
    "company_key_id": null,
    "fingerprint": "SHA256:KhDfvkk2rdhCA9zaR3SurL80w/B/MbslK5FOxIaEpY0",
    "id": 7312,
    "name": "Supplier laptop",
    "restricted": false,
    "restrictions": [],
    "source": "user",
    "status": "removing",
    "status_label": "Removing",
    "type": "ssh-ed25519"
  },
  "operation": {
    "applied_at": null,
    "can_retry": false,
    "cluster": {
      "id": 17,
      "name": "WordPress Cluster 1"
    },
    "committed_at": "2026-11-05T09:16:40Z",
    "completed_at": null,
    "created_at": "2026-11-05T09: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": null,
    "hot": true,
    "id": 147,
    "install": null,
    "label": "Picked up by the platform",
    "notes": [],
    "parent_operation_id": null,
    "requested_by": {
      "id": 2011,
      "name": "Maya Okafor"
    },
    "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": "committed",
    "status_label": "Waiting for the platform",
    "step": "applied",
    "steps": [
      {
        "key": "saved",
        "label": "Saved",
        "state": "done"
      },
      {
        "key": "applied",
        "label": "Picked up by the platform",
        "state": "current"
      },
      {
        "key": "live",
        "label": "Live",
        "state": "todo"
      }
    ],
    "subject": null,
    "summary": "Remove key \"Supplier laptop\" from supplier",
    "to_version": null,
    "type": "keys_change",
    "type_label": "SSH keys"
  }
}
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