Get your free beta license ↗
API operation · users group
PATCH

/users/{name}/ssh-keys/{id}

First published 14 Oct 20260.2.0Unchanged since publication

Change a customer's SSH key label

Who may call it
AdministratorResellerCustomer
Token scope, any of
usersall
Answers200 OK

Administrators, the customer's reseller and the customer can change a key's label. Use the key's id from GET /users/{name}/ssh-keys. The label must contain 1 to 64 printable ASCII characters. An omitted or empty label returns 400.

The response contains the existing public key and fingerprint with the new label in key. UrbeStack immediately writes the label as the key's comment in the customer's file under ssh_keys_dir.

As a command

Run as root on the server

Parameters

namepath ·UsernameRequired
idpath ·integer, 1 or moreRequired

Request body

JSON ·SshKeyPatch· 1 field
labelstring, up to 64 charactersRequired
New label of 1 to 64 printable characters.

Example

See the API overview for how to set $API and $TOKEN.
Request
curl -sS -X PATCH "$API/users/alice/ssh-keys/1" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "label": "my laptop"
  }'
Response · 200 OK
{
  "key": {
    "created_at": "2026-09-09T10:15:00Z",
    "fingerprint": "text",
    "id": 1,
    "key": "panel.port",
    "label": "my laptop",
    "type": "rebuild",
    "user": "alice"
  }
}

Errors

9 errors, each a status and a sentence
400--<_> is required
400Invalid id
400Invalid label: 1 to 64 printable ASCII characters
400Invalid username: 2 to 32 lowercase letters, digits or underscores, starting with a letter
400Username '<value>' is reserved
400label is required: the new label, 1 to 64 printable characters
401Authentication required
404No SSH key <id> on the list of <user.name>
404User '<user>' not found
Generated from release 0.2.35 (current) · the API’s own descriptionThis entry has been unchanged since it was first published in release 0.2.0 on 14 Oct 2026.
urbestack.com/docs/api/patch-users-name-ssh-keys-id/