---
title: "Create public key"
method: POST
path: "/api/vps/v1/public-keys"
tags: ["VPS: Public Keys"]
---

# Create public key

`POST /api/vps/v1/public-keys`

Add a new public key to your account.

Use this endpoint to register SSH keys for VPS authentication.

## Request body

- VPSV1PublicKeyStoreRequest
  - `name` string, required
  - `key` string, required

## Response `200`

Success response

- VPSV1PublicKeyPublicKeyResource
  - `id` integer — Public key ID
  - `name` string — Public key name
  - `key` string — Public key content

## Other responses

- `401` — Unauthenticated response
- `422` — Validation error response
- `500` — Error response

---

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