# DELETE /users/{name}/ssh-keys/{id}

First published 3 Oct 2026 (release 0.1.0) · Unchanged since publication

UrbeStack release 0.2.35 API operation in the users group.

Remove a customer's SSH public key

- Who may call it: administrator, reseller, customer
- Token scope, any of: users, all
- Answers: 200 OK

Administrators, the customer's reseller and the customer can remove a key. Use the key's id from GET /users/{name}/ssh-keys. UrbeStack immediately removes the key from the customer's list and from the customer's authorized keys file under ssh_keys_dir.

## As a command

- [urbestack-ssh-key-del](https://urbestack.com/docs/commands/urbestack-ssh-key-del.md): Removes an SSH public key from the customer's list and from UrbeStack's authorized keys file for that customer immediately.

## Parameters

- `name` (path, Username, required)
- `id` (path, integer, 1 or more, required)

## Example

Set $API to the base URL and $TOKEN to the token, as the [API overview](https://urbestack.com/docs/api.md) shows.

```
curl -sS -X DELETE "$API/users/alice/ssh-keys/1" \
  -H "Authorization: Bearer $TOKEN"
```

Response, 200 OK:

The response body is the file itself.

## Errors

- 400: --id is required
- 400: --user is required
- 400: Invalid id
- 400: Invalid username: 2 to 32 lowercase letters, digits or underscores, starting with a letter
- 400: Username '<value>' is reserved
- 401: Authentication required
- 404: No SSH key <id> on the list of <user.name>
- 404: User '<user>' not found
