For the complete documentation index, see llms.txt. This page is also available as Markdown.

Create public key

Add a new public key to your account. Use this endpoint to register SSH keys for VPS authentication.

Create public key

post

Add a new public key to your account.

Use this endpoint to register SSH keys for VPS authentication.

Authorizations
AuthorizationstringRequired

API Token authentication

Body
namestringRequiredExample: My Public Key
keystringRequiredExample: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD...
Responses
200

Success response

application/json
idintegerOptional

Public key ID

Example: 325
namestringOptional

Public key name

Example: My public key
keystringOptional

Public key content

Example: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD...
post/api/vps/v1/public-keys
POST /api/vps/v1/public-keys HTTP/1.1
Host: developers.hostinger.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 75

{
  "name": "My Public Key",
  "key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD..."
}
{
  "id": 325,
  "name": "My public key",
  "key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD..."
}

Last updated

Was this helpful?