---
title: "Upload Ssh Key"
method: POST
path: "/api/v1/ssh_keys/"
tags: ["SSH Keys"]
---

# Upload Ssh Key

`POST /api/v1/ssh_keys/`

## Request body

- APISSHKeyUploadRequestConfig
  - `name` string, required — The name for the key.
  - `publicKey` string, required — The public key part of the SSH key.

## Response `200`

Successful Response

- APISSHKeyConfig
  - `id` string, required — Unique identifier for the SSH key.
  - `userId` string, required — ID of the user associated with this pod, if applicable.
  - `name` string, required — Name of the SSH key.
  - `publicKey` string, required — The public key part of the SSH key.
  - `isPrimary` boolean, required — Whether this SSH key is the primary key.
  - `isUserKey` boolean, required — Whether this a custom key uploaded by the user.
  - `createdAt` string, date-time — Timestamp when the SSH key was added.
  - `updatedAt` string, date-time — Timestamp when the SSH key was last updated.

## Other responses

- `401` — Authorization failed
- `422` — Invalid request data

---

[API](https://skmtc.net/primeintellect/apis/pi-api.md) · [All operations](https://skmtc.net/primeintellect/apis/pi-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/primeintellect/pi-api/revisions/3d3868828a78/schema)
