---
title: "Create key"
method: POST
path: "/api/v2/{coin}/key"
tags: ["Key"]
---

# Create key

`POST /api/v2/{coin}/key`

## Path parameters

- `coin` string, required — A cryptocurrency or token ticker symbol.

## Request body

- CreateKey
  - `coinSpecific` KeyCreateCoinSpecific
    - `lnbtc` KeyCreateCoinSpecificLnbtc
      - `purpose` 'userAuth' | 'nodeAuth'
    - `tlnbtc` KeyCreateCoinSpecificLnbtc
      - `purpose` 'userAuth' | 'nodeAuth'
  - `encryptedPrv` string — 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'
  - `enterprise` string
  - `newFeeAddress` boolean — Create a new keychain instead of fetching enterprise key (only for Ethereum)
  - `originalPasscodeEncryptionCode` string — Passphrase that is used to decrypt box D (i.e. encrypted wallet passphrase) on your wallet keycard
  - `pub` string — public part of a key pair
  - `isDistributedCustody` boolean — 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.
  - `commonPub` string — 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.
  - `commonKeychain` string — 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.
  - `keyShares` KeyShare[] — Only required for BitGo MPC keys. Those will be the shares from the user and the backup provider that BitGo will end up generating the BitGo key (share) from.
    - `from` 'user' | 'backup' | 'bitgo', required
    - `to` 'user' | 'backup' | 'bitgo', required
    - `publicShare` string, required — Public part of the share concatenated with chain code (64+64 characters hex string).
    - `privateShare` string, required — Private part of the share concatenated with chain code (64+64 characters hex string). Depending on who the source and the recipient are, the share might be encrypted against the recipient's public key.
    - `privateShareProof` string — The certificate of the private share, signed by the source of the key share.
    - `vssProof` string — The verifiable shamir share verification value
  - `type` string — 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.
  - `userGPGPublicKey` string — User's public key in ASCII armored format. Only required for BitGo MPC keys.
  - `backupGPGPublicKey` string — Backup public key in ASCII armored format (may be managed by user or KRS). Only required for BitGo MPC keys.
  - `isMPCv2` boolean — Whether a key or wallet is using the Multi-Party Computation version 2 protocol. Optional field.

## Response `200`

OK

- union
  - Key
    - `encryptedPrv` string — The encrypted private key
    - `id` string, required
    - `isBitGo` boolean — True, if this key is owned by BitGo
    - `source` 'backup' | 'bitgo' | 'cold' | 'user'
    - `type` 'tss' | 'independent', required — 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.
    - `pub` string — public part of a key pair
  - KeyTSSCreated — This schema contains KeyTSS attributes and several ephemeral fileds which are only available during the key creation since they are not stored.
    - `encryptedPrv` string — The encrypted private key
    - `id` string, required
    - `isBitGo` boolean — True, if this key is owned by BitGo
    - `source` 'backup' | 'bitgo' | 'cold' | 'user', required
    - `type` 'tss' | 'independent', required — 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.
    - `commonKeychain` string — 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 concatenation of the common public key (32-byte) with the common chaincode (32-byte) as a hex string.
    - `commonPub` string — The common public key. This value is required to be set 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.
    - `commonKeychainSig` string — openPGP ASCII armored pubkey format string. This contains the HSM signature/certification (signed by BitGo MPC GPG key pair) of the commonKeychain. This is necessary for verification purposes to ensure that the commonKeychain value came from BitGo's HSM. Used for full custody/OVC operations.
    - `commonPublicKeySig` string — OpenPGP ASCII pubkey armoured string containing HSM signature certification. Allows to ensure that commonPublicKey came from the HSM
    - `keyShares` KeyShareResponse[]
      - `from` 'user' | 'backup' | 'bitgo', required
      - `to` 'user' | 'backup' | 'bitgo', required
      - `publicShare` string, required — Public part of the share concatenated with chain code (64+64 characters hex string).
      - `privateShare` string, required — Private part of the share concatenated with chain code (64+64 characters hex string). Depending on who the source and the recipient are, the share might be encrypted against the recipient's public key.
      - `privateShareProof` string — The certificate of the private share, signed by the source of the key share.
      - `vssProof` string — The verifiable shamir share verification value
      - `hsmSig` string, required — openPGP ASCII armored public key format string. Can be used to ensure that the "u" value came from the HSM. This contains the HSM signature/certification (signed by bitgo GPG key pair) of the public form of the "u" value and notation packets that indicate the commonPublicKey and the key ids of the two GPG keys used to share wrapping (userGPGPublicKey and backupGPGPublicKey).
    - `walletHSMGPGPublicKeySigs` string — GPG ASCII armored public key format that consists of HSM signature/certification and GPG notation data appended to the key signature subpackets

## Other responses

- `400` — Bad Request

---

[API](https://skmtc.net/bitgo/apis/bitgo-api.md) · [All operations](https://skmtc.net/bitgo/apis/bitgo-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/bitgo/bitgo-api/revisions/e445c15e5bee/schema)
