BitGo Platform V2 Reference (2.0.0)

Download OpenAPI specification:Download

Overview

BitGo provides a simple and robust RESTful API and client SDK to integrate digital currency wallets with your application. In Platform V2, we have extended our API and SDK to allow the management of multiple digital currencies and wallets through a single, unified interface.

The BitGo SDK enables the following:

  • Creation of multi-signature wallets
  • Wallet balance and transaction listing
  • Transaction creation and signing
  • Transaction monitoring and notifications
  • Secure user authentication
  • Multi-user workflows for use in enterprise environments
  • Policies and spending limits

This is the latest documentation for Platform V2, and is generated from OpenAPI 3.0 schema. OpenAPI technology provides improved validation of client requests, and more consistency between the API documentation and server-side implementation of API endpoints. The original V2 API docs and V1 docs are still available for your reference.

Legacy users may also refer to the V1 Bitcoin API, which is still available today. There is no dependency for developers to integrate with V1 or read the legacy documentation in order to take advantage of Platform V2.

Multi-Signature Wallets

The primary advantage of multi-signature wallets is the ability for multiple machines and people to work together to approve a given transaction. Without multiple signatures on a transaction, all credentials to approve a transaction must reside with a single person on a machine. If that person or machine is compromised by an attacker, all funds can be taken with no recourse and no ability to audit the individual that invoked the key.

BitGo's multi-signature wallets allow you to keep control of your Bitcoin or other cryptocurrency despite introducing the concept of a co-signer. This allows enterprises to set up and maintain roles, policies, and rules on the wallet, making digital currency usable for businesses.

For more information, please read the BitGo Whitepaper.

Software Development Kit

The BitGo web APIs provide developers with the capability to create and manage multi-signature wallets, manipulate their policies and interact with multiple digital currencies over a single robust interface. Several sensitive operations, such as the creation of user private keys and signing of transactions, must to be performed client-side.

For this reason, we provide and recommend the use of our Software Development Kit (SDK), which implements these client-side wallet features and interfaces with our APIs.

Currently, our SDK is available in JavaScript and runs in either Node.js or a browser. If your application does not use native JavaScript, you may refer to the BitGo Express REST API guide, which offers the same feature set via a local server daemon.

Installing the JavaScript SDK (via npm)

npm install bitgo --save

Installing the JavaScript SDK (via Github)

  • Visit our open-source SDK page on Github.
  • Install git and nodejs/npm (recommended to follow the examples).
  • Clone our repository locally by running the command: git clone git@github.com:BitGo/BitGoJS.git
  • In the BitGoJS directory, install dependencies using: npm install
  • Check out the examples directory to see how you can use the SDK! In the example directory, run
node auth.js <testusername> <testpassword> 0000000

To initialize your environment and authenticate, use the following code:

const BitGoJS = require('bitgo');
// Read the user authentication section to get your API access token
const bitgo = new BitGoJS.BitGo({ env: 'test', accessToken: process.env.ACCESS_TOKEN });
let coin = bitgo.coin('tbtc');

BitGo Express REST API

The BitGo Express REST API is a lightweight service for developers who want to use the BitGo service, but are developing in a language other than JavaScript.

BitGo Express runs as a service in your own data center, and handles the client-side operations involving your own keys, such as partially signing transactions before submitting them to BitGo. This ensures your keys never leave your network, and are never seen by BitGo. BitGo Express can also proxy the standard BitGo REST APIs, providing a unified interface to BitGo through a single REST API.

To use BitGo Express:

  • Install BitGoJS
  • Run the following command in the bin directory:
./bitgo-express --debug --port 3080 --env test --bind localhost
  • Make all BitGo REST API calls to the machine on which bitgo-express is running. BitGo Express will either handle the request itself or proxy it to the BitGo service.

You can use curl to verify that BitGo Express is running:

BITGO_EXPRESS_HOST='localhost'
curl http://$BITGO_EXPRESS_HOST:3080/api/v2/ping

BitGo Express Proxy Support

BitGo Express can also make requests to BitGo via a proxy. This can be done by setting the BITGO_USE_PROXY environment variable to the URI where your proxy is listening.

For example, to instruct BitGo Express to use a SOCKS proxy which is listening at 192.0.2.1 on port 12000, you should start BitGo Express with the following command:

BITGO_USE_PROXY="socks://192.0.2.1:12000" ./bitgo-express --debug --port 3080 --env test --bind localhost

