---
title: "Registers a new public SSH key for the authorized user"
method: POST
path: "/user/keys"
tags: ["User API"]
---

# Registers a new public SSH key for the authorized user

`POST /user/keys`

## Request body

- AddSSHKeyRequest
  - `title` string — The title/name of the SSH key
  - `content` string, required — The SSH public key content

## Response `201`

- PublicSSHKeyView
  - `url` string — API endpoint to GET this object
  - `html_url` string — Web URL to view this object in Buddy.works
  - `id` integer — The ID of the SSH key
  - `title` string — The title/name of the SSH key
  - `content` string — The SSH public key content

## Changes

- **2026-08-25** `fa785a68f09d` — 2 info
  - the security scope `USER_SSH_KEY_WRITE` was added to the endpoint's security scheme `oauth2`
  - the security scope `USER_KEY` was removed from the endpoint's security scheme `oauth2`

[Change history](https://skmtc.dev/buddy/apis/buddy-api/changes/user/keys/post.md)

---

[API](https://skmtc.dev/buddy/apis/buddy-api.md) · [All operations](https://skmtc.dev/buddy/apis/buddy-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/buddy/buddy-api/revisions/fa785a68f09d/schema)
