API Reference
DELETE
ssh-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
DELETE
https://api.sharkcluster.com/ssh-keys/{id}How do you call Delete SSH Key?
- 1Get a token from the login endpoint (POST /login) and send it as Authorization: Bearer <token>. See Login.
- 2Send a DELETE request to https://api.sharkcluster.com/ssh-keys/{id}, replacing {id} in the path with your own value.
Request parameters
| Parameter | Type | Description |
|---|---|---|
idRequired | string | The unique ID of the SSH key to delete. |
AuthorizationRequired | header | Bearer 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));
Related SSH Keys endpoints
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.