---
title: "PUT /api/ssh-key"
method: PUT
path: "/api/ssh-key"
tags: ["user"]
---

# PUT /api/ssh-key

`PUT /api/ssh-key`

## Request body

- AddKeyJsonRequest
  - `expiration_date` integer, nullable — Optional expiration date as a Unix timestamp (seconds since epoch)
  - `key` string, required — Full OpenSSH public key string
  - `title` string, required — Display title for the key

## Response `201`

SSH key added successfully

- AddKeyJsonResponse
  - `fingerprint` string, required — MD5 fingerprint of the public key
  - `id` string, uuid, required — Internal ID of the newly added key

## Other responses

- `400` — Invalid or unsupported key, missing title
- `401` — Authentication required
- `409` — SSH key already exists
- `422` — Key fingerprint calculation failed

---

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