NAV Navigation
JavaScript Shell

Unbound CASP API for BYOW v1.0.2010

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

Unbound’s Crypto Asset Security Platform ("CASP") provides the advanced technology and the architecture to secure crypto asset transactions. The crypto asset solution contains the CASP service and different end points (humans or BOTs).

CASP provides the framework to create Accounts, which hold multiple Vaults where secrets are stored. Access control is managed by the Quorum Policy for all of the Participants.

For information about using these APIs, see the Unbound CASP Developers Guide, or the API references:

For more information about CASP, see:

For more information about the BIP standards, see:

Email: Unbound Tech Support Web: Unbound Tech Support

BYOW Vault Operations

Refer to the Vault Operations section in the Unbound CASP Developers Guide.

Create new vault

Code samples

const inputBody = '{
  "name": "string",
  "description": "string",
  "cryptoKind": "ECDSA",
  "curveName": "Ed25519",
  "providerKind": "string",
  "hierarchy": "NONE",
  "coinType": 0,
  "firstAccountName": "string",
  "groups": [
    {
      "name": "string",
      "requiredApprovals": 1,
      "members": [
        {
          "id": "string"
        }
      ],
      "isOffline": true
    }
  ],
  "policies": [
    {
      "name": "string",
      "description": "string",
      "enabled": true,
      "isOffline": true,
      "timeZone": "string",
      "groups": [
        {
          "name": "string",
          "requiredApprovals": 1,
          "members": [
            {
              "id": "string"
            }
          ],
          "isOffline": true
        }
      ],
      "rules": {
        "weeklyTimeSlots": [
          {
            "days": "string",
            "timeStart": "string",
            "timeEnd": "string"
          }
        ],
        "amountRange": {
          "property1": {
            "minimum": 0,
            "maximum": 0
          },
          "property2": {
            "minimum": 0,
            "maximum": 0
          }
        },
        "whiteList": [
          "string"
        ],
        "derivedWhitelist": [
          {
            "chainCode": "string",
            "publicKey": "string",
            "level": 0,
            "parentFingerprint": "string",
            "childNumber": 0
          }
        ],
        "attributes": [
          {
            "id": "string",
            "op": "string",
            "value": "string"
          }
        ]
      },
      "policyKind": "APPROVAL"
    }
  ],
  "isOffline": true,
  "attributes": {
    "property1": "string",
    "property2": "string"
  },
  "dataCollectorsGroups": [
    {
      "name": "string",
      "attributeTemplateGroup": "string",
      "ids": [
        "string"
      ],
      "minimumRequired": 1
    }
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'API_KEY'

};

fetch('/casp/api/v1.0/mng/accounts/{accountId}/vaults',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X POST /casp/api/v1.0/mng/accounts/{accountId}/vaults \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer API_KEY'

POST /casp/api/v1.0/mng/accounts/{accountId}/vaults

This request starts the process of creating a new vault. The vault is created only after the participants approve the vault creation according to the vault policy.

Note the following requirements depending on the value of cryptoKind:

Body parameter

{
  "name": "string",
  "description": "string",
  "cryptoKind": "ECDSA",
  "curveName": "Ed25519",
  "providerKind": "string",
  "hierarchy": "NONE",
  "coinType": 0,
  "firstAccountName": "string",
  "groups": [
    {
      "name": "string",
      "requiredApprovals": 1,
      "members": [
        {
          "id": "string"
        }
      ],
      "isOffline": true
    }
  ],
  "policies": [
    {
      "name": "string",
      "description": "string",
      "enabled": true,
      "isOffline": true,
      "timeZone": "string",
      "groups": [
        {
          "name": "string",
          "requiredApprovals": 1,
          "members": [
            {
              "id": "string"
            }
          ],
          "isOffline": true
        }
      ],
      "rules": {
        "weeklyTimeSlots": [
          {
            "days": "string",
            "timeStart": "string",
            "timeEnd": "string"
          }
        ],
        "amountRange": {
          "property1": {
            "minimum": 0,
            "maximum": 0
          },
          "property2": {
            "minimum": 0,
            "maximum": 0
          }
        },
        "whiteList": [
          "string"
        ],
        "derivedWhitelist": [
          {
            "chainCode": "string",
            "publicKey": "string",
            "level": 0,
            "parentFingerprint": "string",
            "childNumber": 0
          }
        ],
        "attributes": [
          {
            "id": "string",
            "op": "string",
            "value": "string"
          }
        ]
      },
      "policyKind": "APPROVAL"
    }
  ],
  "isOffline": true,
  "attributes": {
    "property1": "string",
    "property2": "string"
  },
  "dataCollectorsGroups": [
    {
      "name": "string",
      "attributeTemplateGroup": "string",
      "ids": [
        "string"
      ],
      "minimumRequired": 1
    }
  ]
}

Parameters

Name In Type Required Description
accountId path string true Account ID
body body object true Create Vault Request
» name body string true Vault name
» description body string false vault description
» cryptoKind body string true Type of cryptographic algorithm
» curveName body string false The name of the curve
» providerKind body string false Type of crypto currency
» hierarchy body string false Vault hierarchy. defaults to deterministic
» coinType body integer(int32) false BIP44 coin type. see examples of known coin types in https://github.com/satoshilabs/slips/blob/master/slip-0044.md
» firstAccountName body string false The name of the first account
» groups body [object] true Vault approval groups
»» name body string true Vault group name
»» requiredApprovals body integer(int32) true Vault group required approvals
»» members body [object] true Vault group participants
»»» id body string true Participant ID
»» isOffline body boolean true Vault group isOffline property
» policies body [object] false policies set
»» name body string true policy name
»» description body string false Policy description
»» enabled body boolean false is the policy enabled, default is TRUE
»» isOffline body boolean false Is policy offline, for offline vaults default is true, for online vaults default is false
»» timeZone body string false Policy time zone, default is UTC
»» groups body [object] false none
»»» name body string true Vault group name
»»» requiredApprovals body integer(int32) true Vault group required approvals
»»» members body [object] true Vault group participants
»»»» id body string true Participant ID
»»» isOffline body boolean true Vault group isOffline property
»» rules body object false Policy rules
»»» weeklyTimeSlots body [object] false none
»»»» days body string true Days of the week in comma separated list. e.g. 0,1,3 for Sunday, Monday and Wednesday
»»»» timeStart body string true UTC time of day in the following format: HH:MM
»»»» timeEnd body string true UTC time of day in the following format: HH:MM
»»» amountRange body object false none
»»»» additionalProperties body object false none
»»»»» minimum body integer false lower limit
»»»»» maximum body integer false upper limit
»»» whiteList body [string] false none
»»» derivedWhitelist body [object] false none
»»»» chainCode body string false none
»»»» publicKey body string false none
»»»» level body integer(int32) false none
»»»» parentFingerprint body string false none
»»»» childNumber body integer(int32) false none
»»» attributes body [object] false none
»»»» id body string true attribute rule ID
»»»» op body string true attribute rule operator
»»»» value body string true attribute rule value
»» policyKind body string true Policy policyKind
» isOffline body boolean false Offline/Online type of the vault
» attributes body object false Vault attributes
»» additionalProperties body string false none
» dataCollectorsGroups body [object] false Vault data collector groups
»» name body string true Data Collectors group name
»» attributeTemplateGroup body string true Data collectors group`s attribute template group name
»» ids body [string] true Data Collectors IDs
»» minimumRequired body integer(int32) true Data Collectors required for Sign request proceeding

Enumerated Values

Parameter Value
» cryptoKind ECDSA
» cryptoKind EDDSA
» cryptoKind TOTS
» curveName Ed25519
» curveName secp256r1
» curveName secp256k1
» hierarchy NONE
» hierarchy BIP32
» hierarchy BIP44
»» policyKind APPROVAL
»» policyKind REJECTION

Example responses

201 Response

{
  "id": "string",
  "name": "string",
  "description": "string",
  "accountID": "string"
}

Responses

Status Meaning Description Schema
201 Created New vault created successfully Inline
400 Bad Request Bad Request Inline
404 Not Found Missing data Inline
409 Conflict Vault name already exists Inline
500 Internal Server Error Create vault failed Inline

Response Schema

Status Code 201

Name Type Required Restrictions Description
» id string true none Vault ID
» name string true none Vault name
» description string true none Vault description
» accountID string true none Vault account ID

Status Code 400

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 404

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 409

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 500

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

List BYOW vaults

Code samples


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'

};

fetch('/casp/api/v1.0/mng/accounts/{accountId}/vaults',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X GET /casp/api/v1.0/mng/accounts/{accountId}/vaults \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer API_KEY'

GET /casp/api/v1.0/mng/accounts/{accountId}/vaults

List all vaults in the account. By default only active vaults are listed.

Note: If the parameters skip and limit are not specified or both are set to 0, then the response data contains a JSON list of the items. If those parameters are set (>0), then the response data is the JSON object shown here.

Parameters

Name In Type Required Description
accountId path string true Account ID
status query array[string] false Show vaults with one or more of the following statuses: pending, ready, deactivated
providerKind query string false Filter by coin type
filter query string false Search the vault names and descriptions
sort query string false Specify the column name to sort by and the sort direction. The format is '{column_name}:{asc/desc}'. The default sort is ascending.

The column name can be one of the following: Name, Provider, Description, Status, Offline
skip query integer(int32) false The number of results to skip from the beginning of the results after applying the filter and sort
limit query integer(int32) false Maximum number of results to return

Enumerated Values

Parameter Value
status PENDING
status READY
status DEACTIVATED

Example responses

200 Response

{
  "totalItems": 0,
  "items": [
    {
      "id": "string",
      "name": "string",
      "description": "string",
      "cryptoKind": "ECDSA",
      "providerKind": "string",
      "isActive": true,
      "status": "NOT_INITIALIZED",
      "statusText": "`Waiting for participants to join`",
      "providerData": "string",
      "pendingOperations": 0,
      "hierarchy": "NONE",
      "isDeletable": true,
      "approvalStructure": "QUORUM",
      "creationTime": "string",
      "modificationTime": "string",
      "offline": true
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK OK Inline
400 Bad Request Bad Request Inline
404 Not Found Account not found Inline
500 Internal Server Error List vaults per account failed Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» totalItems integer(int32) true none Total Items
» items [object] true none Items
»» id string true none Vault ID
»» name string true none Vault name
»» description string false none Vault description
»» cryptoKind string false none Type of cryptographic algorithm
»» providerKind string false none Coin type that created the vault
»» isActive boolean true none Vault active state
»» status string true none Vault status
»» statusText string true none Vault status text
»» providerData string true none This is a field that can be used to store information in the CASP database. The information can subsequently be read back as needed.
»» pendingOperations integer(int64) true none Vault pending requests
»» hierarchy string false none Vault status text
»» isDeletable boolean true none Is Vault able to be deleted
»» approvalStructure string true none Is Vault approval structure
»» creationTime string true none Vault creation time
»» modificationTime string true none Vault last modification time
»» offline boolean true none Is Vault is offline

Enumerated Values

Property Value
cryptoKind ECDSA
cryptoKind EDDSA
status NOT_INITIALIZED
status INITIALIZED
status DEACTIVATED
statusText Waiting for participants to join
statusText Ready
statusText Deactivated
hierarchy NONE
hierarchy BIP32
hierarchy BIP44
approvalStructure QUORUM
approvalStructure POLICY
approvalStructure STAKING_POLICIES

Status Code 400

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 404

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 500

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Get BYOW vault info

Code samples


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'

};

fetch('/casp/api/v1.0/mng/vaults/{id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X GET /casp/api/v1.0/mng/vaults/{id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer API_KEY'

GET /casp/api/v1.0/mng/vaults/{id}

Get details of a vault

Parameters

Name In Type Required Description
id path string true Vault ID

Example responses

200 Response

{
  "description": "string",
  "groups": [
    {
      "name": "string",
      "members": [
        {
          "approvedAt": "string",
          "id": "string",
          "isApproved": true,
          "name": "string",
          "status": "STARTED",
          "approvalGroupAccount": {
            "id": "string",
            "name": "string"
          },
          "label": "string",
          "isGlobal": true,
          "isActive": true,
          "globalStatus": "ACTIVATED",
          "isOffline": true
        }
      ],
      "requiredApprovals": 0,
      "order": 0,
      "deactivateAllowed": true,
      "isOffline": true,
      "sparePartiesLeft": 0
    }
  ],
  "id": "string",
  "name": "string",
  "accountID": "string",
  "status": "NOT_INITIALIZED",
  "statusText": "`Waiting for participants to join`",
  "isActive": true,
  "cryptoKind": "ECDSA",
  "curveName": "string",
  "providerKind": "string",
  "providerData": "string",
  "hierarchy": "string",
  "policies": [
    {
      "name": "string",
      "id": "string",
      "description": "string",
      "enabled": true,
      "timeZone": "string",
      "groups": [
        {
          "name": "string",
          "members": [
            {
              "approvedAt": "string",
              "id": "string",
              "isApproved": true,
              "name": "string",
              "status": "STARTED",
              "approvalGroupAccount": {
                "id": "string",
                "name": "string"
              },
              "label": "string",
              "isGlobal": true,
              "isActive": true,
              "globalStatus": "ACTIVATED",
              "isOffline": true
            }
          ],
          "requiredApprovals": 0,
          "order": 0,
          "deactivateAllowed": true,
          "isOffline": true
        }
      ],
      "rules": {
        "weeklyTimeSlots": [
          {
            "days": "string",
            "timeStart": "string",
            "timeEnd": "string"
          }
        ],
        "amountRange": {
          "property1": {
            "minimum": 0,
            "maximum": 0
          },
          "property2": {
            "minimum": 0,
            "maximum": 0
          }
        },
        "whiteList": [
          "string"
        ],
        "derivedWhitelist": [
          {
            "chainCode": "string",
            "publicKey": "string",
            "level": 0,
            "parentFingerprint": "string",
            "childNumber": 0
          }
        ],
        "attributes": [
          {
            "id": "string",
            "op": "string",
            "value": "string"
          }
        ]
      },
      "isOffline": true,
      "policyKind": "APPROVAL"
    }
  ],
  "isOffline": true,
  "approvalStructure": "QUORUM",
  "attributes": {
    "property1": "string",
    "property2": "string"
  },
  "dataCollectorsGroups": [
    {
      "name": "string",
      "attributeTemplateGroup": "string",
      "ids": [
        "string"
      ],
      "minimumRequired": 1
    }
  ],
  "creationTime": "string",
  "modificationTime": "string"
}

Responses

Status Meaning Description Schema
200 OK OK Inline
404 Not Found Vault not found Inline
500 Internal Server Error Get vault details failed Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» description string false none Vault description
» groups [object] true none Vault approval groups
»» name string true none Approval group name
»» members [object] true none A list of participants in the group
»»» approvedAt string false none ParticipantWithVault approval time
»»» id string true none ParticipantWithVault ID
»»» isApproved boolean true none ParticipantWithVault approval state
»»» name string true none ParticipantWithVault name
»»» status string true none ParticipantWithVault task status
»»» approvalGroupAccount object false none none
»»»» id string true none Account ID
»»»» name string true none Account name
»»» label string true none ParticipantWithVault label
»»» isGlobal boolean true none ParticipantWithVault global state
»»» isActive boolean true none none
»»» globalStatus string true none none
»»» isOffline boolean true none none
»» requiredApprovals integer(int32) true none The number of group participants that need to give approval
»» order integer(int32) true none This field determines the order in which groups are prompted for approvals
»» deactivateAllowed boolean true none A group participant can be suspended or revoked from this group
»» isOffline boolean true none Group is offline - conclude only offline participants
»» sparePartiesLeft integer(int32) true none Count Spare Parties left By Group Name
» id string true none Vault ID
» name string true none Vault name
» accountID string true none Vault account ID
» status string true none Vault textual status
» statusText string true none Vault textual status
» isActive boolean true none Vault active state
» cryptoKind string false none Type of cryptographic algorithm
» curveName string true none Vault's curve
» providerKind string false none Coin type that created the vault
» providerData string false none This is a field that can be used to store information in the CASP database. The information can subsequently be read back as needed.
» hierarchy string true none Vault hierarchy
» policies [object] false none Vault policies
»» name string true none policy name
»» id string true none policy id
»» description string false none Policy description
»» enabled boolean false none is the policy enabled, default is TRUE
»» timeZone string false none Policy time zone
»» groups [object] true none Approval groups
»»» name string true none Approval group name
»»» members [object] true none A list of participants in the group
»»»» approvedAt string false none ParticipantWithVault approval time
»»»» id string true none ParticipantWithVault ID
»»»» isApproved boolean true none ParticipantWithVault approval state
»»»» name string true none ParticipantWithVault name
»»»» status string true none ParticipantWithVault task status
»»»» approvalGroupAccount object false none none
»»»»» id string true none Account ID
»»»»» name string true none Account name
»»»» label string true none ParticipantWithVault label
»»»» isGlobal boolean true none ParticipantWithVault global state
»»»» isActive boolean true none none
»»»» globalStatus string true none none
»»»» isOffline boolean true none none
»»» requiredApprovals integer(int32) true none The number of group participants that need to give approval
»»» order integer(int32) true none This field determines the order in which groups are prompted for approvals
»»» deactivateAllowed boolean true none A group participant can be suspended or revoked from this group
»»» isOffline boolean true none Group is offline - conclude only offline participants
»» rules object false none Policy rules
»»» weeklyTimeSlots [object] false none none
»»»» days string true none Days of the week in comma separated list. e.g. 0,1,3 for Sunday, Monday and Wednesday
»»»» timeStart string true none UTC time of day in the following format: HH:MM
»»»» timeEnd string true none UTC time of day in the following format: HH:MM
»»» amountRange object false none none
»»»» additionalProperties object false none none
»»»»» minimum integer false none lower limit
»»»»» maximum integer false none upper limit
»»» whiteList [string] false none none
»»» derivedWhitelist [object] false none none
»»»» chainCode string false none none
»»»» publicKey string false none none
»»»» level integer(int32) false none none
»»»» parentFingerprint string false none none
»»»» childNumber integer(int32) false none none
»»» attributes [object] false none none
»»»» id string true none attribute rule ID
»»»» op string true none attribute rule operator
»»»» value string true none attribute rule value
»» isOffline boolean false none is policy offline, default is TRUE
»» policyKind string false none Policy kind, can be APPROVAL or REJECTION
» isOffline boolean false none is offline/online vault property
» approvalStructure string true none Is Vault approval structure
» attributes object false none Vault's attributes
»» additionalProperties string false none none
» dataCollectorsGroups [object] true none Vault data collectors groups
»» name string true none Data Collectors group name
»» attributeTemplateGroup string true none Data collectors group`s attribute template group name
»» ids [string] true none Data Collectors IDs
»» minimumRequired integer(int32) true none Data Collectors required for Sign request proceeding
» creationTime string true none Vault creation time
» modificationTime string true none Vault last modification time

Enumerated Values

Property Value
status STARTED
status ACTIVATED
status DECLINED
status REVOKED
status SUSPENDED
globalStatus ACTIVATED
globalStatus REACTIVATING
globalStatus SUSPENDED
globalStatus REVOKED
status NOT_INITIALIZED
status INITIALIZED
status DEACTIVATED
statusText Waiting for participants to join
statusText Ready
statusText Deactivated
statusText N/A
cryptoKind ECDSA
cryptoKind EDDSA
status STARTED
status ACTIVATED
status DECLINED
status REVOKED
status SUSPENDED
globalStatus ACTIVATED
globalStatus REACTIVATING
globalStatus SUSPENDED
globalStatus REVOKED
policyKind APPROVAL
policyKind REJECTION
approvalStructure QUORUM
approvalStructure POLICY
approvalStructure STAKING_POLICIES

Status Code 404

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 500

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Create a new address

Code samples


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'

};

