{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/phala/json-schema/phala-ssh-key-response-schema.json",
  "title": "SshKeyResponse",
  "description": "SSH key details returned by API.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/phala-ssh-keys-api-openapi.yml#/components/schemas/SshKeyResponse",
  "properties": {
    "id": {
      "type": "string",
      "title": "Id",
      "description": "Key hashid"
    },
    "user_id": {
      "type": "string",
      "title": "User Id",
      "description": "Owner user hashid"
    },
    "name": {
      "type": "string",
      "title": "Name",
      "description": "Human-readable name"
    },
    "public_key": {
      "type": "string",
      "title": "Public Key",
      "description": "OpenSSH format public key"
    },
    "fingerprint": {
      "type": "string",
      "title": "Fingerprint",
      "description": "SHA256 fingerprint"
    },
    "key_type": {
      "type": "string",
      "title": "Key Type",
      "description": "Algorithm (ed25519, rsa, etc)"
    },
    "source": {
      "type": "string",
      "title": "Source",
      "description": "Origin: manual or github"
    },
    "key_metadata": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Key Metadata",
      "description": "Extra data like bit length"
    },
    "last_synced_at": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Last Synced At",
      "description": "Last GitHub sync timestamp"
    },
    "created_at": {
      "type": "string",
      "title": "Created At",
      "description": "Creation timestamp"
    },
    "updated_at": {
      "type": "string",
      "title": "Updated At",
      "description": "Last update timestamp"
    }
  },
  "type": "object",
  "required": [
    "id",
    "user_id",
    "name",
    "public_key",
    "fingerprint",
    "key_type",
    "source",
    "created_at",
    "updated_at"
  ]
}