---
title: "Regenerate user SSH key"
method: PUT
path: "/api/v2/users/{user}/gitsshkey"
tags: ["Users"]
---

# Regenerate user SSH key

`PUT /api/v2/users/{user}/gitsshkey`

## Path parameters

- `user` string, required

## Response `200`

OK

- CodersdkGitSSHKey
  - `created_at` string, date-time
  - `public_key` string — PublicKey is the SSH public key in OpenSSH format. Example: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID3OmYJvT7q1cF1azbybYy0OZ9yrXfA+M6Lr4vzX5zlp\n" Note: The key includes a trailing newline (\n).
  - `updated_at` string, date-time
  - `user_id` string, uuid

---

[API](https://skmtc.net/coder/apis/coder-api.md) · [All operations](https://skmtc.net/coder/apis/coder-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/coder/coder-api/versions/56b6e9f08540/schema)
