Skip to main content
PATCH
/
ssh_keys
/
{ssh_key_id}
Go (SDK)
package main

import(
	"context"
	"os"
	latitudeshgosdk "github.com/latitudesh/latitudesh-go-sdk"
	"github.com/latitudesh/latitudesh-go-sdk/models/operations"
	"log"
)

func main() {
    ctx := context.Background()

    s := latitudeshgosdk.New(
        latitudeshgosdk.WithSecurity(os.Getenv("LATITUDESH_BEARER")),
    )

    res, err := s.SSHKeys.Update(ctx, "ssh_8Nkvdyn1qeLpx", operations.PutSSHKeySSHKeysRequestBody{
        Data: operations.PutSSHKeySSHKeysData{
            ID: latitudeshgosdk.Pointer("ssh_8Nkvdyn1qeLpx"),
            Type: operations.PutSSHKeySSHKeysTypeSSHKeys,
            Attributes: &operations.PutSSHKeySSHKeysAttributes{
                Tags: []string{
                    "tag_BR6a9QPmXWCPVzLrmEYAslyroMK",
                    "tag_yxVkGz7rxMsl9M54lr71fp5XZg60",
                },
            },
        },
    })
    if err != nil {
        log.Fatal(err)
    }
    if res.Object != nil {
        // handle response
    }
}
{
  "data": {
    "id": "ssh_8Nkvdyn1qeLpx",
    "type": "ssh_keys",
    "attributes": {
      "tags": [
        {
          "id": "tag_BR6a9QPmXWCPVzLrmEYAslyroMK",
          "name": "Hirwen",
          "description": "Ea eos fuga dolorum.",
          "color": "#1c971c"
        },
        {
          "id": "tag_yxVkGz7rxMsl9M54lr71fp5XZg60",
          "name": "Idis",
          "description": "Recusandae quod odit delectus.",
          "color": "#af5050"
        }
      ],
      "name": "larson-grady.example",
      "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCy3NKkUMbR6a+Z0i0UbVQfuTeSQ/9fspeNCCv/biB0QtJ5AgrtoxsBc2PVtUysBX0ZoBZrVX76ataGmivZdWzxRrli/ezpeLpQD4GWt2jhhdCfsHxrvorpfTNCzSSPl7DTmvOVHjHtOgytoPpB5V1C46tLomd78LqkQfM1pIaE1XFysnPNNSRIBgkY9IMfD1vp94ubx66FpgFO5e+kGEMueo8+zklf7Ec6bjzzsexdJ1MFHvkhzuieg5XApFczudD25wrKuZb4VIDfDCkaqKr3hMl1cLlFjEEng3bVNKtmkMtAalVIxK+h9Hg88uvvobPuO+fn9YEMzLRAlK+DW+3t",
      "fingerprint": "39:0b:6e:63:f8:a7:1a:55:85:1f:2f:32:22:b9:f7:60",
      "created_at": "2025-07-16T18:37:09+00:00",
      "updated_at": "2025-07-16T18:37:09+00:00",
      "user": {
        "id": "user_Z40pnNJK5oImXEaPkBxbCpj3WZW",
        "first_name": "Clarence",
        "last_name": "Kilback",
        "email": "[email protected]",
        "created_at": "2025-01-05T00:00:00.000Z",
        "updated_at": "2024-10-07T00:00:00.000Z",
        "role": {
          "id": "role_vePpArmPWlC0RAP78Gn5FvWgGY6o",
          "name": "owner",
          "created_at": "2024-11-25T00:00:00.000Z",
          "updated_at": "2026-01-28T00:00:00.000Z"
        }
      }
    }
  },
  "meta": {}
}

Authorizations

Authorization
string
header
required

Path Parameters

ssh_key_id
string
required

Body

data
object
required

Response

200 - application/vnd.api+json

Success

data
object