API to transmit and assign a public key