List SSH keys

List the SSH keys in this zone, with the team each one belongs to. Filter by part of a slug or by metadata.

GET https://{availability_zone}.betterstackcloud.com/v1/ssh-keys
query string

Return keys whose slug contains this text, ignoring case.

metadata object

Return keys that have every given tag, sent as metadata[<key>]=<value>. Repeat it to match several tags. Accepts any keys.

page integer default: 1

The page to return, starting at 1.

per_page integer default: 25

How many entries to return per page. Maximum 1000.

Authorization string required

Bearer $TOKEN

Results are paginated

Use page and per_page to move through pages. See Pagination.

200 OK
{
  "data": [
    {
      "slug": "my-laptop",
      "public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEF0uIiLF54lpavoiG7O95cChLJ80vbi0Nh08Kf3+G/a me@example.com",
      "created_at": "2026-07-01T12:00:00.000Z",
      "updated_at": "2026-07-01T12:00:00.000Z",
      "team_id": "t123",
      "metadata": {
        "example": "value"
      }
    }
  ],
  "meta": {}
}

Returns the list of SSH keys.

id string

The ID of the SSH key.

slug string

The key's name, unique in its team. The name is up to 255 characters long and starts and ends with a letter or digit. Dots, hyphens and underscores are allowed in between. A deleted key's slug stays taken until the key is removed from every zone.

public_key string

Exactly one OpenSSH public key. Never send a private key. The CLI can read it from a file or from standard input, or import it from GitHub. The public key can't be changed after the key is created.

created_at datetime

When the key was created. In ISO 8601 format, such as 2026-07-01T12:00:00Z.

updated_at datetime

When the key was last updated. In ISO 8601 format, such as 2026-07-01T12:00:00Z.

team_id string

The ID of the team that owns the key. betterstack team list shows it.

metadata object

Your tags, as an object of string keys and values, at most 10.