REST API›Wallet & Transact›Wallet share

POST

Share wallet with an existing BitGo user. When the wallet has more than one admin, the share waits for approval.

Path Params

  • coin string required
    A cryptocurrency or token ticker symbol
  • walletId string required
    The ID of the wallet

Body Params

object

Create V2 Wallet Share Request Body

The request body for sharing a wallet with an existing BitGo user: who receives the share, with which permissions, and the key that is passed to them.

  • user string required

    The ID of the user to share the wallet with.

    The user must be active and, for enterprise wallets, a member of the enterprise.

  • permissions string

    Comma-separated list of privileges for the wallet.

    Includes admin, freeze, spend, trade, view and dapp, for example spend,view. Needed for a new share. A reshare ignores it, because it reuses the permissions the user already has.

  • message string

    User readable message to display to the share recipient.

    Free text.

  • reshare boolean

    Flag for reinviting a user to the wallet.

    Required if the invitee is already on the wallet but has changed their password and needs a new invite.

  • disableEmail boolean

    Flag for disabling the invite notification email.

    When true, the recipient is not notified by email.

  • keychain object

    The key to pass to the receiving user.

    Required when the share grants spend permission on a coin with keys, unless skipKeychain is true.

    keychain object
    • encryptedPrv string
      Private key of the user sharing the wallet, encrypted under their wallet passphrase
    • fromPubKey string
      Derived public key of the user sharing the wallet
    • path string
      BIP32 HD path of the derived public keys (fromPubKey and toPubKey)
    • pub string
      One of the wallet public key (on-chain) or the common keychain (MPC)
    • toPubKey string
      Derived public key of the user receiving the share. It must match the derivation of the recipient's ECDH keychain at path
  • skipKeychain boolean

    If true, allows creating a wallet share without sharing a key when the wallet is shared with spend permission.

    Required for multi-user-key wallets, and keychain must then be empty.

Responses

200
OK

Response Body

object

A share of a wallet between two BitGo users.
  • id string required

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

  • coin string required
    A cryptocurrency or token ticker symbol.
  • wallet string required
    The ID of the shared wallet.
  • walletLabel string
    Name of the wallet. Can be absent for shares created before the name was stored.
  • fromUser string required
    The ID of the user who shared the wallet.
  • toUser string required
    The ID of the user the wallet is shared with.
  • permissions array of strings required
  • state string enum
    The state of the share.
    pendingapprovalactiveacceptedcanceledrejected
  • enterprise string
    The ID of the enterprise the wallet belongs to.
  • message string
    User readable message for the recipient of the share.
  • pendingApprovalId string
    Only set if the share is waiting for approval.
  • keychainOverrideRequired boolean
    Deprecated. Always false.
  • userMultiKeyRotationRequired boolean
    Whether the recipient has to supply their own public key when accepting the share.
  • isUMSInitiated boolean
    Whether the share was created by user management.
  • keychain object
    Only set if the share includes a key.
    keychain object
    • pub string
      Sharing user's root public key, or the common keychain of an MPC wallet.
    • encryptedPrv string
      Sharing user's private key, encrypted under their wallet passphrase.
    • fromPubKey string
      Sharing user's derived public key, used to calculate the wallet sharing secret.
    • toPubKey string
      Shared-to user's derived public key, used to calculate the wallet sharing secret.
    • path string
      BIP32 HD path of the derived public keys.
  • updatedAt string date-time
400
Bad Request

Response Body

ONE OF

  • 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
422
Unprocessable Entity

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