invalid_public_key

HTTP 400

Invalid SSH public key

Type URL

https://developer.hostup.se/errors/invalid_public_key

Detail message

The SSH public key could not be parsed.

Example response

{
  "type": "https://developer.hostup.se/errors/invalid_public_key",
  "title": "Invalid SSH public key",
  "status": 400,
  "detail": "The SSH public key could not be parsed.",
  "code": "invalid_public_key",
  "instance": "/api/v2/...",
  "requestId": "req_abc123",
  "timestamp": "2026-04-27T12:00:00.000Z"
}

Endpoints that may return this error

Handling this error

const response = await fetch(url, options);

if (!response.ok) {
  const problem = await response.json();

  if (problem.code === "invalid_public_key") {
    // Handle: Invalid SSH public key
    console.error(problem.detail);
  }
}