Skip to content

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

accountIdstringrequired
The web hosting account ID (acct_…).
fingerprintstringrequired
The SSH key ID (ssh_…).

Example

DELETE /api/v2/shared-hosting/{accountId}/ssh-keys/{fingerprint}
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).
401Unauthorized. Authentication is required.
403Forbidden. The caller lacks a required scope or does not own the resource.
404The SSH key ID does not belong to this account (ssh_key_not_found).
409The account is not on cPanel (account_not_eligible_cpanel).
429Rate limited. Retry after the limit resets. 429 responses include Retry-After seconds plus X-RateLimit-* headers.
500Internal error. Retry later or contact support if the issue persists.
502The key could not be looked up or deleted right now (upstream_failed).