---
title: "Save an SSH public key"
method: POST
path: "/v1/ssh-keys"
tags: ["public", "ssh-keys"]
---

# Save an SSH public key

`POST /v1/ssh-keys`

## Request

- Base URL: `https://api.vozora.io`
- URL: `https://api.vozora.io/v1/ssh-keys`
- Auth: API key in header `Authorization`

Saves a public key. Submitting a key already saved on the account returns the existing record with created=false and 200 rather than creating a duplicate. Private keys are rejected.

## Request body

- AccountsCreateSSHKeyRequest
  - `name` string, required
  - `public_key` string, required
  - `use_by_default` boolean

## Response `200`

a key with this fingerprint was already saved

- AccountsPublicCreateSSHKeyResponse
  - `created` boolean
  - `ssh_key` AccountsPublicSSHKey
    - `algorithm` string
    - `created_at` string
    - `fingerprint` string
    - `id` string
    - `name` string
    - `public_key` string
    - `updated_at` string
    - `use_by_default` boolean

## Other responses

- `201`: saved
- `400`: bad_ssh_key, bad_ssh_key_name or an invalid body
- `401`: invalid or missing API key
- `403`: the key lacks ssh_keys:write
- `409`: saved_ssh_key_limit

---

[API](https://skmtc.dev/vozora/apis/vozora-api.md) · [All operations](https://skmtc.dev/vozora/apis/vozora-api/llms.txt) · [OpenAPI document](https://skmtc.dev/vozora/apis/vozora-api/revisions/56f15734fc5a?raw)
