## Create a new API key **post** `/api/user/api-keys` Creates a new PAT or Ed25519 key pair. The plaintext key / private key PEM is returned **once** and never stored. ### Body Parameters - `name: optional string` Optional label for the key (max 64 characters) - `type: optional "PAT" or "ED25519"` Key type — PAT for Bearer tokens, ED25519 for asymmetric signing - `"PAT"` - `"ED25519"` ### Returns - `id: optional string` - `fingerprint: optional string` SHA256 fingerprint of the public key (Ed25519 keys only) - `key: optional string` Full `racks_…` token (PAT) or private key PEM (Ed25519) — store it now, it will not be shown again - `publicKeyPem: optional string` Ed25519 public key PEM (Ed25519 keys only) ### Example ```http curl https://racks.cash/api/user/api-keys \ -X POST ``` #### Response ```json { "id": "id", "fingerprint": "fingerprint", "key": "key", "publicKeyPem": "publicKeyPem" } ```