Skip to main content

listSshKeys

GET /user/ssh-keys Returns all SSH keys associated with the authenticated user. Parameters: None Returns: Array of SshKey objects.
FieldTypeDescription
idstringKey identifier
namestringKey name
public_keystringPublic key content
fingerprintstringKey fingerprint
created_atstringCreation timestamp
Example:
const keys = await client.listSshKeys();
keys.forEach(k => console.log(k.name, k.fingerprint));

createSshKey

POST /user/ssh-keys Adds a new SSH public key to the user’s account. Parameters:
FieldTypeRequiredDescription
namestringYesDisplay name for the key
public_keystringYesSSH public key content
Returns: SshKey — the created key with computed fingerprint. Example:
const key = await client.createSshKey({
  name: "my-laptop",
  public_key: "ssh-ed25519 AAAA... user@host",
});
console.log(key.fingerprint);

deleteSshKey

DELETE /user/ssh-keys/{key_id} Removes an SSH key from the user’s account. Parameters:
FieldTypeRequiredDescription
idstringYesKey identifier
Returns: void

importGithubProfileSshKeys

POST /user/ssh-keys/import/github-profile Imports SSH public keys from a GitHub user’s profile. Parameters:
FieldTypeRequiredDescription
github_usernamestringYesGitHub username
Returns: ImportGithubProfileResponse — import results with count of keys added. Example:
const result = await client.importGithubProfileSshKeys({
  github_username: "octocat",
});
console.log(`Imported ${result.imported} keys`);

syncGithubSshKeys

POST /user/ssh-keys/sync/github Syncs SSH keys with the authenticated user’s linked GitHub account. Parameters: None Returns: SyncGithubSshKeysResponse — sync results.