API
SSH Keys API
Manage SSH keys
SSH Keys API
The SSH Keys API allows you to manage SSH keys for server access.
List SSH Keys
Returns all SSH Key objects.
const sshKeys = await client.sshKeys.list();Get SSH Key
Returns a specific SSH Key object.
const sshKey = await client.sshKeys.get(12345);Create SSH Key
Creates a new SSH Key.
const sshKey = await client.sshKeys.create({
name: 'my-ssh-key',
public_key: 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQ...',
labels: { environment: 'production' }
});Update SSH Key
Updates an SSH Key.
const updated = await client.sshKeys.update(12345, {
name: 'new-name',
labels: { environment: 'production' }
});Delete SSH Key
Deletes an SSH Key.
await client.sshKeys.delete(12345);Types
interface SSHKey {
id: number;
name: string;
fingerprint: string;
public_key: string;
labels: Record<string, string>;
created: string;
}