---
title: "Add SSH Key"
method: POST
path: "/settings/ssh-keys"
tags: ["SSH Keys"]
---

# Add SSH Key

`POST /settings/ssh-keys`

## Request

- Base URL: `https://gpucloud.ca/api`
- URL: `https://gpucloud.ca/api/settings/ssh-keys`
- Auth: HTTP bearer

Upload an SSH public key.

## Request body

- CreateSshKeyRequest
  - `name` string, required: A friendly name for the key
  - `publicKey` string, required: The SSH public key (e.g. ssh-ed25519 AAAA...)

## Response `201`

SSH key created

- object
  - `data` SshKey
    - `id` string
    - `name` string
    - `fingerprint` string
    - `createdAt` string, date-time

## Other responses

- `400`: Invalid request
- `401`: No API key (accountAction.code NO_API_KEY) or an invalid, expired, revoked or read only key on a write (INVALID_API_KEY). Provide a valid API key as `Authorization: Bearer <key>`; accountAction gives the links to create an account and a key.
- `429`: Rate limit exceeded
- `500`: Internal server error

---

[API](https://skmtc.dev/gpucloud/apis/gpu-cloud-api.md) · [All operations](https://skmtc.dev/gpucloud/apis/gpu-cloud-api/llms.txt) · [OpenAPI document](https://skmtc.dev/gpucloud/apis/gpu-cloud-api/revisions/ed530411f5c7?raw)
