latestOpenAPI 3.0.32026-08-224982,0272.8 MB

e445c15e5bee

Key

Create key

post/api/v2/{coin}/key

Path parameters

coinstring required

A cryptocurrency or token ticker symbol.

Example:btc

Request body

encryptedPrvstring

Private part of this key pair, encrypted with a passphrase that only the client knows. Required for all sources except bitgo.

source'backup' | 'bitgo' | 'cold' | 'user'
enterprisestring
newFeeAddressboolean

Create a new keychain instead of fetching enterprise key (only for Ethereum)

originalPasscodeEncryptionCodestring

Passphrase that is used to decrypt box D (i.e. encrypted wallet passphrase) on your wallet keycard

pubstring

public part of a key pair

isDistributedCustodyboolean

Set to true if you want to create a key for distributed custody. This parameter is only valid if you have the distributed custody enterprise license enabled and are creating a BitGo key. Otherwise it will throw an error.

commonPubstring

The commonPub for the key. This value is necessary for MPC keys when the source is either “user” or “backup”. Setting this indicates to BitGo that the owner of the key has received all key shares they needed for generating their key.

commonKeychainstring

The commonKeychain for the key if this is a MPC key. This value is required to be set when the type is set to “tss” and when the source is either “user” or “backup”. Setting this indicates to BitGo that the owner of the key has received all key shares they needed for generating their key. This value is the common pub concatenated with the common chaincode.

typestring

Coin name used to choose correct KRS public key for the given provider. Possible valid values are "btc", "eth", "bitcoin"

keyType'tss' | 'independent'

A value from a string enum denoting what kind of key this is. Defaults to “independent” indicating an on-chain key is requested. If set to “tss” this tells us that a “tss” key is requested.

userGPGPublicKeystring

User's public key in ASCII armored format. Only required for BitGo MPC keys.

backupGPGPublicKeystring

Backup public key in ASCII armored format (may be managed by user or KRS). Only required for BitGo MPC keys.

isMPCv2boolean

Whether a key or wallet is using the Multi-Party Computation version 2 protocol. Optional field.

Example request

{
  "coinSpecific": {
    "lnbtc": {
      "purpose": "userAuth"
    },
    "tlnbtc": {
      "purpose": "userAuth"
    }
  },
  "source": "user",
  "enterprise": "59cd72485007a239fb00282ed480da1f",
  "pub": "xpub661MyMwAqRbcGMVhmc7wqQRYMtcX9LAvSj1pjB213y5TsrkV2uuzJjWnjBrT1FUeNWGPjaVm5p7o6jdNcQJrV1cy3a1R8NQ9m7LuYKA8RpH",
  "keyShares": [
    {
      "from": "user",
      "to": "user"
    }
  ],
  "type": "eth",
  "keyType": "tss"
}

Response

OK

OR

Example response

{
  "id": "59cd72485007a239fb00282ed480da1f",
  "source": "user",
  "type": "tss",
  "pub": "xpub661MyMwAqRbcGMVhmc7wqQRYMtcX9LAvSj1pjB213y5TsrkV2uuzJjWnjBrT1FUeNWGPjaVm5p7o6jdNcQJrV1cy3a1R8NQ9m7LuYKA8RpH"
}