API Reference
DELETEssh-keys/{id}

Delete SSH Key

Delete SSH Key is a DELETE request to https://api.sharkcluster.com/ssh-keys/{id} in the SSH Keys section of the SharkCluster API. Permanently removes an SSH key from your account. This will not remove the key from servers where it was already installed. It takes 1 parameter, 1 required (id).

Request URL

DELETEhttps://api.sharkcluster.com/ssh-keys/{id}

How do you call Delete SSH Key?

  1. 1Get a token from the login endpoint (POST /login) and send it as Authorization: Bearer <token>. See Login.
  2. 2Send a DELETE request to https://api.sharkcluster.com/ssh-keys/{id}, replacing {id} in the path with your own value.

Request parameters

ParameterTypeDescription
id
Required
stringThe unique ID of the SSH key to delete.
Authorization
Required
headerBearer token for authentication (e.g., Bearer eyJ...).

What does Delete SSH Key return?

A failed call explains the problem in the body, for example "SSH key not found".

Request sample

const axios = require('axios');

const keyId = "uuid-of-the-key-to-delete";

axios.delete(`https://api.sharkcluster.com/ssh-keys/${keyId}`, {
  headers: { 'Authorization': 'Bearer YOUR_TOKEN' }
})
.then(res => console.log("Delete Status:", res.data.message))
.catch(err => console.error(err));

Stuck on an integration?

Raise a ticket from the panel with the endpoint and the response you got back — it reaches an engineer with your server already attached.

Contact us