Update Project SSH Key
curl --request PATCH \
--url https://api.latitude.sh/projects/{project_id}/ssh_keys/{ssh_key_id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"id": "ssh_zlkg1DegdvZE5",
"type": "ssh_keys",
"attributes": {
"tags": [
"tag_rB7B21L1QbiJ6yWYxQLmHWJE3GmR",
"tag_57nzyG0Bn3c5wooyYyeLH1w9kmN"
]
}
}
}
'import requests
url = "https://api.latitude.sh/projects/{project_id}/ssh_keys/{ssh_key_id}"
payload = { "data": {
"id": "ssh_zlkg1DegdvZE5",
"type": "ssh_keys",
"attributes": { "tags": ["tag_rB7B21L1QbiJ6yWYxQLmHWJE3GmR", "tag_57nzyG0Bn3c5wooyYyeLH1w9kmN"] }
} }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
data: {
id: 'ssh_zlkg1DegdvZE5',
type: 'ssh_keys',
attributes: {tags: ['tag_rB7B21L1QbiJ6yWYxQLmHWJE3GmR', 'tag_57nzyG0Bn3c5wooyYyeLH1w9kmN']}
}
})
};
fetch('https://api.latitude.sh/projects/{project_id}/ssh_keys/{ssh_key_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.latitude.sh/projects/{project_id}/ssh_keys/{ssh_key_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'data' => [
'id' => 'ssh_zlkg1DegdvZE5',
'type' => 'ssh_keys',
'attributes' => [
'tags' => [
'tag_rB7B21L1QbiJ6yWYxQLmHWJE3GmR',
'tag_57nzyG0Bn3c5wooyYyeLH1w9kmN'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.latitude.sh/projects/{project_id}/ssh_keys/{ssh_key_id}"
payload := strings.NewReader("{\n \"data\": {\n \"id\": \"ssh_zlkg1DegdvZE5\",\n \"type\": \"ssh_keys\",\n \"attributes\": {\n \"tags\": [\n \"tag_rB7B21L1QbiJ6yWYxQLmHWJE3GmR\",\n \"tag_57nzyG0Bn3c5wooyYyeLH1w9kmN\"\n ]\n }\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.latitude.sh/projects/{project_id}/ssh_keys/{ssh_key_id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"id\": \"ssh_zlkg1DegdvZE5\",\n \"type\": \"ssh_keys\",\n \"attributes\": {\n \"tags\": [\n \"tag_rB7B21L1QbiJ6yWYxQLmHWJE3GmR\",\n \"tag_57nzyG0Bn3c5wooyYyeLH1w9kmN\"\n ]\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.latitude.sh/projects/{project_id}/ssh_keys/{ssh_key_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"id\": \"ssh_zlkg1DegdvZE5\",\n \"type\": \"ssh_keys\",\n \"attributes\": {\n \"tags\": [\n \"tag_rB7B21L1QbiJ6yWYxQLmHWJE3GmR\",\n \"tag_57nzyG0Bn3c5wooyYyeLH1w9kmN\"\n ]\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "ssh_zlkg1DegdvZE5",
"type": "ssh_keys",
"attributes": {
"tags": [
{
"id": "tag_rB7B21L1QbiJ6yWYxQLmHWJE3GmR",
"name": "Dáin Ironfoot",
"description": "Non quos voluptatem voluptatem.",
"color": "#254646"
},
{
"id": "tag_57nzyG0Bn3c5wooyYyeLH1w9kmN",
"name": "Almiel",
"description": "Repellendus quae velit rerum.",
"color": "#2121e8"
}
],
"name": "ruecker.example",
"public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDbDuCsEBno4lL6+lLXiBuziWK+go4/TQ2xXWNkyO9PEQSwp8t7fu5USARgUl5HxRK2K+enzTOGVYG+IGWTh8GsNQ68D+6VQZDafStcAoRX7/drrIbkMho3Fv5o5mfjIeMB9A6yT7FxsWFx4VkV8wlCLn3HSq/Q2fvuKh3j10B/ZKCG14K2Que9xrGhCbAGVzxrCozWc4yCdpXSL0CFUOOQDpOa44VzcMVkXqxyaJYDjlxMklfGQ/81YjtM5hne0kFPajeVmHZGQ7QsZZEww/P7c0pL44n9b/sYmzHOuZYFCM3MuU2pfonEJBOVfFVeXh5pPvUmis8mxxCAQhtzJE4D",
"fingerprint": "17:c4:55:c4:1b:a3:1f:fd:89:70:2d:c3:55:7a:4c:6e",
"created_at": "2026-01-14T15:56:42+00:00",
"updated_at": "2026-01-14T15:56:42+00:00",
"project": {
"id": "proj_v9BVDaR3ORm1W",
"name": "Sleek Linen Lamp",
"slug": "sleek-linen-lamp",
"description": "Ergonomic Rubber Gloves",
"provisioning_type": "on_demand",
"billing_type": "Normal",
"billing_method": "Normal",
"bandwidth_alert": false,
"environment": null,
"billing": {},
"stats": {
"databases": 0,
"ip_addresses": 0,
"prefixes": 0,
"servers": 0,
"storages": 0,
"virtual_machines": 0,
"vlans": 0
}
},
"user": {
"id": "user_Rzg2JEoZNASA1bznzWJBI6GXJ0v",
"first_name": "Meghann",
"last_name": "Windler",
"email": "jonah_bartoletti@mueller.example",
"created_at": "2026-01-10T00:00:00.000Z",
"updated_at": "2025-03-26T00:00:00.000Z",
"role": {
"id": "role_6noZ5alPanUpr0yoVygMCL6mK88",
"name": "owner",
"created_at": "2025-07-29T00:00:00.000Z",
"updated_at": "2026-05-30T00:00:00.000Z"
}
}
}
},
"meta": {}
}SSH Keys
Update Project SSH Key
deprecated
Allow you update SSH Key in a project. These keys can be used to access servers after deploy and reinstall actions.
PATCH
/
projects
/
{project_id}
/
ssh_keys
/
{ssh_key_id}
Update Project SSH Key
curl --request PATCH \
--url https://api.latitude.sh/projects/{project_id}/ssh_keys/{ssh_key_id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"id": "ssh_zlkg1DegdvZE5",
"type": "ssh_keys",
"attributes": {
"tags": [
"tag_rB7B21L1QbiJ6yWYxQLmHWJE3GmR",
"tag_57nzyG0Bn3c5wooyYyeLH1w9kmN"
]
}
}
}
'import requests
url = "https://api.latitude.sh/projects/{project_id}/ssh_keys/{ssh_key_id}"
payload = { "data": {
"id": "ssh_zlkg1DegdvZE5",
"type": "ssh_keys",
"attributes": { "tags": ["tag_rB7B21L1QbiJ6yWYxQLmHWJE3GmR", "tag_57nzyG0Bn3c5wooyYyeLH1w9kmN"] }
} }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
data: {
id: 'ssh_zlkg1DegdvZE5',
type: 'ssh_keys',
attributes: {tags: ['tag_rB7B21L1QbiJ6yWYxQLmHWJE3GmR', 'tag_57nzyG0Bn3c5wooyYyeLH1w9kmN']}
}
})
};
fetch('https://api.latitude.sh/projects/{project_id}/ssh_keys/{ssh_key_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.latitude.sh/projects/{project_id}/ssh_keys/{ssh_key_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'data' => [
'id' => 'ssh_zlkg1DegdvZE5',
'type' => 'ssh_keys',
'attributes' => [
'tags' => [
'tag_rB7B21L1QbiJ6yWYxQLmHWJE3GmR',
'tag_57nzyG0Bn3c5wooyYyeLH1w9kmN'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.latitude.sh/projects/{project_id}/ssh_keys/{ssh_key_id}"
payload := strings.NewReader("{\n \"data\": {\n \"id\": \"ssh_zlkg1DegdvZE5\",\n \"type\": \"ssh_keys\",\n \"attributes\": {\n \"tags\": [\n \"tag_rB7B21L1QbiJ6yWYxQLmHWJE3GmR\",\n \"tag_57nzyG0Bn3c5wooyYyeLH1w9kmN\"\n ]\n }\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.latitude.sh/projects/{project_id}/ssh_keys/{ssh_key_id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"id\": \"ssh_zlkg1DegdvZE5\",\n \"type\": \"ssh_keys\",\n \"attributes\": {\n \"tags\": [\n \"tag_rB7B21L1QbiJ6yWYxQLmHWJE3GmR\",\n \"tag_57nzyG0Bn3c5wooyYyeLH1w9kmN\"\n ]\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.latitude.sh/projects/{project_id}/ssh_keys/{ssh_key_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"id\": \"ssh_zlkg1DegdvZE5\",\n \"type\": \"ssh_keys\",\n \"attributes\": {\n \"tags\": [\n \"tag_rB7B21L1QbiJ6yWYxQLmHWJE3GmR\",\n \"tag_57nzyG0Bn3c5wooyYyeLH1w9kmN\"\n ]\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "ssh_zlkg1DegdvZE5",
"type": "ssh_keys",
"attributes": {
"tags": [
{
"id": "tag_rB7B21L1QbiJ6yWYxQLmHWJE3GmR",
"name": "Dáin Ironfoot",
"description": "Non quos voluptatem voluptatem.",
"color": "#254646"
},
{
"id": "tag_57nzyG0Bn3c5wooyYyeLH1w9kmN",
"name": "Almiel",
"description": "Repellendus quae velit rerum.",
"color": "#2121e8"
}
],
"name": "ruecker.example",
"public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDbDuCsEBno4lL6+lLXiBuziWK+go4/TQ2xXWNkyO9PEQSwp8t7fu5USARgUl5HxRK2K+enzTOGVYG+IGWTh8GsNQ68D+6VQZDafStcAoRX7/drrIbkMho3Fv5o5mfjIeMB9A6yT7FxsWFx4VkV8wlCLn3HSq/Q2fvuKh3j10B/ZKCG14K2Que9xrGhCbAGVzxrCozWc4yCdpXSL0CFUOOQDpOa44VzcMVkXqxyaJYDjlxMklfGQ/81YjtM5hne0kFPajeVmHZGQ7QsZZEww/P7c0pL44n9b/sYmzHOuZYFCM3MuU2pfonEJBOVfFVeXh5pPvUmis8mxxCAQhtzJE4D",
"fingerprint": "17:c4:55:c4:1b:a3:1f:fd:89:70:2d:c3:55:7a:4c:6e",
"created_at": "2026-01-14T15:56:42+00:00",
"updated_at": "2026-01-14T15:56:42+00:00",
"project": {
"id": "proj_v9BVDaR3ORm1W",
"name": "Sleek Linen Lamp",
"slug": "sleek-linen-lamp",
"description": "Ergonomic Rubber Gloves",
"provisioning_type": "on_demand",
"billing_type": "Normal",
"billing_method": "Normal",
"bandwidth_alert": false,
"environment": null,
"billing": {},
"stats": {
"databases": 0,
"ip_addresses": 0,
"prefixes": 0,
"servers": 0,
"storages": 0,
"virtual_machines": 0,
"vlans": 0
}
},
"user": {
"id": "user_Rzg2JEoZNASA1bznzWJBI6GXJ0v",
"first_name": "Meghann",
"last_name": "Windler",
"email": "jonah_bartoletti@mueller.example",
"created_at": "2026-01-10T00:00:00.000Z",
"updated_at": "2025-03-26T00:00:00.000Z",
"role": {
"id": "role_6noZ5alPanUpr0yoVygMCL6mK88",
"name": "owner",
"created_at": "2025-07-29T00:00:00.000Z",
"updated_at": "2026-05-30T00:00:00.000Z"
}
}
}
},
"meta": {}
}Was this page helpful?
⌘I