fetch('/casp/api/v1.0/mng/vaults/{vaultId}/coins/{coinType}/accounts/{accountIndex}/chains/{chain}/addresses',
{
  method: 'POST',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X POST /casp/api/v1.0/mng/vaults/{vaultId}/coins/{coinType}/accounts/{accountIndex}/chains/{chain}/addresses \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer API_KEY'

POST /casp/api/v1.0/mng/vaults/{vaultId}/coins/{coinType}/accounts/{accountIndex}/chains/{chain}/addresses

Parameters

Name In Type Required Description
vaultId path string true Vault ID
coinType path integer(int32) true Coin type
accountIndex path integer(int32) true Account index
chain path string true Add vault group member request
encoding query string false Key encoding

Enumerated Values

Parameter Value
chain change
chain external
encoding DER
encoding compressed
encoding uncompressed
encoding plain

Example responses

200 Response

{
  "publicKey": "string",
  "derivationString": "string"
}

Responses

Status Meaning Description Schema
200 OK OK Inline
400 Bad Request Bad request Inline
404 Not Found Item not found Inline
405 Method Not Allowed Incorrect vault type Inline
500 Internal Server Error Add participant failed Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» publicKey string true none The public key of the new address
» derivationString string true none The derivation string of the new address

Status Code 400

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 404

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 405

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 500

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Start a signing process

Code samples

const inputBody = '{
  "keySpecs": {
    "totsParams": [
      {
        "index": 0,
        "numberOfFragments": 1
      }
    ]
  },
  "dataToSign": [
    "string"
  ],
  "publicKeys": [
    "string"
  ],
  "derivationStrings": [
    "string"
  ],
  "description": "string",
  "providerData": "string",
  "details": "string",
  "callbackUrl": "string",
  "allowConcurrentKeyUsage": true,
  "rawTransactions": [
    "string"
  ],
  "ledgerHashAlgorithm": "IGNORE",
  "changeAddressDerivationString": "string",
  "decimals": [
    0
  ],
  "ledger": "string",
  "derivedWhitelistChildNumbers": [
    0
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'API_KEY'

};

fetch('/casp/api/v1.0/mng/vaults/{id}/sign',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X POST /casp/api/v1.0/mng/vaults/{id}/sign \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer API_KEY'

POST /casp/api/v1.0/mng/vaults/{id}/sign

Starts the process of a signing operation.

You can check the task status by calling the /operations API. When the signature is ready it is provided in the response payload.

This service should be used when the blockchain management is done outside of CASP, as it only signs the transaction without sending it to the relevant blockchain.

SegWit transactions use the same Start a signing process endpoint with the following changes:

  1. Send the rawTransactions field with this format: "inputIndex|inputScript|inputAmount|rawTransaction"
  2. Set ledgerHashAlgorithm to BTC_SEGWIT. Note: You cannot mix SegWit and non-SegWit transactions in the same signing request.

Notes:

Body parameter

{
  "keySpecs": {
    "totsParams": [
      {
        "index": 0,
        "numberOfFragments": 1
      }
    ]
  },
  "dataToSign": [
    "string"
  ],
  "publicKeys": [
    "string"
  ],
  "derivationStrings": [
    "string"
  ],
  "description": "string",
  "providerData": "string",
  "details": "string",
  "callbackUrl": "string",
  "allowConcurrentKeyUsage": true,
  "rawTransactions": [
    "string"
  ],
  "ledgerHashAlgorithm": "IGNORE",
  "changeAddressDerivationString": "string",
  "decimals": [
    0
  ],
  "ledger": "string",
  "derivedWhitelistChildNumbers": [
    0
  ]
}

Parameters

Name In Type Required Description
id path string true Vault ID
body body object true Sign Request
» keySpecs body object false Key specs
»» totsParams body [object] false none
»»» index body integer(int32) true Index
»»» numberOfFragments body integer(int32) true Number of fragments
» dataToSign body [string] true Data to be signed (as list of HEX strings).
» publicKeys body [string] false Public keys. Either publicKeys or derivationStrings must be provided.
» derivationStrings body [string] false The derivation paths to sign. Either publicKeys or derivationStrings must be provided.
» description body string true Description of the sign request
» providerData body string false This is a field that can be used to store information in the CASP database. The information can subsequently be read back as needed.
» details body string false This is a field that can be used to store operation information as a JSON string in the CASP database. The information can subsequently be sent to the end point for display.
» callbackUrl body string false URL to get back to task initiator
» allowConcurrentKeyUsage body boolean false Allow concurrent key usage. The default is false
» rawTransactions body [string] false An array of raw transactions ledger in the specific ledger format (as list of HEX strings).
» ledgerHashAlgorithm body string false Algorithm used to calculate data to sign
» changeAddressDerivationString body string false the derivation string of the change address
» decimals body [integer] false Decimals of cryptocurrency units
» ledger body string false The ledger on which the transaction takes place
» derivedWhitelistChildNumbers body [integer] false A list of child numbers for a derived whitelist

Enumerated Values

Parameter Value
»»» numberOfFragments 1
»»» numberOfFragments 2
»»» numberOfFragments 3
» ledgerHashAlgorithm IGNORE
» ledgerHashAlgorithm PLAIN
» ledgerHashAlgorithm SHA256
» ledgerHashAlgorithm DOUBLE_SHA256
» ledgerHashAlgorithm SHA3_256

Example responses

200 Response

{
  "operationID": "string"
}

Responses

Status Meaning Description Schema
200 OK Sign request accepted Inline
400 Bad Request Bad request Inline
403 Forbidden Not allowed Inline
406 Not Acceptable Not supported Inline
500 Internal Server Error Sign failed Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» operationID string true none Operation ID

Status Code 400

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code
» rejectionCauseResponse object true none rejection cause details
»» text string false none none
»» reason string false none none
»» decliningParticipant object false none none
»»» participantId string true none Sign operation declining participant ID
»»» participantName string false none none
»» rejectedPolicy object false none none
»»» policyName string true none Sign operation rejection policy name
»»» policyId string false none none

Status Code 403

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 406

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 500

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Get sign operation

Code samples


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'

};

fetch('/casp/api/v1.0/mng/operations/sign/{operationid}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X GET /casp/api/v1.0/mng/operations/sign/{operationid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer API_KEY'

GET /casp/api/v1.0/mng/operations/sign/{operationid}

Returns the sign operation metadata. The Operation ID parameter must be from a 'QUORUM_SIGN' operation.

Parameters

Name In Type Required Description
operationid path string true Operation ID

Example responses

200 Response

{
  "operationID": "string",
  "status": "PENDING",
  "statusText": "`Pending`",
  "createdAt": "string",
  "vaultID": "string",
  "description": "string",
  "isApproved": true,
  "accountID": "string",
  "groups": [
    {
      "name": "string",
      "members": [
        {
          "approvedAt": "string",
          "id": "string",
          "isApproved": true,
          "name": "string",
          "status": "STARTED",
          "approvalGroupAccount": {
            "id": "string",
            "name": "string"
          },
          "label": "string",
          "isGlobal": true,
          "isActive": true,
          "globalStatus": "ACTIVATED",
          "isOffline": true
        }
      ],
      "requiredApprovals": 0,
      "order": 0,
      "deactivateAllowed": true,
      "isOffline": true
    }
  ],
  "policyDetails": {
    "id": "string",
    "name": "string"
  },
  "vaultName": "string",
  "publicKeys": [
    "string"
  ],
  "dataToSign": [
    "string"
  ],
  "signatures": [
    "string"
  ],
  "v": [
    0
  ],
  "providerData": "string",
  "details": "string",
  "rawTransactions": [
    "string"
  ],
  "ledgerHashAlgorithm": "IGNORE",
  "callbackUrl": "string",
  "subAccount": 0,
  "keySpecs": {
    "indexNofPairs": [
      {
        "index": 0,
        "numberOfFragments": 0
      }
    ]
  },
  "rejectionCause": {
    "text": "string",
    "reason": "string",
    "decliningParticipant": {
      "participantId": "string",
      "participantName": "string"
    },
    "rejectedPolicy": {
      "policyName": "string",
      "policyId": "string"
    }
  },
  "collectedData": {
    "collectionComplete": true,
    "dataCollectionGroups": [
      {
        "minimumRequired": 0,
        "collectedData": [
          {
            "dataCollectorDetails": {
              "id": "string",
              "name": "string",
              "state": "string",
              "description": "string",
              "activationCode": "string",
              "attributeTemplateGroup": {
                "id": "string",
                "attributeTemplates": [
                  "string"
                ]
              },
              "creationTime": "string",
              "modificationTime": "string",
              "authenticationKey": "string"
            },
            "data": {
              "property1": "string",
              "property2": "string"
            },
            "collectionDone": true,
            "signedUniqueData": "string",
            "collectionStart": 0,
            "collectionEnd": 0
          }
        ]
      }
    ]
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
404 Not Found Operation not found Inline
500 Internal Server Error Get Operation status failed Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» operationID string true none Operation ID
» status string true none Operation status
» statusText string true none Operation status text
» createdAt string true none Operation creation time
» vaultID string true none Vault ID
» description string false none Description of the operation
» isApproved boolean true none Approval state for the operation
» accountID string true none Account ID for the operation
» groups [object] true none Operation approval groups
»» name string true none Approval group name
»» members [object] true none A list of participants in the group
»»» approvedAt string false none ParticipantWithVault approval time
»»» id string true none ParticipantWithVault ID
»»» isApproved boolean true none ParticipantWithVault approval state
»»» name string true none ParticipantWithVault name
»»» status string true none ParticipantWithVault task status
»»» approvalGroupAccount object false none none
»»»» id string true none Account ID
»»»» name string true none Account name
»»» label string true none ParticipantWithVault label
»»» isGlobal boolean true none ParticipantWithVault global state
»»» isActive boolean true none none
»»» globalStatus string true none none
»»» isOffline boolean true none none
»» requiredApprovals integer(int32) true none The number of group participants that need to give approval
»» order integer(int32) true none This field determines the order in which groups are prompted for approvals
»» deactivateAllowed boolean true none A group participant can be suspended or revoked from this group
»» isOffline boolean true none Group is offline - conclude only offline participants
» policyDetails object false none Operation approval groups
»» id string true none Policy id
»» name string true none Policy name
» vaultName string true none Item name for the operation
» publicKeys [string] true none The public keys corresponding to the private keys that will sign the data
» dataToSign [string] true none List data to sign
» signatures [string] false none Signatures. Each signature is 64 bytes, with 32 bytes R and 32 bytes S (in big-endian order).
» v [integer] false none This parameter returns raw values 0 or 1, which can be used to recover the public key from the generated signature.
» providerData string false none This is a field that can be used to store information in the CASP database. The information can subsequently be read back as needed.
» details string false none This is a field that can be used to store operation information as a JSON string in the CASP database. The information can subsequently be sent to the end point for display.
» rawTransactions [string] false none An array of raw transaction strings that are sent to ledger.
The strings must all have the same format, where the format of the strings depends on the ledger's hash algorithm:
- For SHA3_256, it is a hex encoded string.
- For DOUBLE_SHA256, it is a hex encoded string.
- For SHA256, it is a hex encoded string.
- For PLAIN, it is a base64 string.
- For IGNORE do not compare.
» ledgerHashAlgorithm string false none Algorithm used to create data to sign
» callbackUrl string false none URL to get back to task initiator
» subAccount integer(int32) false none the sub account index
» keySpecs object false none Key specs
»» indexNofPairs [object] false none none
»»» index integer(int32) true none Index
»»» numberOfFragments integer(int32) true none Number of fragments
» rejectionCause object false none Rejection cause details
»» text string false none none
»» reason string false none none
»» decliningParticipant object false none none
»»» participantId string true none Sign operation declining participant ID
»»» participantName string false none none
»» rejectedPolicy object false none none
»»» policyName string true none Sign operation rejection policy name
»»» policyId string false none none
» collectedData object false none Collected data
»» collectionComplete boolean false none none
»» dataCollectionGroups [object] false none none
»»» minimumRequired integer(int32) false none none
»»» collectedData [object] false none none
»»»» dataCollectorDetails object false none none
»»»»» id string false none none
»»»»» name string false none none
»»»»» state string false none none
»»»»» description string false none none
»»»»» activationCode string false none none
»»»»» attributeTemplateGroup object false none none
»»»»»» id string false none none
»»»»»» attributeTemplates [string] false none none
»»»»» creationTime string false none none
»»»»» modificationTime string false none none
»»»»» authenticationKey string false none none
»»»» data object false none none
»»»»» additionalProperties string false none none
»»»» collectionDone boolean false none none
»»»» signedUniqueData string false none none
»»»» collectionStart integer(int64) false none none
»»»» collectionEnd integer(int64) false none none

Enumerated Values

Property Value
status PENDING
status WAITING_DATA_COLLECTION
status PENDING_ACTIVATION
status APPROVED
status COMPLETED
status REJECTED
status CANCELED
status FAILED
status ERROR
statusText Pending
statusText Pending activation
statusText Approved
statusText Completed
statusText Rejected
statusText Canceled
statusText Failed
statusText N/A
status STARTED
status ACTIVATED
status DECLINED
status REVOKED
status SUSPENDED
globalStatus ACTIVATED
globalStatus REACTIVATING
globalStatus SUSPENDED
globalStatus REVOKED
ledgerHashAlgorithm IGNORE
ledgerHashAlgorithm PLAIN
ledgerHashAlgorithm SHA256
ledgerHashAlgorithm DOUBLE_SHA256
ledgerHashAlgorithm SHA3_256

Status Code 404

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 500

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

List operations

Code samples


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'

};

fetch('/casp/api/v1.0/mng/accounts/{accountId}/operations',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X GET /casp/api/v1.0/mng/accounts/{accountId}/operations \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer API_KEY'

GET /casp/api/v1.0/mng/accounts/{accountId}/operations

List operations associated with account vaults. By default, only operations which are in process (not completed) will be returned.

Note: If the parameters skip and limit are not specified or both are set to 0, then the response data contains a JSON list of the items. If those parameters are set (>0), then the response data is the JSON object shown here.

Parameters

Name In Type Required Description
accountId path string true Account ID
status query array[string] false Show operations with one or more of the following statuses: approved, completed, pending, pending activation, canceled, rejected, failed, error
filter query string false Filter by vault names and operation description
sort query string false Specify the column name to sort by and the sort direction. The format is '{column_name}:{asc/desc}'. The default sort is ascending.

The column name can be one of the following: Vault, Kind, CreatedAt, StatusText, Description
skip query integer(int32) false The number of results to skip from the beginning of the results after applying the filter and sort
limit query integer(int32) false The maximum number of results to return

Enumerated Values

Parameter Value
status APPROVED
status COMPLETED
status FAILED
status PENDING
status CANCELED
status REJECTED
status PENDING_ACTIVATION
status WAITING_DATA_COLLECTION

Example responses

200 Response

{
  "totalItems": 0,
  "items": [
    {
      "operationID": "string",
      "kind": "JOIN_VAULT",
      "status": "PENDING",
      "statusText": "`Pending`",
      "createdAt": "string",
      "vaultID": "string",
      "description": "string",
      "isApproved": true,
      "accountID": "string",
      "vaultName": "string",
      "providerKind": "string"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK OK Inline
400 Bad Request Bad Request Inline
404 Not Found Not found Inline
500 Internal Server Error List operations per account failed Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» totalItems integer(int32) true none Total Items
» items [object] true none Items
»» operationID string true none Operation ID
»» kind string true none Operation kind
»» status string true none Operation status
»» statusText string true none Operation status text
»» createdAt string true none Operation creation time
»» vaultID string true none Vault ID
»» description string false none Description of the operation
»» isApproved boolean true none Approval state for the operation
»» accountID string true none Account ID for the operation
»» vaultName string true none Vault Name
»» providerKind string false none Provider Kind

Enumerated Values

Property Value
kind JOIN_VAULT
kind REJOIN_VAULT
kind JOIN_VAULT_ADMIN_QUORUM
kind JOIN_POLICY_VAULT
kind ADD_MEMBER
kind ADMIN_QUORUM_APPROVAL
kind QUORUM_SIGN
kind CALCULATE_PUBLIC_KEY
kind UPDATE_VAULT_ATTRIBUTES
kind ERROR
status PENDING
status WAITING_DATA_COLLECTION
status PENDING_ACTIVATION
status APPROVED
status COMPLETED
status REJECTED
status CANCELED
status FAILED
status ERROR
statusText Pending
statusText Pending activation
statusText Approved
statusText Completed
statusText Rejected
statusText Canceled
statusText Failed
statusText N/A

Status Code 400

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 404

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 500

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

List sub account operations

Code samples


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'

};

fetch('/casp/api/v1.0/mng/vaults/{vaultId}/coins/{coinType}/accounts/{accountIdentifier}/operations',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X GET /casp/api/v1.0/mng/vaults/{vaultId}/coins/{coinType}/accounts/{accountIdentifier}/operations \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer API_KEY'

GET /casp/api/v1.0/mng/vaults/{vaultId}/coins/{coinType}/accounts/{accountIdentifier}/operations

List sub account operations.

Note: If the parameters skip and limit are not specified or both are set to 0, then the response data contains a JSON list of the items. If those parameters are set (>0), then the response data is the JSON object shown here.

Parameters

Name In Type Required Description
vaultId path string true Vault ID
coinType path integer(int32) true Coin type
accountIdentifier path string true Account identifier, which can be the index or the name
skip query integer(int32) false The number of results to skip from the beginning of the results
limit query integer(int32) false The maximum number of results to return

Example responses

200 Response

{
  "totalItems": 0,
  "items": [
    {
      "operationID": "string",
      "kind": "JOIN_VAULT",
      "status": "PENDING",
      "statusText": "`Pending`",
      "createdAt": "string",
      "vaultID": "string",
      "description": "string",
      "isApproved": true,
      "accountID": "string"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK OK Inline
405 Method Not Allowed Incorrect vault type Inline
500 Internal Server Error List sub account operations failed Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» totalItems integer(int32) true none Total Items
» items [object] true none Items
»» operationID string true none Operation ID
»» kind string true none Operation kind
»» status string true none Operation status
»» statusText string true none Operation status text
»» createdAt string true none Operation creation time
»» vaultID string true none Vault ID
»» description string false none Description of the operation
»» isApproved boolean true none Approval state for the operation
»» accountID string true none Account ID for the operation

Enumerated Values

Property Value
kind JOIN_VAULT
kind REJOIN_VAULT
kind JOIN_VAULT_ADMIN_QUORUM
kind JOIN_POLICY_VAULT
kind ADD_MEMBER
kind ADMIN_QUORUM_APPROVAL
kind QUORUM_SIGN
kind CALCULATE_PUBLIC_KEY
kind UPDATE_VAULT_ATTRIBUTES
kind ERROR
status PENDING
status WAITING_DATA_COLLECTION
status PENDING_ACTIVATION
status APPROVED
status COMPLETED
status REJECTED
status CANCELED
status FAILED
status ERROR
statusText Pending
statusText Pending activation
statusText Approved
statusText Completed
statusText Rejected
statusText Canceled
statusText Failed
statusText N/A

Status Code 405

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 500

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Get operation details

Code samples


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'

};

fetch('/casp/api/v1.0/mng/operations/{operationid}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X GET /casp/api/v1.0/mng/operations/{operationid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer API_KEY'

GET /casp/api/v1.0/mng/operations/{operationid}

Get the details of an CASP operation.

Parameters

Name In Type Required Description
operationid path string true Operation ID

Example responses

200 Response

{
  "operationID": "string",
  "kind": "JOIN_VAULT",
  "status": "PENDING",
  "statusText": "`Pending`",
  "createdAt": "string",
  "vaultID": "string",
  "description": "string",
  "isApproved": true,
  "accountID": "string",
  "groups": [
    {
      "name": "string",
      "members": [
        {
          "approvedAt": "string",
          "id": "string",
          "isApproved": true,
          "name": "string",
          "status": "STARTED",
          "approvalGroupAccount": {
            "id": "string",
            "name": "string"
          },
          "label": "string",
          "isGlobal": true,
          "isActive": true,
          "globalStatus": "ACTIVATED",
          "isOffline": true
        }
      ],
      "requiredApprovals": 0,
      "order": 0,
      "deactivateAllowed": true,
      "isOffline": true
    }
  ],
  "policyDetails": {
    "id": "string",
    "name": "string"
  },
  "vaultName": "string"
}

Responses

Status Meaning Description Schema
200 OK OK Inline
404 Not Found Operation not found Inline
500 Internal Server Error Get Operation status failed Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» operationID string true none Operation ID
» kind string true none Operation kind
» status string true none Operation status
» statusText string true none Operation status text
» createdAt string true none Operation creation time
» vaultID string true none Vault ID
» description string false none Description of the operation
» isApproved boolean true none Approval state for the operation
» accountID string true none Account ID for the operation
» groups [object] true none Operation approval groups
»» name string true none Approval group name
»» members [object] true none A list of participants in the group
»»» approvedAt string false none ParticipantWithVault approval time
»»» id string true none ParticipantWithVault ID
»»» isApproved boolean true none ParticipantWithVault approval state
»»» name string true none ParticipantWithVault name
»»» status string true none ParticipantWithVault task status
»»» approvalGroupAccount object false none none
»»»» id string true none Account ID
»»»» name string true none Account name
»»» label string true none ParticipantWithVault label
»»» isGlobal boolean true none ParticipantWithVault global state
»»» isActive boolean true none none
»»» globalStatus string true none none
»»» isOffline boolean true none none
»» requiredApprovals integer(int32) true none The number of group participants that need to give approval
»» order integer(int32) true none This field determines the order in which groups are prompted for approvals
»» deactivateAllowed boolean true none A group participant can be suspended or revoked from this group
»» isOffline boolean true none Group is offline - conclude only offline participants
» policyDetails object false none Operation approval groups
»» id string true none Policy id
»» name string true none Policy name
» vaultName string true none Item name for the operation

Enumerated Values

Property Value
kind JOIN_VAULT
kind REJOIN_VAULT
kind JOIN_VAULT_ADMIN_QUORUM
kind JOIN_POLICY_VAULT
kind ADD_MEMBER
kind ADMIN_QUORUM_APPROVAL
kind QUORUM_SIGN
kind CALCULATE_PUBLIC_KEY
kind UPDATE_VAULT_ATTRIBUTES
kind ERROR
status PENDING
status WAITING_DATA_COLLECTION
status PENDING_ACTIVATION
status APPROVED
status COMPLETED
status REJECTED
status CANCELED
status FAILED
status ERROR
statusText Pending
statusText Pending activation
statusText Approved
statusText Completed
statusText Rejected
statusText Canceled
statusText Failed
statusText N/A
status STARTED
status ACTIVATED
status DECLINED
status REVOKED
status SUSPENDED
globalStatus ACTIVATED
globalStatus REACTIVATING
globalStatus SUSPENDED
globalStatus REVOKED

Status Code 404

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 500

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Cancel a pending operation

Code samples


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'

};

fetch('/casp/api/v1.0/mng/operations/{operationid}/cancel',
{
  method: 'POST',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X POST /casp/api/v1.0/mng/operations/{operationid}/cancel \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer API_KEY'

POST /casp/api/v1.0/mng/operations/{operationid}/cancel

Parameters

Name In Type Required Description
operationid path string true Operation ID

Example responses

404 Response

{
  "type": "string",
  "title": "string",
  "details": "string",
  "status": 0
}

Responses

Status Meaning Description Schema
200 OK OK None
404 Not Found Operation not found Inline
409 Conflict Operation on running Inline
500 Internal Server Error Cancel a pending operation failed Inline

Response Schema

Status Code 404

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 409

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 500

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Update vault policies

Code samples

const inputBody = '[
  {
    "name": "string",
    "id": "string",
    "description": "string",
    "enabled": true,
    "timeZone": "string",
    "rules": {
      "weeklyTimeSlots": [
        {
          "days": "string",
          "timeStart": "string",
          "timeEnd": "string"
        }
      ],
      "amountRange": {
        "property1": {
          "minimum": 0,
          "maximum": 0
        },
        "property2": {
          "minimum": 0,
          "maximum": 0
        }
      },
      "whiteList": [
        "string"
      ],
      "derivedWhitelist": [
        {
          "chainCode": "string",
          "publicKey": "string",
          "level": 0,
          "parentFingerprint": "string",
          "childNumber": 0
        }
      ],
      "attributes": [
        {
          "id": "string",
          "op": "string",
          "value": "string"
        }
      ]
    },
    "isOffline": true
  }
]';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'API_KEY'

};

fetch('/casp/api/v1.0/mng/vaults/{id}/policies',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X PUT /casp/api/v1.0/mng/vaults/{id}/policies \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer API_KEY'

PUT /casp/api/v1.0/mng/vaults/{id}/policies

Update vault policies

Body parameter

[
  {
    "name": "string",
    "id": "string",
    "description": "string",
    "enabled": true,
    "timeZone": "string",
    "rules": {
      "weeklyTimeSlots": [
        {
          "days": "string",
          "timeStart": "string",
          "timeEnd": "string"
        }
      ],
      "amountRange": {
        "property1": {
          "minimum": 0,
          "maximum": 0
        },
        "property2": {
          "minimum": 0,
          "maximum": 0
        }
      },
      "whiteList": [
        "string"
      ],
      "derivedWhitelist": [
        {
          "chainCode": "string",
          "publicKey": "string",
          "level": 0,
          "parentFingerprint": "string",
          "childNumber": 0
        }
      ],
      "attributes": [
        {
          "id": "string",
          "op": "string",
          "value": "string"
        }
      ]
    },
    "isOffline": true
  }
]

Parameters

Name In Type Required Description
id path string true Vault ID
body body array[object] true Create Vault Request

Example responses

200 Response

{
  "operationID": "string",
  "kind": "JOIN_VAULT",
  "status": "PENDING",
  "statusText": "`Pending`",
  "createdAt": "string",
  "vaultID": "string",
  "description": "string",
  "isApproved": true,
  "accountID": "string"
}

Responses

Status Meaning Description Schema
200 OK OK Inline
400 Bad Request bad request Inline
404 Not Found Vault not found Inline
500 Internal Server Error Update vault policies failed Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» operationID string true none Operation ID
» kind string true none Operation kind
» status string true none Operation status
» statusText string true none Operation status text
» createdAt string true none Operation creation time
» vaultID string true none Vault ID
» description string false none Description of the operation
» isApproved boolean true none Approval state for the operation
» accountID string true none Account ID for the operation

Enumerated Values

Property Value
kind JOIN_VAULT
kind REJOIN_VAULT
kind JOIN_VAULT_ADMIN_QUORUM
kind JOIN_POLICY_VAULT
kind ADD_MEMBER
kind ADMIN_QUORUM_APPROVAL
kind QUORUM_SIGN
kind CALCULATE_PUBLIC_KEY
kind UPDATE_VAULT_ATTRIBUTES
kind ERROR
status PENDING
status WAITING_DATA_COLLECTION
status PENDING_ACTIVATION
status APPROVED
status COMPLETED
status REJECTED
status CANCELED
status FAILED
status ERROR
statusText Pending
statusText Pending activation
statusText Approved
statusText Completed
statusText Rejected
statusText Canceled
statusText Failed
statusText N/A

Status Code 400

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 404

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 500

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Public key calculation status

Code samples


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'

};

fetch('/casp/api/v1.0/mng/operations/calculatePublicKey/{operationid}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X GET /casp/api/v1.0/mng/operations/calculatePublicKey/{operationid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer API_KEY'

GET /casp/api/v1.0/mng/operations/calculatePublicKey/{operationid}

For some keys, calculating public keys requires approval of the admin group. This request queries the operation status.

Parameters

Name In Type Required Description
operationid path string true Operation ID

Example responses

200 Response

{
  "operationID": "string",
  "kind": "JOIN_VAULT",
  "status": "PENDING",
  "statusText": "`Pending`",
  "createdAt": "string",
  "vaultID": "string",
  "description": "string",
  "isApproved": true,
  "accountID": "string",
  "groups": [
    {
      "name": "string",
      "members": [
        {
          "approvedAt": "string",
          "id": "string",
          "isApproved": true,
          "name": "string",
          "status": "STARTED",
          "approvalGroupAccount": {
            "id": "string",
            "name": "string"
          },
          "label": "string",
          "isGlobal": true,
          "isActive": true,
          "globalStatus": "ACTIVATED",
          "isOffline": true
        }
      ],
      "requiredApprovals": 0,
      "order": 0,
      "deactivateAllowed": true,
      "isOffline": true
    }
  ],
  "policyDetails": {
    "id": "string",
    "name": "string"
  },
  "vaultName": "string",
  "totsParams": [
    {
      "index": 0,
      "numberOfFragments": 0
    }
  ],
  "publicKeys": [
    "string"
  ]
}

Responses

Status Meaning Description Schema
200 OK OK Inline
404 Not Found Operation not found Inline
500 Internal Server Error Get Operation status failed Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» operationID string true none Operation ID
» kind string true none Operation kind
» status string true none Operation status
» statusText string true none Operation status text
» createdAt string true none Operation creation time
» vaultID string true none Vault ID
» description string false none Description of the operation
» isApproved boolean true none Approval state for the operation
» accountID string true none Account ID for the operation
» groups [object] true none Operation approval groups
»» name string true none Approval group name
»» members [object] true none A list of participants in the group
»»» approvedAt string false none ParticipantWithVault approval time
»»» id string true none ParticipantWithVault ID
»»» isApproved boolean true none ParticipantWithVault approval state
»»» name string true none ParticipantWithVault name
»»» status string true none ParticipantWithVault task status
»»» approvalGroupAccount object false none none
»»»» id string true none Account ID
»»»» name string true none Account name
»»» label string true none ParticipantWithVault label
»»» isGlobal boolean true none ParticipantWithVault global state
»»» isActive boolean true none none
»»» globalStatus string true none none
»»» isOffline boolean true none none
»» requiredApprovals integer(int32) true none The number of group participants that need to give approval
»» order integer(int32) true none This field determines the order in which groups are prompted for approvals
»» deactivateAllowed boolean true none A group participant can be suspended or revoked from this group
»» isOffline boolean true none Group is offline - conclude only offline participants
» policyDetails object false none Operation approval groups
»» id string true none Policy id
»» name string true none Policy name
» vaultName string true none Item name for the operation
» totsParams [object] true none Operation approval groups
»» index integer(int32) true none Index
»» numberOfFragments integer(int32) true none Number of fragments
» publicKeys [string] true none Operation approval groups

Enumerated Values

Property Value
kind JOIN_VAULT
kind REJOIN_VAULT
kind JOIN_VAULT_ADMIN_QUORUM
kind JOIN_POLICY_VAULT
kind ADD_MEMBER
kind ADMIN_QUORUM_APPROVAL
kind QUORUM_SIGN
kind CALCULATE_PUBLIC_KEY
kind UPDATE_VAULT_ATTRIBUTES
kind ERROR
status PENDING
status WAITING_DATA_COLLECTION
status PENDING_ACTIVATION
status APPROVED
status COMPLETED
status REJECTED
status CANCELED
status FAILED
status ERROR
statusText Pending
statusText Pending activation
statusText Approved
statusText Completed
statusText Rejected
statusText Canceled
statusText Failed
statusText N/A
status STARTED
status ACTIVATED
status DECLINED
status REVOKED
status SUSPENDED
globalStatus ACTIVATED
globalStatus REACTIVATING
globalStatus SUSPENDED
globalStatus REVOKED

Status Code 404

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 500

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status of vault attributes operation

Code samples


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'

};

fetch('/casp/api/v1.0/mng/operations/updateVaultDataCollectorsGroups/{operationId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X GET /casp/api/v1.0/mng/operations/updateVaultDataCollectorsGroups/{operationId} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer API_KEY'

GET /casp/api/v1.0/mng/operations/updateVaultDataCollectorsGroups/{operationId}

Returns the operation metadata. The Operation ID parameter must be from an 'UPDATE_DATA_COLLECTION_CONFIGURATION' operation.

Parameters

Name In Type Required Description
operationId path string true Operation ID

Example responses

200 Response

{
  "operationID": "string",
  "kind": "JOIN_VAULT",
  "status": "PENDING",
  "statusText": "`Pending`",
  "createdAt": "string",
  "vaultID": "string",
  "description": "string",
  "isApproved": true,
  "accountID": "string",
  "groups": [
    {
      "name": "string",
      "members": [
        {
          "approvedAt": "string",
          "id": "string",
          "isApproved": true,
          "name": "string",
          "status": "STARTED",
          "approvalGroupAccount": {
            "id": "string",
            "name": "string"
          },
          "label": "string",
          "isGlobal": true,
          "isActive": true,
          "globalStatus": "ACTIVATED",
          "isOffline": true
        }
      ],
      "requiredApprovals": 0,
      "order": 0,
      "deactivateAllowed": true,
      "isOffline": true
    }
  ],
  "policyDetails": {
    "id": "string",
    "name": "string"
  },
  "vaultName": "string",
  "newVaultAttributes": {
    "property1": "string",
    "property2": "string"
  },
  "oldVaultAttributes": {
    "property1": "string",
    "property2": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
404 Not Found Operation not found Inline
500 Internal Server Error Get operation status failed Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» operationID string true none Operation ID
» kind string true none Operation kind
» status string true none Operation status
» statusText string true none Operation status text
» createdAt string true none Operation creation time
» vaultID string true none Vault ID
» description string false none Description of the operation
» isApproved boolean true none Approval state for the operation
» accountID string true none Account ID for the operation
» groups [object] true none Operation approval groups
»» name string true none Approval group name
»» members [object] true none A list of participants in the group
»»» approvedAt string false none ParticipantWithVault approval time
»»» id string true none ParticipantWithVault ID
»»» isApproved boolean true none ParticipantWithVault approval state
»»» name string true none ParticipantWithVault name
»»» status string true none ParticipantWithVault task status
»»» approvalGroupAccount object false none none
»»»» id string true none Account ID
»»»» name string true none Account name
»»» label string true none ParticipantWithVault label
»»» isGlobal boolean true none ParticipantWithVault global state
»»» isActive boolean true none none
»»» globalStatus string true none none
»»» isOffline boolean true none none
»» requiredApprovals integer(int32) true none The number of group participants that need to give approval
»» order integer(int32) true none This field determines the order in which groups are prompted for approvals
»» deactivateAllowed boolean true none A group participant can be suspended or revoked from this group
»» isOffline boolean true none Group is offline - conclude only offline participants
» policyDetails object false none Operation approval groups
»» id string true none Policy id
»» name string true none Policy name
» vaultName string true none Item name for the operation
» newVaultAttributes object true none new vault attributes
»» additionalProperties string false none none
» oldVaultAttributes object true none old vault attributes
»» additionalProperties string false none none

Enumerated Values

Property Value
kind JOIN_VAULT
kind REJOIN_VAULT
kind JOIN_VAULT_ADMIN_QUORUM
kind JOIN_POLICY_VAULT
kind ADD_MEMBER
kind ADMIN_QUORUM_APPROVAL
kind QUORUM_SIGN
kind CALCULATE_PUBLIC_KEY
kind UPDATE_VAULT_ATTRIBUTES
kind ERROR
status PENDING
status WAITING_DATA_COLLECTION
status PENDING_ACTIVATION
status APPROVED
status COMPLETED
status REJECTED
status CANCELED
status FAILED
status ERROR
statusText Pending
statusText Pending activation
statusText Approved
statusText Completed
statusText Rejected
statusText Canceled
statusText Failed
statusText N/A
status STARTED
status ACTIVATED
status DECLINED
status REVOKED
status SUSPENDED
globalStatus ACTIVATED
globalStatus REACTIVATING
globalStatus SUSPENDED
globalStatus REVOKED

Status Code 404

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 500

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

BYOW Policy Management

Refer to the Policy Management section in the Unbound CASP Developers Guide.

Add member to vault

Code samples

const inputBody = '{
  "participantID": "string",
  "description": "string",
  "policyId": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'API_KEY'

};

fetch('/casp/api/v1.0/mng/vaults/{vaultId}/approval_groups/{approvalGroupId}/members',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X POST /casp/api/v1.0/mng/vaults/{vaultId}/approval_groups/{approvalGroupId}/members \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer API_KEY'

POST /casp/api/v1.0/mng/vaults/{vaultId}/approval_groups/{approvalGroupId}/members

This API is used if a participant becomes unavailable or leaves an account and needs to be replaced with a new participant. A new participant may be added to an existing vault, but requires the approval of the existing vault quorum.

Body parameter

{
  "participantID": "string",
  "description": "string",
  "policyId": "string"
}

Parameters

Name In Type Required Description
vaultId path string true Vault ID
approvalGroupId path string true Approval Group Id
body body object true Add vault group participant request
» participantID body string true ParticipantWithVault ID
» description body string false Description
» policyId body string false policy id to join

Example responses

200 Response

{
  "operation": {
    "operationID": "string",
    "kind": "JOIN_VAULT",
    "status": "PENDING",
    "statusText": "`Pending`",
    "createdAt": "string",
    "vaultID": "string",
    "description": "string",
    "isApproved": true,
    "accountID": "string",
    "groups": [
      {
        "name": "string",
        "members": [
          {
            "approvedAt": "string",
            "id": "string",
            "isApproved": true,
            "name": "string",
            "status": "STARTED",
            "approvalGroupAccount": {
              "id": "string",
              "name": "string"
            },
            "label": "string",
            "isGlobal": true,
            "isActive": true,
            "globalStatus": "ACTIVATED",
            "isOffline": true
          }
        ],
        "requiredApprovals": 0,
        "order": 0,
        "deactivateAllowed": true,
        "isOffline": true
      }
    ],
    "policyDetails": {
      "id": "string",
      "name": "string"
    },
    "vaultName": "string"
  },
  "participant": {
    "id": "string",
    "accountID": "string",
    "name": "string",
    "email": "string",
    "status": "NOT_ACTIVATED",
    "isActive": true,
    "accountName": "string",
    "role": "string",
    "pushEnabled": true,
    "offline": true,
    "activeOperations": 0,
    "deviceType": "IOS",
    "creationTime": "string",
    "modificationTime": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
404 Not Found Item not found Inline
405 Method Not Allowed Not allowed Inline
500 Internal Server Error Add participant failed Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» operation object true none Operation
»» operationID string true none Operation ID
»» kind string true none Operation kind
»» status string true none Operation status
»» statusText string true none Operation status text
»» createdAt string true none Operation creation time
»» vaultID string true none Vault ID
»» description string false none Description of the operation
»» isApproved boolean true none Approval state for the operation
»» accountID string true none Account ID for the operation
»» groups [object] true none Operation approval groups
»»» name string true none Approval group name
»»» members [object] true none A list of participants in the group
»»»» approvedAt string false none ParticipantWithVault approval time
»»»» id string true none ParticipantWithVault ID
»»»» isApproved boolean true none ParticipantWithVault approval state
»»»» name string true none ParticipantWithVault name
»»»» status string true none ParticipantWithVault task status
»»»» approvalGroupAccount object false none none
»»»»» id string true none Account ID
»»»»» name string true none Account name
»»»» label string true none ParticipantWithVault label
»»»» isGlobal boolean true none ParticipantWithVault global state
»»»» isActive boolean true none none
»»»» globalStatus string true none none
»»»» isOffline boolean true none none
»»» requiredApprovals integer(int32) true none The number of group participants that need to give approval
»»» order integer(int32) true none This field determines the order in which groups are prompted for approvals
»»» deactivateAllowed boolean true none A group participant can be suspended or revoked from this group
»»» isOffline boolean true none Group is offline - conclude only offline participants
»» policyDetails object false none Operation approval groups
»»» id string true none Policy id
»»» name string true none Policy name
»» vaultName string true none Item name for the operation
» participant object true none ParticipantWithVault
»» id string true none Participant ID
»» accountID string true none Participant account ID
»» name string true none Participant name
»» email string true none Participant email
»» status string true none Participant status
»» isActive boolean true none Participant activation state
»» accountName string true none Participant account name
»» role string false none Participant role
»» pushEnabled boolean true none Is the push notifications enabled for this participant
»» offline boolean true none Participant is offline
»» activeOperations integer(int64) true none Participant is offline
»» deviceType string false none Participant device type
»» creationTime string true none Participant creation time
»» modificationTime string true none Participant last modification time

Enumerated Values

Property Value
kind JOIN_VAULT
kind REJOIN_VAULT
kind JOIN_VAULT_ADMIN_QUORUM
kind JOIN_POLICY_VAULT
kind ADD_MEMBER
kind ADMIN_QUORUM_APPROVAL
kind QUORUM_SIGN
kind CALCULATE_PUBLIC_KEY
kind UPDATE_VAULT_ATTRIBUTES
kind ERROR
status PENDING
status WAITING_DATA_COLLECTION
status PENDING_ACTIVATION
status APPROVED
status COMPLETED
status REJECTED
status CANCELED
status FAILED
status ERROR
statusText Pending
statusText Pending activation
statusText Approved
statusText Completed
statusText Rejected
statusText Canceled
statusText Failed
statusText N/A
status STARTED
status ACTIVATED
status DECLINED
status REVOKED
status SUSPENDED
globalStatus ACTIVATED
globalStatus REACTIVATING
globalStatus SUSPENDED
globalStatus REVOKED
status NOT_ACTIVATED
status ACTIVATED
status REACTIVATING
status SUSPENDED
status REVOKED
deviceType IOS
deviceType ANDROID
deviceType BOT

Status Code 404

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 405

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 500

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status of join policy vault operation

Code samples


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'

};

fetch('/casp/api/v1.0/mng/operations/joinpolicyvault/{operationid}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X GET /casp/api/v1.0/mng/operations/joinpolicyvault/{operationid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer API_KEY'

GET /casp/api/v1.0/mng/operations/joinpolicyvault/{operationid}

Returns join policy vault operation details. The Operation ID parameter must be from a 'JOIN_POLICY_VAULT' operation.

Parameters

Name In Type Required Description
operationid path string true Operation ID

Example responses

200 Response

{
  "operationID": "string",
  "kind": "JOIN_VAULT",
  "status": "PENDING",
  "statusText": "`Pending`",
  "createdAt": "string",
  "vaultID": "string",
  "description": "string",
  "isApproved": true,
  "accountID": "string",
  "policies": [
    {
      "name": "string",
      "id": "string",
      "description": "string",
      "enabled": true,
      "timeZone": "string",
      "groups": [
        {
          "name": "string",
          "members": [
            {
              "approvedAt": "string",
              "id": "string",
              "isApproved": true,
              "name": "string",
              "status": "STARTED",
              "approvalGroupAccount": {
                "id": "string",
                "name": "string"
              },
              "label": "string",
              "isGlobal": true,
              "isActive": true,
              "globalStatus": "ACTIVATED",
              "isOffline": true
            }
          ],
          "requiredApprovals": 0,
          "order": 0,
          "deactivateAllowed": true,
          "isOffline": true
        }
      ],
      "rules": {
        "weeklyTimeSlots": [
          {
            "days": "string",
            "timeStart": "string",
            "timeEnd": "string"
          }
        ],
        "amountRange": {
          "property1": {
            "minimum": 0,
            "maximum": 0
          },
          "property2": {
            "minimum": 0,
            "maximum": 0
          }
        },
        "whiteList": [
          "string"
        ],
        "derivedWhitelist": [
          {
            "chainCode": "string",
            "publicKey": "string",
            "level": 0,
            "parentFingerprint": "string",
            "childNumber": 0
          }
        ],
        "attributes": [
          {
            "id": "string",
            "op": "string",
            "value": "string"
          }
        ]
      }
    }
  ],
  "vaultName": "string",
  "groupNameToJoin": "string"
}

Responses

Status Meaning Description Schema
200 OK OK Inline
404 Not Found Operation not found Inline
500 Internal Server Error Get Operation status failed Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» operationID string true none Operation ID
» kind string true none Operation kind
» status string true none Operation status
» statusText string true none Operation status text
» createdAt string true none Operation creation time
» vaultID string true none Vault ID
» description string false none Description of the operation
» isApproved boolean true none Approval state for the operation
» accountID string true none Account ID for the operation
» policies [object] true none Policies
»» name string true none policy name
»» id string true none policy id
»» description string false none Policy description
»» enabled boolean false none is the policy enabled, default is TRUE
»» timeZone string false none Policy time zone
»» groups [object] true none Approval groups
»»» name string true none Approval group name
»»» members [object] true none A list of participants in the group
»»»» approvedAt string false none ParticipantWithVault approval time
»»»» id string true none ParticipantWithVault ID
»»»» isApproved boolean true none ParticipantWithVault approval state
»»»» name string true none ParticipantWithVault name
»»»» status string true none ParticipantWithVault task status
»»»» approvalGroupAccount object false none none
»»»»» id string true none Account ID
»»»»» name string true none Account name
»»»» label string true none ParticipantWithVault label
»»»» isGlobal boolean true none ParticipantWithVault global state
»»»» isActive boolean true none none
»»»» globalStatus string true none none
»»»» isOffline boolean true none none
»»» requiredApprovals integer(int32) true none The number of group participants that need to give approval
»»» order integer(int32) true none This field determines the order in which groups are prompted for approvals
»»» deactivateAllowed boolean true none A group participant can be suspended or revoked from this group
»»» isOffline boolean true none Group is offline - conclude only offline participants
»» rules object false none Policy rules
»»» weeklyTimeSlots [object] false none none
»»»» days string true none Days of the week in comma separated list. e.g. 0,1,3 for Sunday, Monday and Wednesday
»»»» timeStart string true none UTC time of day in the following format: HH:MM
»»»» timeEnd string true none UTC time of day in the following format: HH:MM
»»» amountRange object false none none
»»»» additionalProperties object false none none
»»»»» minimum integer false none lower limit
»»»»» maximum integer false none upper limit
»»» whiteList [string] false none none
»»» derivedWhitelist [object] false none none
»»»» chainCode string false none none
»»»» publicKey string false none none
»»»» level integer(int32) false none none
»»»» parentFingerprint string false none none
»»»» childNumber integer(int32) false none none
»»» attributes [object] false none none
»»»» id string true none attribute rule ID
»»»» op string true none attribute rule operator
»»»» value string true none attribute rule value
» vaultName string true none Vault name for the operation
» groupNameToJoin string true none Group to join

Enumerated Values

Property Value
kind JOIN_VAULT
kind REJOIN_VAULT
kind JOIN_VAULT_ADMIN_QUORUM
kind JOIN_POLICY_VAULT
kind ADD_MEMBER
kind ADMIN_QUORUM_APPROVAL
kind QUORUM_SIGN
kind CALCULATE_PUBLIC_KEY
kind UPDATE_VAULT_ATTRIBUTES
kind ERROR
status PENDING
status WAITING_DATA_COLLECTION
status PENDING_ACTIVATION
status APPROVED
status COMPLETED
status REJECTED
status CANCELED
status FAILED
status ERROR
statusText Pending
statusText Pending activation
statusText Approved
statusText Completed
statusText Rejected
statusText Canceled
statusText Failed
statusText N/A
status STARTED
status ACTIVATED
status DECLINED
status REVOKED
status SUSPENDED
globalStatus ACTIVATED
globalStatus REACTIVATING
globalStatus SUSPENDED
globalStatus REVOKED

Status Code 404

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 500

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Set vault member status

Code samples

const inputBody = '{
  "status": "DEACTIVATED"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'API_KEY'

};

fetch('/casp/api/v1.0/mng/vaults/{vaultId}/members/{participantId}/status',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X PUT /casp/api/v1.0/mng/vaults/{vaultId}/members/{participantId}/status \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer API_KEY'

PUT /casp/api/v1.0/mng/vaults/{vaultId}/members/{participantId}/status

The suspended participant no longer takes part in the vault approval processes. Note that you can only suspend or revoke a user if the remaining number of participants is sufficient for the quorum, unless 'force' flag is provided.

Body parameter

{
  "status": "DEACTIVATED"
}

Parameters

Name In Type Required Description
participantId path string true Participant ID
vaultId path string true vault ID
force query boolean false Force update of participant status. Warning: Using this flag can result in an unusable vault!
body body object true Participant status update request
» status body string true ParticipantWithVault status in vault

Enumerated Values

Parameter Value
» status DEACTIVATED
» status SUSPENDED
» status REVOKED
» status ACTIVATED

Example responses

200 Response

{
  "id": "string",
  "name": "string",
  "status": "ACTIVATED",
  "approvalGroupAccount": {
    "id": "string",
    "name": "string"
  },
  "label": "string",
  "isGlobal": true,
  "isActive": true
}

Responses

Status Meaning Description Schema
200 OK OK Inline
202 Accepted Accepted Inline
403 Forbidden Suspending or revoking this participant would make the vault not operational (too few active participants left) Inline
404 Not Found Participant not found Inline
406 Not Acceptable Not supported Inline
500 Internal Server Error Set vault member status failed Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» id string true none ParticipantWithVault ID
» name string true none ParticipantWithVault name
» status string true none ParticipantWithVault task status
» approvalGroupAccount object true none none
»» id string true none Account ID
»» name string true none Account name
» label string true none ParticipantWithVault label
» isGlobal boolean true none ParticipantWithVault global state
» isActive boolean true none none

Enumerated Values

Property Value
status ACTIVATED
status SUSPENDED
status REVOKED

Status Code 202

Name Type Required Restrictions Description
» operationID string true none Operation ID
» kind string true none Operation kind
» status string true none Operation status
» statusText string true none Operation status text
» createdAt string true none Operation creation time
» vaultID string true none Vault ID
» description string false none Description of the operation
» isApproved boolean true none Approval state for the operation
» accountID string true none Account ID for the operation
» groups [object] true none Operation approval groups
»» name string true none Approval group name
»» members [object] true none A list of participants in the group
»»» approvedAt string false none ParticipantWithVault approval time
»»» id string true none ParticipantWithVault ID
»»» isApproved boolean true none ParticipantWithVault approval state
»»» name string true none ParticipantWithVault name
»»» status string true none ParticipantWithVault task status
»»» approvalGroupAccount object false none none
»»»» id string true none Account ID
»»»» name string true none Account name
»»» label string true none ParticipantWithVault label
»»» isGlobal boolean true none ParticipantWithVault global state
»»» isActive boolean true none none
»»» globalStatus string true none none
»»» isOffline boolean true none none
»» requiredApprovals integer(int32) true none The number of group participants that need to give approval
»» order integer(int32) true none This field determines the order in which groups are prompted for approvals
»» deactivateAllowed boolean true none A group participant can be suspended or revoked from this group
»» isOffline boolean true none Group is offline - conclude only offline participants
» policyDetails object false none Operation approval groups
»» id string true none Policy id
»» name string true none Policy name
» vaultName string true none Item name for the operation

Enumerated Values

Property Value
kind JOIN_VAULT
kind REJOIN_VAULT
kind JOIN_VAULT_ADMIN_QUORUM
kind JOIN_POLICY_VAULT
kind ADD_MEMBER
kind ADMIN_QUORUM_APPROVAL
kind QUORUM_SIGN
kind CALCULATE_PUBLIC_KEY
kind UPDATE_VAULT_ATTRIBUTES
kind ERROR
status PENDING
status WAITING_DATA_COLLECTION
status PENDING_ACTIVATION
status APPROVED
status COMPLETED
status REJECTED
status CANCELED
status FAILED
status ERROR
statusText Pending
statusText Pending activation
statusText Approved
statusText Completed
statusText Rejected
statusText Canceled
statusText Failed
statusText N/A
status STARTED
status ACTIVATED
status DECLINED
status REVOKED
status SUSPENDED
globalStatus ACTIVATED
globalStatus REACTIVATING
globalStatus SUSPENDED
globalStatus REVOKED

Status Code 403

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 404

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 406

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 500

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Set vault member status (deprecated)

Code samples

const inputBody = '{
  "status": "DEACTIVATED",
  "policyId": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'API_KEY'

};

fetch('/casp/api/v1.0/mng/vaults/{id}/members/{participantId}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X PUT /casp/api/v1.0/mng/vaults/{id}/members/{participantId} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer API_KEY'

PUT /casp/api/v1.0/mng/vaults/{id}/members/{participantId}

The suspended participant no longer takes part in the vault transaction approval processes. Note that you can only suspend or revoke a user, if the remaining number of participants is sufficient for the quorum policy, unless 'force' flag is provided.

Body parameter

{
  "status": "DEACTIVATED",
  "policyId": "string"
}

Parameters

Name In Type Required Description
participantId path string true Participant ID
id path string true vault ID
body body object true Participant status update request
» status body string true ParticipantWithVault status in vault
» policyId body string false The policy ID in which to change a participant's status. If none is specified, the participant's status will be changed in the admin quorum.

Enumerated Values

Parameter Value
» status DEACTIVATED
» status SUSPENDED
» status REVOKED
» status ACTIVATED

Example responses

404 Response

{
  "type": "string",
  "title": "string",
  "details": "string",
  "status": 0
}

Responses

Status Meaning Description Schema
200 OK OK None
404 Not Found Participant not found Inline
406 Not Acceptable Not supported Inline
500 Internal Server Error Set vault member status failed Inline

Response Schema

Status Code 404

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 406

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 500

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Set policy member status

Code samples

const inputBody = '{
  "status": "DEACTIVATED"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'API_KEY'

};

fetch('/casp/api/v1.0/mng/vaults/{vaultId}/policies/{policyId}/members/{participantId}/status',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X PUT /casp/api/v1.0/mng/vaults/{vaultId}/policies/{policyId}/members/{participantId}/status \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer API_KEY'

PUT /casp/api/v1.0/mng/vaults/{vaultId}/policies/{policyId}/members/{participantId}/status

The suspended participant no longer takes part in the vault transaction approval processes. Note that you can only suspend or revoke a user, if the remaining number of participants is sufficient for the quorum policy, unless 'force' flag is provided.

Body parameter

{
  "status": "DEACTIVATED"
}

Parameters

Name In Type Required Description
participantId path string true Participant ID
vaultId path string true vault ID
policyId path string true policy ID
force query boolean false Force update of participant status
body body object true Participant status update request
» status body string true ParticipantWithVault status in vault

Enumerated Values

Parameter Value
» status DEACTIVATED
» status SUSPENDED
» status REVOKED
» status ACTIVATED

Example responses

200 Response

{
  "id": "string",
  "name": "string",
  "status": "ACTIVATED",
  "approvalGroupAccount": {
    "id": "string",
    "name": "string"
  },
  "label": "string",
  "isGlobal": true,
  "isActive": true
}

Responses

Status Meaning Description Schema
200 OK OK Inline
202 Accepted Accepted Inline
403 Forbidden Suspending or revoking this participant would make the vault not operational (too few active participants left) Inline
404 Not Found Item not found Inline
406 Not Acceptable Not supported Inline
500 Internal Server Error Set vault member status participant failed Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» id string true none ParticipantWithVault ID
» name string true none ParticipantWithVault name
» status string true none ParticipantWithVault task status
» approvalGroupAccount object true none none
»» id string true none Account ID
»» name string true none Account name
» label string true none ParticipantWithVault label
» isGlobal boolean true none ParticipantWithVault global state
» isActive boolean true none none

Enumerated Values

Property Value
status ACTIVATED
status SUSPENDED
status REVOKED

Status Code 202

Name Type Required Restrictions Description
» operationID string true none Operation ID
» kind string true none Operation kind
» status string true none Operation status
» statusText string true none Operation status text
» createdAt string true none Operation creation time
» vaultID string true none Vault ID
» description string false none Description of the operation
» isApproved boolean true none Approval state for the operation
» accountID string true none Account ID for the operation
» groups [object] true none Operation approval groups
»» name string true none Approval group name
»» members [object] true none A list of participants in the group
»»» approvedAt string false none ParticipantWithVault approval time
»»» id string true none ParticipantWithVault ID
»»» isApproved boolean true none ParticipantWithVault approval state
»»» name string true none ParticipantWithVault name
»»» status string true none ParticipantWithVault task status
»»» approvalGroupAccount object false none none
»»»» id string true none Account ID
»»»» name string true none Account name
»»» label string true none ParticipantWithVault label
»»» isGlobal boolean true none ParticipantWithVault global state
»»» isActive boolean true none none
»»» globalStatus string true none none
»»» isOffline boolean true none none
»» requiredApprovals integer(int32) true none The number of group participants that need to give approval
»» order integer(int32) true none This field determines the order in which groups are prompted for approvals
»» deactivateAllowed boolean true none A group participant can be suspended or revoked from this group
»» isOffline boolean true none Group is offline - conclude only offline participants
» policyDetails object false none Operation approval groups
»» id string true none Policy id
»» name string true none Policy name
» vaultName string true none Item name for the operation

Enumerated Values

Property Value
kind JOIN_VAULT
kind REJOIN_VAULT
kind JOIN_VAULT_ADMIN_QUORUM
kind JOIN_POLICY_VAULT
kind ADD_MEMBER
kind ADMIN_QUORUM_APPROVAL
kind QUORUM_SIGN
kind CALCULATE_PUBLIC_KEY
kind UPDATE_VAULT_ATTRIBUTES
kind ERROR
status PENDING
status WAITING_DATA_COLLECTION
status PENDING_ACTIVATION
status APPROVED
status COMPLETED
status REJECTED
status CANCELED
status FAILED
status ERROR
statusText Pending
statusText Pending activation
statusText Approved
statusText Completed
statusText Rejected
statusText Canceled
statusText Failed
statusText N/A
status STARTED
status ACTIVATED
status DECLINED
status REVOKED
status SUSPENDED
globalStatus ACTIVATED
globalStatus REACTIVATING
globalStatus SUSPENDED
globalStatus REVOKED

Status Code 403

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 404

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 406

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 500

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

BYOW Keychain Management

Refer to the Keychain Management section in the Unbound CASP Developers Guide.

Add a coin type to a vault

Code samples

const inputBody = '{
  "coinType": 0
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'API_KEY'

};

fetch('/casp/api/v1.0/mng/vaults/{id}/coins',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X POST /casp/api/v1.0/mng/vaults/{id}/coins \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer API_KEY'

POST /casp/api/v1.0/mng/vaults/{id}/coins

Body parameter

{
  "coinType": 0
}

Parameters

Name In Type Required Description
id path string true Vault ID
body body object true Add vault group participant request
» coinType body integer(int32) true The coin type

Example responses

404 Response

{
  "type": "string",
  "title": "string",
  "details": "string",
  "status": 0
}

Responses

Status Meaning Description Schema
200 OK OK None
404 Not Found Item not found Inline
405 Method Not Allowed Incorrect vault type Inline
500 Internal Server Error Add participant failed Inline

Response Schema

Status Code 404

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 405

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 500

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

List all the coins in a vault

Code samples


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'

};

fetch('/casp/api/v1.0/mng/vaults/{id}/coins',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X GET /casp/api/v1.0/mng/vaults/{id}/coins \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer API_KEY'

GET /casp/api/v1.0/mng/vaults/{id}/coins

This endpoint is only functional if you generated a BIP44 vault.

Note: If the parameters skip and limit are not specified or both are set to 0, then the response data contains a JSON list of the items. If those parameters are set (>0), then the response data is the JSON object shown here.

Parameters

Name In Type Required Description
id path string true Vault ID
skip query integer(int32) false The number of results to skip from the beginning of the results
limit query integer(int32) false The maximum number of results to return

Example responses

200 Response

{
  "totalItems": 0,
  "items": [
    0
  ]
}

Responses

Status Meaning Description Schema
200 OK OK Inline
404 Not Found Item not found Inline
405 Method Not Allowed Incorrect vault type Inline
500 Internal Server Error Add participant failed Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» totalItems integer(int32) true none Total Items
» items [integer] true none Items

Status Code 404

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 405

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 500

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Get vault public key

Code samples


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'

};

fetch('/casp/api/v1.0/mng/vaults/{vaultId}/publickey',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X GET /casp/api/v1.0/mng/vaults/{vaultId}/publickey \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer API_KEY'

GET /casp/api/v1.0/mng/vaults/{vaultId}/publickey

Returns a deterministic vault's public key. Note that this is only valid for a vault with no hierarchy.

Parameters

Name In Type Required Description
vaultId path string true Vault ID
encoding query string false Key encoding

Enumerated Values

Parameter Value
encoding DER
encoding compressed
encoding uncompressed
encoding plain

Example responses

200 Response

{
  "publicKey": "string"
}

Responses

Status Meaning Description Schema
200 OK OK Inline
400 Bad Request Bad request Inline
404 Not Found Item not found Inline
405 Method Not Allowed Incorrect vault type Inline
500 Internal Server Error Add participant failed Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» publicKey string true none Vault's public key

Status Code 400

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 404

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 405

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 500

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Create an account

Code samples

const inputBody = '{
  "accountName": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'API_KEY'

};

fetch('/casp/api/v1.0/mng/vaults/{vaultId}/coins/{coinType}/accounts',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X POST /casp/api/v1.0/mng/vaults/{vaultId}/coins/{coinType}/accounts \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer API_KEY'

POST /casp/api/v1.0/mng/vaults/{vaultId}/coins/{coinType}/accounts

Add an account to a coin in a vault.

This endpoint is only functional if you generated a BIP44 vault.

Body parameter

{
  "accountName": "string"
}

Parameters

Name In Type Required Description
vaultId path string true Vault ID
coinType path integer(int32) true Coin type
body body object false Add account request
» accountName body string true The account name

Example responses

200 Response

{
  "publicKeys": [
    "string"
  ],
  "chains": [
    "string"
  ],
  "accountName": "string",
  "accountIndex": 0
}

Responses

Status Meaning Description Schema
200 OK OK Inline
400 Bad Request Bad Request Inline
404 Not Found Item not found Inline
405 Method Not Allowed Incorrect vault type Inline
409 Conflict Account name already exists Inline
500 Internal Server Error Add participant failed Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» publicKeys [string] true none the public keys
» chains [string] true none chains
» accountName string false none the account's name
» accountIndex integer(int32) true none the account's index

Status Code 400

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 404

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 405

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 409

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 500

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

List accounts in a vault

Code samples


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'

};

fetch('/casp/api/v1.0/mng/vaults/{vaultId}/coins/{coinType}/accounts',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X GET /casp/api/v1.0/mng/vaults/{vaultId}/coins/{coinType}/accounts \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer API_KEY'

GET /casp/api/v1.0/mng/vaults/{vaultId}/coins/{coinType}/accounts

List all the accounts in a vault for a given coin.

This endpoint is only functional if you generated a BIP44 vault.

Note: If the parameters skip and limit are not specified or both are set to 0, then the response data contains a JSON list of the items. If those parameters are set (>0), then the response data is the JSON object shown here.

Parameters

Name In Type Required Description
vaultId path string true Vault ID
coinType path integer(int32) true Coin type
skip query integer(int32) false The number of results to skip from the beginning of the results
limit query integer(int32) false The maximum number of results to return

Example responses

200 Response

{
  "totalItems": 0,
  "items": [
    {
      "name": "string",
      "index": 0
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK OK Inline
404 Not Found Item not found Inline
405 Method Not Allowed Incorrect vault type Inline
500 Internal Server Error Add participant failed Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» totalItems integer(int32) true none Total Items
» items [object] true none Items
»» name string false none an optional account name
»» index integer(int32) true none the account's index

Status Code 404

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 405

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 500

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Find account index by name

Code samples


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'

};

fetch('/casp/api/v1.0/mng/vaults/{vaultId}/coins/{coinType}/accounts/find?accountName=string',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X GET /casp/api/v1.0/mng/vaults/{vaultId}/coins/{coinType}/accounts/find?accountName=string \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer API_KEY'

GET /casp/api/v1.0/mng/vaults/{vaultId}/coins/{coinType}/accounts/find

This endpoint is only functional if you generated a BIP44 vault.

Parameters

Name In Type Required Description
vaultId path string true Vault ID
coinType path integer(int32) true Coin type
accountName query string true Account name

Example responses

200 Response

{
  "index": 0
}

Responses

Status Meaning Description Schema
200 OK OK Inline
404 Not Found Account index not found Inline
405 Method Not Allowed Incorrect vault type Inline
500 Internal Server Error find account index failed Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» index integer(int32) true none The account index

Status Code 404

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 405

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 500

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Get account by identifier

Code samples


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'

};

fetch('/casp/api/v1.0/mng/vaults/{vaultId}/coins/{coinType}/accounts/{accountIdentifier}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X GET /casp/api/v1.0/mng/vaults/{vaultId}/coins/{coinType}/accounts/{accountIdentifier} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer API_KEY'

GET /casp/api/v1.0/mng/vaults/{vaultId}/coins/{coinType}/accounts/{accountIdentifier}

Get detailed information about a vault for a given coin type and account index.

Parameters

Name In Type Required Description
vaultId path string true Vault ID
coinType path integer(int32) true Coin type
accountIdentifier path string true Account identifier, which can be the index or the name

Example responses

200 Response

{
  "accountName": "string",
  "accountIndex": 0
}

Responses

Status Meaning Description Schema
200 OK OK Inline
404 Not Found Item not found Inline
405 Method Not Allowed Incorrect vault type Inline
500 Internal Server Error Add participant failed Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» accountName string false none the account's name
» accountIndex integer(int32) true none the account's index

Status Code 404

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 405

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 500

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

List chain addresses

Code samples


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'

};

fetch('/casp/api/v1.0/mng/vaults/{vaultId}/coins/{coinType}/accounts/{accountIndex}/chains/{chain}/addresses',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X GET /casp/api/v1.0/mng/vaults/{vaultId}/coins/{coinType}/accounts/{accountIndex}/chains/{chain}/addresses \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer API_KEY'

GET /casp/api/v1.0/mng/vaults/{vaultId}/coins/{coinType}/accounts/{accountIndex}/chains/{chain}/addresses

List all the BIP44 addresses in a vault for a given coin type, account index and address chain type.

This endpoint is only functional if you generated a BIP44 vault.

Note: If the parameters skip and limit are not specified or both are set to 0, then the response data contains a JSON list of the items. If those parameters are set (>0), then the response data is the JSON object shown here.

Parameters

Name In Type Required Description
vaultId path string true Vault ID
coinType path integer(int32) true Coin type
accountIndex path integer(int32) true Account index
chain path string true Address type
encoding query string false Key encoding
sort query string false Specify the column name to sort by and the sort direction. The format is '{column_name}:{asc/desc}'. The default sort is ascending.

The column name can be one of the following: lastUpdatedAt
skip query integer(int32) false The number of results to skip from the beginning of the results
limit query integer(int32) false The maximum number of results to return

Enumerated Values

Parameter Value
chain change
chain external
chain all
encoding DER
encoding compressed
encoding uncompressed
encoding plain

Example responses

200 Response

{
  "totalItems": 0,
  "items": [
    "string"
  ],
  "chains": [
    "string"
  ],
  "accountName": "string",
  "accountIndex": 0
}

Responses

Status Meaning Description Schema
200 OK OK Inline
400 Bad Request Bad request Inline
404 Not Found Item not found Inline
405 Method Not Allowed Incorrect vault type Inline
500 Internal Server Error Add participant failed Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» totalItems integer(int32) true none Total Items
» items [string] true none Public key items
» chains [string] true none chains
» accountName string false none the account's name
» accountIndex integer(int32) true none the account's index

Status Code 400

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 404

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 405

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 500

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Get BYOW account backup

Code samples


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'

};

fetch('/casp/api/v1.0/mng/vaults/{vaultId}/coins/{coinType}/accounts/{accountIdentifier}/backup',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X GET /casp/api/v1.0/mng/vaults/{vaultId}/coins/{coinType}/accounts/{accountIdentifier}/backup \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer API_KEY'

GET /casp/api/v1.0/mng/vaults/{vaultId}/coins/{coinType}/accounts/{accountIdentifier}/backup

Get backup for BIP44 account.

This endpoint is only functional if you generated a BIP44 vault.

Parameters

Name In Type Required Description
vaultId path string true Vault ID
coinType path integer(int32) true Coin type
accountIdentifier path string true Account identifier, which can be the index or the name

Example responses

200 Response

{
  "vaultId": "string",
  "backupData": "string",
  "bipLevel": 0,
  "cpar": "string",
  "parentFingerprint": "string",
  "childNumber": 0,
  "publicKey": "string"
}

Responses

Status Meaning Description Schema
200 OK OK Inline
404 Not Found Vault not found Inline
405 Method Not Allowed Incorrect vault type Inline
500 Internal Server Error Get account backup failed Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» vaultId string true none the vault ID
» backupData string true none The backup data, in encrypted form
» bipLevel integer(int32) true none derivation level
» cpar string true none CPar
» parentFingerprint string true none parent fingerprint
» childNumber integer(int32) true none child number
» publicKey string false none none

Status Code 404

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 405

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 500

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Derive a key in a vault

Code samples

const inputBody = '{
  "pathToDeriveFrom": "string",
  "hardDerivation": true,
  "childIndex": 0
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'API_KEY'

};

fetch('/casp/api/v1.0/mng/vaults/{vaultId}/derivations',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X POST /casp/api/v1.0/mng/vaults/{vaultId}/derivations \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer API_KEY'

POST /casp/api/v1.0/mng/vaults/{vaultId}/derivations

This endpoint is only functional if you generated a BIP32 vault.

Body parameter

{
  "pathToDeriveFrom": "string",
  "hardDerivation": true,
  "childIndex": 0
}

Parameters

Name In Type Required Description
vaultId path string true Vault ID
encoding query string false Key encoding
body body object true Derive a keypair in a vault
» pathToDeriveFrom body string true The derivation path to derive from
» hardDerivation body boolean true Use hard derivation
» childIndex body integer(int32) true The child index

Enumerated Values

Parameter Value
encoding DER
encoding compressed
encoding uncompressed
encoding plain

Example responses

200 Response

{
  "derivationPath": "string",
  "publicKey": "string"
}

Responses

Status Meaning Description Schema
200 OK OK Inline
400 Bad Request Bad request Inline
404 Not Found Item not found Inline
405 Method Not Allowed Incorrect vault type Inline
500 Internal Server Error Add participant failed Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» derivationPath string true none the public derivation path
» publicKey string true none the public key

Status Code 400

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 404

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 405

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 500

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

List all keys in a vault

Code samples


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'

};

fetch('/casp/api/v1.0/mng/vaults/{vaultId}/derivations',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X GET /casp/api/v1.0/mng/vaults/{vaultId}/derivations \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer API_KEY'

GET /casp/api/v1.0/mng/vaults/{vaultId}/derivations

This endpoint is only functional if you generated a BIP32 vault.

Note: If the parameters skip and limit are not specified or both are set to 0, then the response data contains a JSON list of the items. If those parameters are set (>0), then the response data is the JSON object shown here.

Parameters

Name In Type Required Description
vaultId path string true Vault ID
encoding query string false Key encoding
skip query integer(int32) false The number of results to skip from the beginning of the results
limit query integer(int32) false The maximum number of results to return

Enumerated Values

Parameter Value
encoding DER
encoding compressed
encoding uncompressed
encoding plain

Example responses

200 Response

{
  "totalItems": 0,
  "items": [
    {
      "derivationPath": "string",
      "publicKey": "string"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK OK Inline
400 Bad Request Bad request Inline
404 Not Found Item not found Inline
405 Method Not Allowed Incorrect vault type Inline
500 Internal Server Error Add participant failed Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» totalItems integer(int32) true none Total Items
» items [object] true none Items
»» derivationPath string true none the public derivation path
»» publicKey string true none the public key

Status Code 400

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 404

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 405

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 500

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Get public key by derivation path

Code samples


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'

};

fetch('/casp/api/v1.0/mng/vaults/{vaultId}/derivation?derivationPath=string',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X GET /casp/api/v1.0/mng/vaults/{vaultId}/derivation?derivationPath=string \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer API_KEY'

GET /casp/api/v1.0/mng/vaults/{vaultId}/derivation

This endpoint is only functional if you generated a BIP32 vault.

Parameters

Name In Type Required Description
vaultId path string true Vault ID
derivationPath query string true Derivation path
encoding query string false Key encoding

Enumerated Values

Parameter Value
encoding DER
encoding compressed
encoding uncompressed
encoding plain

Example responses

200 Response

{
  "derivationPath": "string",
  "publicKey": "string"
}

Responses

Status Meaning Description Schema
200 OK OK Inline
400 Bad Request Bad request Inline
404 Not Found Item not found Inline
405 Method Not Allowed Incorrect vault type Inline
500 Internal Server Error Get derivation failed Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» derivationPath string true none the public derivation path
» publicKey string true none the public key

Status Code 400

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 404

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 405

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 500

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Get backup data for public key

Code samples


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'

};

fetch('/casp/api/v1.0/mng/vaults/{vaultId}/backup/{publicKey}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X GET /casp/api/v1.0/mng/vaults/{vaultId}/backup/{publicKey} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer API_KEY'

GET /casp/api/v1.0/mng/vaults/{vaultId}/backup/{publicKey}

The vault cryptographic material is backed up with a key that is external to the CASP system. The backup can be used for safe recovery of the vault in case of service failure, participants losing their shares, or termination of CASP usage.

This endpoint is only functional if you generated a BIP32 vault.

Parameters

Name In Type Required Description
vaultId path string true Vault ID
publicKey path string true public key

Example responses

200 Response

{
  "vaultId": "string",
  "backupData": "string",
  "bipLevel": 0,
  "cpar": "string",
  "parentFingerprint": "string",
  "childNumber": 0,
  "publicKey": "string"
}

Responses

Status Meaning Description Schema
200 OK OK Inline
404 Not Found Vault not found Inline
405 Method Not Allowed Incorrect vault type Inline
500 Internal Server Error Get vault backup data failed Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» vaultId string true none the vault ID
» backupData string true none The backup data, in encrypted form
» bipLevel integer(int32) true none derivation level
» cpar string true none CPar
» parentFingerprint string true none parent fingerprint
» childNumber integer(int32) true none child number
» publicKey string false none none

Status Code 404

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 405

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code

Status Code 500

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int32) true none Original HTTP status code