---
title: "Set Primary Key"
method: PATCH
path: "/api/v1/ssh_keys/{key_id}"
tags: ["SSH Keys"]
---

# Set Primary Key

`PATCH /api/v1/ssh_keys/{key_id}`

## Path parameters

- `key_id` string, required

## Request body

- APISSHKeyUpdateRequestConfig
  - `isPrimary` boolean, nullable — Whether to set the key as the primary key. Must be true when provided.

## Response `200`

Successful Response

- APISSHKeyUpdateResponseConfig
  - `message` string, required
  - `updated_fields` object, required

## 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)
