REST API›Wallet & Transact›Key

POST

Create a key for a coin, optionally providing backup or MPC key material.

Path Params

  • coin string required
    Coin or token ticker.

Body Params

object

Create key request

Specifies the key source and optional key material, provider, and MPC parameters.

  • coinSpecific object
    Coin-specific creation options, including Lightning authentication key purpose.
    coinSpecific object
    • lnbtc object
      lnbtc object
      • purpose string enum
        userAuthnodeAuth
    • tlnbtc object
      tlnbtc object
      • purpose string enum
        userAuthnodeAuth
  • encryptedPrv string
    Private key encrypted with a client-controlled passphrase.
  • provider string
    Backup key provider.
  • source string enum
    Owner of the key.
    usercoldbitgobackup
  • derivedFromParentWithSeed string
    Seed used to derive the key from a parent.
  • disableKRSEmail boolean
    Disable backup provider email notifications.
  • krsSpecific map of objects
    Additional backup provider options.
  • enterprise string
    Public ID of the enterprise that owns the key.
  • identifier string
    Client-specified key identifier.
  • newFeeAddress boolean
    Create a new Ethereum fee address key.
  • originalPasscodeEncryptionCode string
    Passphrase encryption code for the wallet keycard.
  • pub string
    Public key material.
  • isDistributedCustody boolean
    Whether the BitGo key uses distributed custody.
  • commonPub string
    Common MPC public key.
  • commonKeychain string
    Common MPC public key and chain code.
  • keyShares array of objects
    keyShares object
    • privateShareProof string
    • vssProof string
    • from string enum required
      The source of the key share.
      userbackupbitgo
    • to string enum required
      The recipient of the key share.
      userbackupbitgo
    • 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.
  • type string
    Legacy backup key type or coin name.
  • keyType string enum
    Key generation type.
    tssindependent
  • userGPGPublicKey string
    ASCII-armored user GPG public key.
  • backupGPGPublicKey string
    ASCII-armored backup GPG public key.
  • isMPCv2 boolean
    Whether the key uses MPC version 2.

Responses

200
OK

Response Body

ONE OF

  • id string required

    matches ^[0-9a-f]{32}$

  • pub string required
    Public part of a key pair
  • ethAddress string
    Ethereum address associated with this key
  • derivedFromParentWithSeed string
  • derivedFromParentWithPath string
  • source string enum required
    usercoldbitgobackup
  • hsmType string enum
    The type of HSM that owns this key.
    institutionalnitroSDTrustNitrofrankfurtDETrustNitroawsKms
  • isBitGo boolean
    "true" if this key is owned by BitGo
  • isTrust boolean
    "true" if this key is owned by Trust
  • encryptedPrv string
    The encrypted private key
  • aspKeyId number
  • coinSpecific map of objects
    coinSpecific object
    • <key> object
  • type string enum 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.

    Defaults to independent

    tssindependent
  • 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.
  • verifiedVssProof boolean
  • 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.
  • commonPubSig string
  • provider string
  • distributedCustody string
  • webauthnDevices array of objects
    webauthnDevices object
    • authenticatorInfo object required
      The information about the authenticator
      authenticatorInfo object
      • credID string required
        The credential ID of the authenticator
      • fmt string required
        The format of the authenticator
      • publicKey string required
        The public key of the authenticator
    • encryptedPrv string required
      The encrypted private key
    • otpDeviceId string required
      The OTP device ID
    • prfSalt string required
      The PRF salt
  • migratedFrom string
  • parent string
    The id of the parent key this key was derived from, if any
  • keyShares array of objects
    keyShares object
    • hsmSig string
      The HSM signature
    • privateShareProof string
      The certificate of the private share, signed by the source of the key share.
    • vssProof string
      The verifiable shamir share verification value
    • from string enum required
      The source of the key share.
      userbackupbitgo
    • to string enum required
      The recipient of the key share.
      userbackupbitgo
    • 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.
  • commonKeychainSig string
  • walletHSMGPGPublicKeySigs string
400
Bad Request

Response Body

object

  • name string
    Error code
  • context map of objects required
    Properties that apply to a specific error name
    context object
    • <key> object
  • error string required
    Human-readable error message
  • requestId string required
    Client request id
401
Unauthorized

Response Body

object

  • name string
    Error code
  • context map of objects required
    Properties that apply to a specific error name
    context object
    • <key> object
  • error string required
    Human-readable error message
  • requestId string required
    Client request id
403
Forbidden

Response Body

object

  • name string
    Error code
  • context map of objects required
    Properties that apply to a specific error name
    context object
    • <key> object
  • error string required
    Human-readable error message
  • requestId string required
    Client request id
404
Not Found

Response Body

object

  • name string
    Error code
  • context map of objects required
    Properties that apply to a specific error name
    context object
    • <key> object
  • error string required
    Human-readable error message
  • requestId string required
    Client request id
409
Conflict

Response Body

object

  • name string
    Error code
  • context map of objects required
    Properties that apply to a specific error name
    context object
    • <key> object
  • error string required
    Human-readable error message
  • requestId string required
    Client request id
429
Too Many Requests

Response Body

object

  • name string
    Error code
  • context map of objects required
    Properties that apply to a specific error name
    context object
    • <key> object
  • error string required
    Human-readable error message
  • requestId string required
    Client request id
500
Internal Server Error

Response Body

object

  • name string
    Error code
  • context map of objects required
    Properties that apply to a specific error name
    context object
    • <key> object
  • error string required
    Human-readable error message
  • requestId string required
    Client request id
503
Service Unavailable

Response Body

object

  • name string
    Error code
  • context map of objects required
    Properties that apply to a specific error name
    context object
    • <key> object
  • error string required
    Human-readable error message
  • requestId string required
    Client request id