Delete a web hosting SSH key
DELETE /api/v2/shared-hosting/{accountId}/ssh-keys/{fingerprint}
Delete an SSH key from a web hosting account. The key can no longer log in over SSH or SFTP. A key that is already gone returns 204 too. The account must be active and on cPanel.
Authentication: An API key with the scopes write:hosting and console:services. About keys and scopes
Request
Path parameters
accountIdstringrequiredThe web hosting account ID (
acct_…).fingerprintstringrequiredThe SSH key ID (
ssh_…).Example
curl -X DELETE "https://cloud.hostup.se/api/v2/shared-hosting/acct_01hxa3b4c5d6e7f8g9h0j1k2m3/ssh-keys/ssh_01hxa3b4c5d6e7f8g9h0j1k2m3" \ -H "Authorization: Bearer $HOSTUP_API_KEY"Responses
204 The key was deleted. Also returned when the key was not on the account.
Errors
Errors are Problem Details with a stable code. Branch on the code, not on the text.
| 400 | {fingerprint} is not a valid SSH key ID (invalid_request). |
| 401 | Unauthorized. Authentication is required. |
| 403 | Forbidden. The caller lacks a required scope or does not own the resource. |
| 404 | The SSH key ID does not belong to this account (ssh_key_not_found). |
| 409 | The account is not on cPanel (account_not_eligible_cpanel). |
| 429 | Rate limited. Retry after the limit resets. 429 responses include Retry-After seconds plus X-RateLimit-* headers. |
| 500 | Internal error. Retry later or contact support if the issue persists. |
| 502 | The key could not be looked up or deleted right now (upstream_failed). |