BitGo Express currently supports the following proxy protocols:

  • HTTP
  • HTTPS
  • SOCKSv4
  • SOCKSv5
  • PAC

Environments

BitGo has two separate environments available for development and production. For security reasons, all BitGo API requests are made using TLS over HTTPS.

Test Environment

The BitGo test environment is used by default in our examples and the SDK. It is entirely separate from BitGo's production environment and there is no overlap in either data or accounts. You will need to create accounts at test.bitgo.com.

In the test environment, you can use 0000000 in place of the OTP when authenticating.

This environment is connected to the TestNet networks of various digital currencies we support. Tokens on these networks can be obtained from faucets and do not represent real money.

Production Environment

The BitGo production endpoint is live and used by partners and our own web application on www.bitgo.com.

To use this environment, specify { env: 'prod' } when using the SDK or -e prod when running BitGo Express. SSL certifications should be provided to secure traffic to and from the BitGo Express instances when operating on the Production environment.

Coin / Digital Currency Support

BitGo Platform V2 supports a variety of digital currencies, with more being added every quarter.

To select the coin or token:

var bitgo = new BitGoJS.BitGo({ env: 'test', accessToken: process.env.ACCESS_TOKEN });`
var coin = bitgo.coin('btc');

(replace btc with your desired coin identifier)

Identifier Digital Currency Family BitGo Environment Release status
btc Bitcoin UTXO-based Production General availability
bch Bitcoin Cash UTXO-based Production General availability
bsv Bitcoin SV UTXO-based Production General availability
btg Bitcoin Gold UTXO-based Production General availability
dash Dash UTXO-based Production General availability
eth Ethereum Account Production Enterprise access
ltc Litecoin UTXO-based Production General availability
rmg Royal Mint Gold UTXO-based Production Enterprise access
xlm XLM Account Production General availability
xrp XRP Account Production Enterprise access
zec Zcash UTXO-based Production General availability
aion AION ERC20 token Account Production Enterprise access
ana ANA ERC20 token Account Production Enterprise access
ant Aragon ERC20 token Account Production Enterprise access
appc AppCoins ERC20 token Account Production Enterprise access
ast AirSwap ERC20 token Account Production Enterprise access
audx eToro Australian Dollar ERC20 token Account Production Enterprise access
bat Basic Attention Token ERC20 token Account Production Enterprise access
bbx BBX ERC20 token Account Production Enterprise access
bcap BCAP ERC20 token Account Production Enterprise access
bid Blockbid ERC20 token Account Production Enterprise access
bnt Bancor ERC20 token Account Production Enterprise access
bnty Bounty0x ERC20 token Account Production Enterprise access
btt Blocktrade ERC20 token Account Production Enterprise access
brd Bread ERC20 token Account Production Enterprise access
cadx eToro Canadian Dollar ERC20 token Account Production Enterprise access
cag Change ERC20 token Account Production Enterprise access
cbc CashBet Coin ERC20 token Account Production Enterprise access
cdt Blox ERC20 token Account Production Enterprise access
cel Celsius ERC20 token Account Production Enterprise access
cgld Coineru Gold ERC20 token Account Production Enterprise access
chfx eToro Swiss Frank ERC20 token Account Production Enterprise access
chsb SwissBorg ERC20 token Account Production Enterprise access
cln Colu Local Network ERC20 token Account Production Enterprise access
cnyx eToro Chinese Yuan ERC20 token Account Production Enterprise access
cpay Cryptopay ERC20 token Account Production Enterprise access
cplt Coineru Platinum ERC20 token Account Production Enterprise access
cslv Coineru Silver ERC20 token Account Production Enterprise access
cvc Civic ERC20 token Account Production Enterprise access
dai Dai ERC20 token Account Production Enterprise access
dent Dent ERC20 token Account Production Enterprise access
dgx Digix ERC20 token Account Production Enterprise access
echt eChat ERC20 token Account Production Enterprise access
egl eGold ERC20 token Account Production Enterprise access
elf Aelf ERC20 token Account Production Enterprise access
eurx eToro Euro ERC20 token Account Production Enterprise access
fmf Formosa Financial ERC20 token Account Production Enterprise access
fun FunFair ERC20 token Account Production Enterprise access
gbpx eToro Pound Sterling ERC20 token Account Production Enterprise access
gen DAOstack ERC20 token Account Production Enterprise access
gldx eToro Gold ERC20 token Account Production Enterprise access
gno Gnosis ERC20 token Account Production Enterprise access
gnt Golem ERC20 token Account Production Enterprise access
gusd Gemini Dollar ERC20 token Account Production Enterprise access
hold Hold ERC20 token Account Production Enterprise access
hst Decision Token ERC20 token Account Production Enterprise access
hxro Hxro ERC20 token Account Production Enterprise access
hyb Hybrid Block ERC20 token Account Production Enterprise access
incx InternationalCryptoX ERC20 token Account Production Enterprise access
ind Indorse ERC20 token Account Production Enterprise access
jpyx eToro Japanese Yen ERC20 token Account Production Enterprise access
kin Kin ERC20 token Account Production Enterprise access
knc Kyber Network ERC20 token Account Production Enterprise access
lion CoinLion ERC20 token Account Production Enterprise access
lnc Linker Coin ERC20 token Account Production Enterprise access
mdx Mandala ERC20 token Account Production Enterprise access
mfg SyncFab ERC20 token Account Production Enterprise access
mkr Maker ERC20 token Account Production Enterprise access
mtl Metal ERC20 token Account Production Enterprise access
nas Nebulas ERC20 token Account Production Enterprise access
nexo Nexo ERC20 token Account Production Enterprise access
neu Neumark ERC20 token Account Production Enterprise access
nmr Numeraire ERC20 token Account Production Enterprise access
npxs Pundi X ERC20 token Account Production Enterprise access
nzdx eToro New Zealand Dollar ERC20 token Account Production Enterprise access
omg OmiseGo ERC20 token Account Production Enterprise access
opt OPTin Token ERC20 token Account Production Enterprise access
pax Paxos ERC20 token Account Production Enterprise access
pay TenX ERC20 token Account Production Enterprise access
plc PlusCoin ERC20 token Account Production Enterprise access
poly Polymath ERC20 token Account Production Enterprise access
powr Power Ledger ERC20 token Account Production Enterprise access
ppt Populous ERC20 token Account Production Enterprise access
pro Propy ERC20 token Account Production Enterprise access
qash QASH ERC20 token Account Production Enterprise access
qrl Quantum ERC20 token Account Production Enterprise access
qvt Qvolta ERC20 token Account Production Enterprise access
rdn Raiden Network Token ERC20 token Account Production Enterprise access
reb Regblo ERC20 token Account Production Enterprise access
rebl Rebellious ERC20 token Account Production Enterprise access
rep Augur ERC20 token Account Production Enterprise access
rfr Refereum ERC20 token Account Production Enterprise access
rubx eToro Russian Ruble ERC20 token Account Production Enterprise access
salt Salt ERC20 token Account Production Enterprise access
shk iShook ERC20 token Account Production Enterprise access
slot AlphaSlot ERC20 token Account Production Enterprise access
slvx eToro Silver ERC20 token Account Production Enterprise access
snov Snovio ERC20 token Account Production Enterprise access
snt Status Network Token ERC20 token Account Production Enterprise access
srnt Serenity ERC20 token Account Production Enterprise access
storj Storj ERC20 token Account Production Enterprise access
storm Storm ERC20 token Account Production Enterprise access
ten Tokenomy ERC20 token Account Production Enterprise access
tkx Tokenize ERC20 token Account Production Enterprise access
tnt Tierion ERC20 token Account Production Enterprise access
trst WeTrust ERC20 token Account Production Enterprise access
tusd TrueUSD ERC20 token Account Production Enterprise access
ukg UnikoinGold ERC20 token Account Production Enterprise access
upp Sentinel Protocol ERC20 token Account Production Enterprise access
usdx eToro United States Dollar ERC20 token Account Production Enterprise access
wax Worldwide Asset eXchange ERC20 token Account Production Enterprise access
wtc WaltonChain ERC20 token Account Production Enterprise access
xrl Rialto ERC20 token Account Production Enterprise access
zco Zebi Coin ERC20 token Account Production Enterprise access
zil Zilliqa ERC20 token Account Production Enterprise access
zrx 0x ERC20 token Account Production Enterprise access
tbtc Bitcoin Testnet UTXO-based Test General availability
tbch Bitcoin Cash Testnet UTXO-based Test General availability
tbsv Bitcoin SV Testnet UTXO-based Test General availability
tdash Dash Testnet UTXO-based Test General availability
teth Ethereum Kovan Testnet Account Test Enterprise access
terc Ethereum ERC20 Token Testnet Account Test Enterprise access
tltc Litecoin Testnet UTXO-based Test General availability
trmg Royal Mint Gold Testnet UTXO-based Test Enterprise access
txlm XLM Testnet Account Test General availability
txrp XRP Testnet Account Test Enterprise access
tzec Zcash Testnet UTXO-based Test Enterprise access

HTTP Status Codes

The BitGo API returns the following HTTP status codes:

HTTP Status Meaning Description
200 Success The operation succeeded
201 Created A new object was created
202 Accepted The operation succeeded, but requires approval (e.g. sending funds)
400 Bad Request The client request is invalid
401 Unauthorized Authentication failed (e.g. invalid token specified by the Authorization header)
403 Forbidden Authentication failed, but the operation is not allowed
404 Not Found Requested resource does not exist
429 Too Many Requests Client request rate exceeded the limit

Error Handling

When the server returns a 4xx status code, the response body contains an error object with the following structure:

{
    "error": "invalid wallet id",
    "name": "InvalidWalletId",
    "requestId": "cjo7uw7si0buzttlmazmvthay"
}

The name value is an error code that does not change. The error value is a human-readable message which may change.

Pagination

Certain routes, such as listing wallets or transactions, may return an array of results.

By default, the API will return 25 results per request. The limit parameter may be used to increase the number of results per request, up to a maximum of 500.

To get the next batch of results, call the same route again with a prevId request parameter corresponding to the nextBatchPrevId property received in the last call.

bitgo.coin('tbtc').wallets().list({ limit: 50 })
.then(function(wallets) {
  // print wallet list
  console.dir(wallets);
});
curl \
-H "Authorization: Bearer $ACCESS_TOKEN" \
https://test.bitgo.com/api/v2/tbtc/wallet?limit=50

Example JSON Response:

{
  "coin": "tbtc",
  "wallets": [
    {
      "_wallet": {
        "id": "585a0860c5a04c696edd2c331ce2f346",
        "coin": "tbtc",
        "label": "V2 TBTC Test Wallet",
        ...
      }
    },
    ...
  ],
  "count": 50,
  "nextBatchPrevId": "590b73478c8fc40727b0c3d421ec909c"
}

Balance Strings

On most digital currencies, the wallet, transaction and address objects all contain a balance property.

In BitGo Platform V2, we have introduced a String suffix for all balances, as certain digital currencies (such as Ethereum) feature balance ranges which exceed those that can be stored as a typical number in JavaScript.

While the balance property will continue to be a number, it will not be available on all currencies across the V2 platform. We recommend using balanceString instead of balance for this reason, and balanceString will be available as a property over all digital currencies on V2. This applies to all number properties.

BitGo UTXO Library

The BitGo UTXO Library (bitgo-utxo-lib) is an open source library for UTXO transaction building and does not require a BitGo account or the BitGo SDK to be used. The bitgo-utxo-lib allows any developer working with UTXO-based blockchains to easily build and sign their own transactions.

Learn more about the BitGo UTXO Library here.

User Authentication

BitGo's authentication utilizes the Authorization header, which allows the caller to specify an access token.

User authentication in APIv2 is compatible with APIv1. Access tokens created may be used with both versions of the API.

Access tokens are used to maintain a session and are created via password login (requires OTP). Typical access tokens obtained via the web interface are locked to a single IP-address and are valid for 60 minutes, although developers may create long lasting tokens.

For sensitive API calls (such as those that spend funds), a valid session token is not sufficient. To access these API calls, the session must be explicitly unlocked using the Unlock API by using an additional OTP. A single unlock call enables the user to do one transaction of any size (still subject to wallet policy), or any number of transactions up to an internal BitGo-managed quota.

APIs which require unlocking will include needsUnlock=true in their response if the session is currently locked, or if the current unlock session has an insufficient remaining transaction quota.

Alternatively, custom access tokens can be created bound to specific scopes for expiration time, permission level, and spending amount.

API Access Tokens

For the purposes of automation, developers can request long-lived access tokens with a custom expiration time and unlock them for a specified spending limit. These access tokens must be locked to an IP address.

Creation via the web interface

  1. Access the BitGo dashboard and head into the "User Settings" page from the top right menu.
  2. Click on the "Developer" tab.
  3. You can now create a long-lived access token.

The token will come unlocked by default with your specified spending limit. Do not attempt to unlock the token again via API as this will reset the unlock.

Security note

BitGo's SDK and Express App secures tokens using our Auth V2 protocol, which does not send the access token over the wire. For this reason, we recommend that API requests from 3rd party clients should be proxied through BitGo Express.

Address

List addresses

List receive addresses on a wallet

path Parameters
coin
required
string
Example: "btc"
walletId
required
string^[0-9a-f]{32}$
Example: "585951a5df8380e0e3063e9f12345678"
query Parameters
labelContains
string

A case-insensitive regular expression which will be used to filter returned addresses based on their address label.

limit
integer [ 1 .. 500 ]
Default: 25

Maximum number of results to return. If the result set is truncated, use the nextBatchPrevId value to get the next batch.

mine
boolean
Default: false

Whether to return only the addresses which the current user has created.

prevId
string <uuid>
Example: "585951a5df8380e0e3063e9f"

Return the next batch of results, based on the nextBatchPrevId value from the previous batch.

chains
Array of string
Items Enum:0 1 10 11 20 21

Replaces segwit. Mutually exclusive with segwit. Returns only unspents/addresses of the chains passed. If neither chains nor segwit is passed unspents/addresses from all chains are returned.

sort
integer
Default: 1
Enum:-1 1

Sort order of returned addresses. (1 for ascending, -1 for descending).

Responses

200
202

Wallet is pending on-chain initialization

400
get /api/v2/{coin}/wallet/{walletId}/addresses

Production environment

https://www.bitgo.com/api/v2/{coin}/wallet/{walletId}/addresses

Test environment

https://test.bitgo.com/api/v2/{coin}/wallet/{walletId}/addresses

Request samples

Copy
wallet.addresses()
.then(function(addresses) {
  // print addresses
  console.dir(addresses);
});

Response samples

application/json
Copy
Expand all Collapse all
{
  • "coin": "string",
  • "totalAddressCount": 0,
  • "pendingAddressCount": 0,
  • "addresses":
    [
    ],
  • "nextBatchPrevId": "585951a5df8380e0e3063e9f"
}

Create address

path Parameters
coin
required
string
Example: "btc"
id
required
string^[0-9a-f]{32}$
Example: "585951a5df8380e0e3063e9f12345678"
Request Body schema: application/json
chain
integer
Enum:0 1 10 11 20 21
label
string <= 250 characters

A human-readable label which should be applied to the new address

lowPriority
boolean
Default: false

Whether the deployment of the address forwarder contract should use a low priority fee key (ETH only)

gasPrice
number or string

Explicit gas price to use when deploying the forwarder contract (ETH only). If not given, defaults to the current estimated network gas price.

Responses

200
400
post /api/v2/{coin}/wallet/{id}/address

Production environment

https://www.bitgo.com/api/v2/{coin}/wallet/{id}/address

Test environment

https://test.bitgo.com/api/v2/{coin}/wallet/{id}/address

Request samples

application/json
Copy
Expand all Collapse all
{
  • "chain": 1,
  • "label": "Bob's Hot Wallet Address",
  • "lowPriority": false,
  • "gasPrice": 0
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "id": "585951a5df8380e0e3063e9f12345678",
  • "address": "string",
  • "chain": 1,
  • "index": 0,
  • "coin": "string",
  • "lastNonce": -1,
  • "wallet": "585951a5df8380e0e3063e9f12345678",
  • "coinSpecific":
    {
    },
  • "label": "string",
  • "addressType": "p2sh"
}

Get address

Gets a receive address on a wallet

path Parameters
addressOrId
required
string or string

Address or Id which will be used for information lookup

coin
required
string
Example: "btc"
id
required
string^[0-9a-f]{32}$
Example: "585951a5df8380e0e3063e9f12345678"

Responses

200
400
get /api/v2/{coin}/wallet/{id}/address/{addressOrId}

Production environment

https://www.bitgo.com/api/v2/{coin}/wallet/{id}/address/{addressOrId}

Test environment

https://test.bitgo.com/api/v2/{coin}/wallet/{id}/address/{addressOrId}

Request samples

Copy
wallet.getAddress({address: '2NCzBK2Yf7PFAAfKsgc6cfTSG8FxtgMGG9C'})
.then(function(address) {
  // print address
  console.dir(address);
});

Response samples

application/json
Copy
Expand all Collapse all
{
  • "id": "585951a5df8380e0e3063e9f12345678",
  • "address": "string",
  • "chain": 1,
  • "index": 0,
  • "coin": "string",
  • "lastNonce": -1,
  • "wallet": "585951a5df8380e0e3063e9f12345678",
  • "coinSpecific":
    {
    },
  • "label": "string",
  • "addressType": "p2sh",
  • "balance":
    {
    }
}

Update address

Update a receive address on a wallet

path Parameters
addressOrId
required
string or string

Address or Id which will be used for information lookup

coin
required
string
Example: "btc"
id
required
string^[0-9a-f]{32}$
Example: "585951a5df8380e0e3063e9f12345678"
Request Body schema: application/json
label
string <= 250 characters

A human-readable label which should be applied to the new address

Responses

200
400
put /api/v2/{coin}/wallet/{id}/address/{addressOrId}

Production environment

https://www.bitgo.com/api/v2/{coin}/wallet/{id}/address/{addressOrId}

Test environment

https://test.bitgo.com/api/v2/{coin}/wallet/{id}/address/{addressOrId}

Request samples

application/json
Copy
Expand all Collapse all
{
  • "label": "Bob's Hot Wallet Address"
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "id": "585951a5df8380e0e3063e9f12345678",
  • "address": "string",
  • "chain": 1,
  • "index": 0,
  • "coin": "string",
  • "lastNonce": -1,
  • "wallet": "585951a5df8380e0e3063e9f12345678",
  • "coinSpecific":
    {
    },
  • "label": "string",
  • "addressType": "p2sh",
  • "balance":
    {
    }
}

Enterprise

Get enterprise

path Parameters
id
required
string^[0-9a-f]{32}$
Example: "585951a5df8380e0e3063e9f12345678"

Responses

200
400

InvalidEnterpriseId

404

EnterpriseNotFound

get /api/v2/enterprise/{id}

Production environment

https://www.bitgo.com/api/v2/enterprise/{id}

Test environment

https://test.bitgo.com/api/v2/enterprise/{id}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "id": "585951a5df8380e0e3063e9f12345678",
  • "name": "Small Company",
  • "primaryContact": "585951a5df8380e0e3063e9f12345678",
  • "emergencyPhone": 11234567890,
  • "approvalsRequired": 1,
  • "mutablePolicyWindow": 172800,
  • "freeze":
    {
    },
  • "bitgoEthKey": "string",
  • "ethFeeAddress": "string",
  • "admin":
    {
    },
  • "canCreateColdWallet": true,
  • "canCreateHotWallet": true,
  • "canCreateCustodialWallets": true,
  • "tags":
    [
    ],
  • "wallets":
    [
    ]
}

Update enterprise

path Parameters
id
required
string^[0-9a-f]{32}$
Example: "585951a5df8380e0e3063e9f12345678"
Request Body schema: application/json
approvalsRequired
integer >= 1

How many Enterprise Admins are required for action to fire

Responses

200
202

A Pending Approval for the Update has been created and is waiting for approval

400

InvalidEnterpriseId or another error message that explains how the provided input was incorrect.

404

EnterpriseNotFound

put /api/v2/enterprise/{id}

Production environment

https://www.bitgo.com/api/v2/enterprise/{id}

Test environment

https://test.bitgo.com/api/v2/enterprise/{id}

Request samples

application/json
Copy
Expand all Collapse all
{
  • "approvalsRequired": 1
}

Response samples

application/json
Copy
Expand all Collapse all
{ }

List enterprises

Responses

200
400

InvalidEnterpriseId

404

EnterpriseNotFound

get /api/v2/enterprise

Production environment

https://www.bitgo.com/api/v2/enterprise

Test environment

https://test.bitgo.com/api/v2/enterprise

Response samples

application/json
Copy
Expand all Collapse all
{
  • "enterprises":
    [
    ]
}

Create an enterprise

Request Body schema: application/json
name
required
string
emergencyPhone
string
url
string <uri>

The URL the enterprises web site

Responses

200
400

An error message explaining how the provided input was incorrect.

post /api/v2/enterprise

Production environment

https://www.bitgo.com/api/v2/enterprise

Test environment

https://test.bitgo.com/api/v2/enterprise

Request samples

application/json
Copy
Expand all Collapse all
{}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "id": "585951a5df8380e0e3063e9f12345678",
  • "name": "Small Company",
  • "primaryContact": "585951a5df8380e0e3063e9f12345678",
  • "emergencyPhone": 11234567890,
  • "approvalsRequired": 1,
  • "mutablePolicyWindow": 172800,
  • "freeze":
    {
    },
  • "bitgoEthKey": "string",
  • "ethFeeAddress": "string",
  • "admin":
    {
    },
  • "canCreateColdWallet": true,
  • "canCreateHotWallet": true,
  • "canCreateCustodialWallets": true,
  • "tags":
    [
    ]
}

List enterprise users

path Parameters
id
required
string^[0-9a-f]{32}$
Example: "585951a5df8380e0e3063e9f12345678"
query Parameters
allowInactiveAdmins
boolean

Whether inactive admins should be returned as well

Responses

200
400

InvalidEnterpriseId

404

EnterpriseNotFound

get /api/v2/enterprise/{id}/user

Production environment

https://www.bitgo.com/api/v2/enterprise/{id}/user

Test environment

https://test.bitgo.com/api/v2/enterprise/{id}/user

Response samples

application/json
Copy
Expand all Collapse all
{
  • "adminUsers":
    [
    ],
  • "nonAdminUsers":
    [
    ],
  • "walletUsers":
    [
    ],
  • "incomplete": true
}

Add user to enterprise

path Parameters
id
required
string^[0-9a-f]{32}$
Example: "585951a5df8380e0e3063e9f12345678"
Request Body schema: application/json
permission
string
Value:"admin"
username
string <email>

The Username of the User that should be added to the Enterprise

usernames
Array of string <email>

Responses

200
202

Pending Approval(s) for adding the User(s) ha(s|ve) been created and (is|are) waiting for approval

400

InvalidEnterpriseId or an error message explaining why the input is invalid.

404

EnterpriseNotFound

post /api/v2/enterprise/{id}/user

Production environment

https://www.bitgo.com/api/v2/enterprise/{id}/user

Test environment

https://test.bitgo.com/api/v2/enterprise/{id}/user

Request samples

application/json
Copy
Expand all Collapse all
{
  • "permission": "admin",
  • "username": "user@example.com",
  • "usernames":
    [
    ]
}

Response samples

application/json
Copy
Expand all Collapse all
{ }

Remove user from enterprise

path Parameters
id
required
string^[0-9a-f]{32}$
Example: "585951a5df8380e0e3063e9f12345678"
Request Body schema: application/json
username
required
string <email>

Responses

200
202

A Pending Approval for removing the User has been created and is waiting for approval

400

InvalidEnterpriseId or InvalidUserId or 'cannot remove oneself from Enterprise when only one admin'

404

UserNotFound

delete /api/v2/enterprise/{id}/user

Production environment

https://www.bitgo.com/api/v2/enterprise/{id}/user

Test environment

https://test.bitgo.com/api/v2/enterprise/{id}/user

Request samples

application/json
Copy
Expand all Collapse all
{
  • "username": "user@example.com"
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "pendingApprovals":
    [
    ]
}

Freeze the enterprise

path Parameters
id
required
string^[0-9a-f]{32}$
Example: "585951a5df8380e0e3063e9f12345678"
Request Body schema: application/json
duration
integer
Default: 3600

seconds to freeze the enterprise for

Responses

200
400

InvalidEnterpriseId or an error message explaining why the input is invalid.

401

The User needs to unlock with OTP first

post /api/v2/enterprise/{id}/freeze

Production environment

https://www.bitgo.com/api/v2/enterprise/{id}/freeze

Test environment

https://test.bitgo.com/api/v2/enterprise/{id}/freeze

Request samples

application/json
Copy
Expand all Collapse all
{
  • "duration": 3600
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "time": "2019-03-07T17:26:11Z",
  • "expires": "2019-03-07T17:26:11Z"
}

Get enterprise's wallet limits

path Parameters
id
required
string^[0-9a-f]{32}$
Example: "585951a5df8380e0e3063e9f12345678"
query Parameters
coin
Array of string
Example: ["btc"]

Filter by coin(s)

isCustodial
boolean
Value:true

Whether custodial limits should be returned

Responses

200
400

An error message explaining why the input is invalid.

404

EnterpriseNotFound

get /api/v2/enterprise/{id}/walletLimits

Production environment

https://www.bitgo.com/api/v2/enterprise/{id}/walletLimits

Test environment

https://test.bitgo.com/api/v2/enterprise/{id}/walletLimits

Response samples