Skip to main content
POST
/
wallets
/
mpc
/
vaults
import cobo_waas2
from cobo_waas2.models.create_mpc_vault_request import CreateMpcVaultRequest
from cobo_waas2.models.mpc_vault import MPCVault
from cobo_waas2.rest import ApiException
from pprint import pprint

# See configuration.py for a list of all supported configurations.
configuration = cobo_waas2.Configuration(
    # Replace `<YOUR_PRIVATE_KEY>` with your private key
    api_private_key="<YOUR_PRIVATE_KEY>",
    # Select the development environment. To use the production environment, change the URL to https://api.cobo.com/v2.
    host="https://api.dev.cobo.com/v2",
)
# Enter a context with an instance of the API client
with cobo_waas2.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = cobo_waas2.WalletsMPCWalletsApi(api_client)
    create_mpc_vault_request = cobo_waas2.CreateMpcVaultRequest(
        name="My vault", vault_type="Org-Controlled"
    )

    try:
        # Create vault
        api_response = api_instance.create_mpc_vault(
            create_mpc_vault_request=create_mpc_vault_request
        )
        print("The response of WalletsMPCWalletsApi->create_mpc_vault:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling WalletsMPCWalletsApi->create_mpc_vault: %s\n" % e)

{
  "vault_id": "YPdbyVaVGqXXjkUsohHw",
  "project_id": "0111039d-27fb-49ba-b172-6e0aa80e37ec",
  "name": "Vault name",
  "type": "Org-Controlled",
  "root_pubkeys": [
    {
      "root_pubkey": "xpub661MyMwAqRbcG4vPNi58VQJrXW8D9VzmauuRq2rTY3oUVnKGuLTxQxvvoEXgLvZ7N9GQXQkWVgKn1rzEUUEm4NdvrBKUqjpNJEnn2UL4rYq",
      "curve": "SECP256K1"
    }
  ],
  "created_timestamp": 1718619403933
}
import cobo_waas2
from cobo_waas2.models.create_mpc_vault_request import CreateMpcVaultRequest
from cobo_waas2.models.mpc_vault import MPCVault
from cobo_waas2.rest import ApiException
from pprint import pprint

# See configuration.py for a list of all supported configurations.
configuration = cobo_waas2.Configuration(
    # Replace `<YOUR_PRIVATE_KEY>` with your private key
    api_private_key="<YOUR_PRIVATE_KEY>",
    # Select the development environment. To use the production environment, change the URL to https://api.cobo.com/v2.
    host="https://api.dev.cobo.com/v2",
)
# Enter a context with an instance of the API client
with cobo_waas2.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = cobo_waas2.WalletsMPCWalletsApi(api_client)
    create_mpc_vault_request = cobo_waas2.CreateMpcVaultRequest(
        name="My vault", vault_type="Org-Controlled"
    )

    try:
        # Create vault
        api_response = api_instance.create_mpc_vault(
            create_mpc_vault_request=create_mpc_vault_request
        )
        print("The response of WalletsMPCWalletsApi->create_mpc_vault:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling WalletsMPCWalletsApi->create_mpc_vault: %s\n" % e)

Authorizations

BIZ-API-KEY
string
header
required

The API key. For more details, refer to API key.

In the API playground, enter your API secret, and your API key will be accordingly calculated.

Body

application/json

The request body to create a vault.

name
string
required

The vault name.

Example:

"My vault"

vault_type
enum<string>
required

The vault type. Possible values include:

Available options:
Org-Controlled,
User-Controlled
Example:

"Org-Controlled"

project_id
string

The project ID, which you can retrieve by calling List all projects.

Notes:

  1. If you set vault_type to OrgControlled, the value of project_id will be ignored.
  2. If you set vault_type to UserControlled, then project_id is required.
Example:

"0111039d-27fb-49ba-b172-6e0aa80e37ec"

Response

Successfully created the vault.

The data for vault information.

vault_id
string

The vault ID.

Example:

"YPdbyVaVGqXXjkUsohHw"

project_id
string

The project ID.

Example:

"0111039d-27fb-49ba-b172-6e0aa80e37ec"

name
string

The vault name.

Example:

"Vault name"

type
enum<string>

The vault type. Possible values include:

Available options:
Org-Controlled,
User-Controlled
Example:

"Org-Controlled"

root_pubkeys
object[]
created_timestamp
integer

The vault's creation time in Unix timestamp format, measured in milliseconds.

Example:

1718619403933