# Generate cryptographic key pair using HSM **POST /auth/create-key** One-time setup endpoint that generates a seed public key from HSM using BIP44 derivation. The user then derives their final key pair locally using this seed. ## Servers - Production API: https://pay-api.aiic.nz/v1 (Production API) - Staging API: https://pay-api-staging.aiic.nz/v1 (Staging API) - Development API: https://pay-api-dev.aiic.nz/v1 (Development API) ## Authentication methods - Bearer auth ## Parameters ### Body: application/json (object) - **ledgerPath** (string) Ledger path for key derivation (e.g., "NZD/main") - **secretNumber** (string) User's secret number (4-6 digits) ## Responses ### 201 Key generated successfully #### Body: application/json (object) - **success** (boolean) - **seedPublicKey** (string) HSM-derived seed public key for local key derivation - **keyId** (string(uuid)) Unique identifier for the key derivation - **message** (string) ### 400 Invalid request parameters #### Body: application/json (object) - **success** (boolean) - **error** (string) Error message - **errorCode** (string) Machine-readable error code - **details** (object) Additional error details - **timestamp** (string(date-time)) When the error occurred ### 401 Unauthorized - invalid authentication token ### 429 Rate limit exceeded ### 500 Internal server error #### Body: application/json (object) - **success** (boolean) - **error** (string) Error message - **errorCode** (string) Machine-readable error code - **details** (object) Additional error details - **timestamp** (string(date-time)) When the error occurred [Powered by Bump.sh](https://bump.sh)