Fordefi API (0.2.0)

Download OpenAPI description
Languages
Servers
Production
https://api.fordefi.com/

Users

This resource collection represents users.

User types and roles

There are several types of user in the Fordefi platform:
  • Person: A human user of the platform. Only a person can have an admin role.
  • API User: An API client key that is trying to interact with the platform.See Create an API user and token.
  • API Signer: Used to auto-sign transactions. See Automate Signing with API Signer.
  • End user: For Consumer Wallets. It represents the user of a third-party platform.
In addition, for all users (except end users in WaaS solutions) there are three possible user roles, which define the permissions that the user is given:
  • Admin: A user with high privileges in the organization. Only admins have permission to manage the policy, set up the backup, manage the address book, and add or remove users in the organization. Only a person can have an admin role.
  • Trader: A user who can create vaults and transactions.
  • Viewer: A user who has full view of the organization's users, addresses, and policies, as well as of the vaults and transactions, but does not have permissions to create them.

Operations

Authorization Tokens

This resource collection represents authorization tokens.

These tokens allow end users to authenticate with Fordefi. Each end user can have a maximum of ten active authorization tokens at any time. Each token is valid for 24 hours only.

Instructions for creating an API user and token are provided here: Create an API user and token.

Operations

Blockchains

This resource collection represents blockchains.

Operations

Webhooks

This resource collection represents webhooks.

Use Webhooks describes how to configure webhooks, validate them, and resend them.

Operations

Address Book

This resource collection represents an address book.

Address Book is an object that represents a contact (saved blockchain address and its alias) in the platform. The Address Book object can either be queried directly or returned as part of a transaction.

Operations

Transactions

This resource collection represents a transaction.

A transaction is any object that can be signed cryptographically (with a private key).

In general, it can be one of the following types:

  • EVM Transaction: A native currency transfer or a smart contract call on an EVM-based chain.
  • EVM Message: In which a message is signed for off-chain use on an EVM-based chain.
  • Solana Transaction: A list of instructions to invoke on a Solana-based chain.
  • Cosmos Transaction: A transaction in the Cosmos ecosystem on Cosmos Hub or one of the supported app chains.
  • Black Box Signature: In which a payload is signed for use, external to the Fordefi platform.
  • Cosmos Message
  • Solana Message
For more information, see Transaction Types.

Monitor transactions

As transactions progress from creation through completion, they can follow several workflows, during which they take on various statuses. Status is returned in the state field of the Get Transaction and List Transaction requests.

For a list of possible statuses, see Transaction Lifecycle.

Operations

Batch Transactions

This resource collection represents a batch transaction.

Operations

Vaults

This resource collection represents a vault.

The vault is the basic unit to manage funds. A vault has a single public address but is multi-chain, meaning you can use it across all chains that are compatible with the address and are supported by Fordefi.

Operations

List Vaults

Request

Get a list of all vaults in an organization.

Query
sort_byArray of strings
Items Enum"created_at_asc""created_at_desc""name_asc""name_desc""vault_type_asc""vault_type_desc"
pageinteger>= 1

The page number to fetch.

Default 1
sizeinteger[ 0 .. 100 ]

The number of items per page.

Default 50
vault_idsArray of strings(uuid)

Vault IDs to filter on.

namesArray of strings

List of full names to filter on.

vault_typesArray of strings

Vault types to filter on.

Items Enum"aptos""black_box""cosmos""evm""solana""starknet""sui""ton""utxo""exchange"
vault_statesArray of strings

Vault states to filter on.

Items Enum"active""archived"
keyset_idsArray of strings(uuid)

List of keyset IDs to filter on.

key_holder_idsArray of strings(uuid)

List of key holder IDs to filter on.

vault_group_idsArray of strings(uuid)

List of vault group IDs to filter on. Filter applies to current and pending vault groups.

exclude_vault_group_idsArray of strings(uuid)

List of vault group IDs to exclude.

curl -i -X GET \
  'https://api.fordefi.com/api/v1/vaults?exclude_vault_group_ids=497f6eca-6276-4993-bfeb-53cbbbba6f08&key_holder_ids=497f6eca-6276-4993-bfeb-53cbbbba6f08&keyset_ids=497f6eca-6276-4993-bfeb-53cbbbba6f08&names=string&page=1&size=50&sort_by=created_at_asc&vault_group_ids=497f6eca-6276-4993-bfeb-53cbbbba6f08&vault_ids=497f6eca-6276-4993-bfeb-53cbbbba6f08&vault_states=active&vault_types=aptos' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Successful Response

Bodyapplication/json
totalintegerrequired
pageintegerrequired
sizeintegerrequired
vaultsArray of anyrequired
Response
application/json
{ "total": 0, "page": 0, "size": 0, "vaults": [ { … } ] }

Create Vault

Request

Create a new vault.

Bodyapplication/jsonrequired
namestringnon-emptyrequired

The name of the vault.

end_user_idstring(uuid)

The end user id to create a vault for.This field is required for end-user vault creation, otherwise, it's optional. If not provided, the organization's default keyset will be used.

vault_group_idstring(uuid)

The group to add this vault to. If not provided, the vault will be created in the Default vault group.

import_vaultobject

Additional information when creating a vault from an imported key. This field is relevant only for organizations using imported keys.

typestringrequired

Aptos vault type.

Discriminator
Value "aptos"
keyset_idstring(uuid)Deprecated
curl -i -X POST \
  https://api.fordefi.com/api/v1/vaults \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "string",
    "keyset_id": "0fd01f45-0fa7-45d1-9121-c431104386a5",
    "end_user_id": "c5ac076e-1e7a-4f0d-9ad4-cae618230def",
    "vault_group_id": "948d8050-0dde-409f-985b-6d7b133fc9e8",
    "import_vault": {
      "derivation_path": "m/44/60/0/0/0"
    },
    "type": "aptos"
  }'

Responses

Successful Response

Bodyapplication/json
idstring(uuid)required

The unique identifier of the object in the Fordefi platform.

created_atstring(date-time)required

The date and time when the object was created.

modified_atstring(date-time)required

The date and time when the object was last modified. Any change to any field of the resource is considered a modification.

metadataobject

Metadata in a form of map<str, bool | str | int | array[str]>.

namestringrequired

The name of the vault.

created_byUserRef (object) or UserRef (object) or UserRef (object) or UserRef (object) or UserRef (object)required
One of:

Details of the vault creator.

vault_groupobjectrequired

The vault group this vault belongs to.

pending_vault_group_actionany

Details of pending vault movement to another vault group.

statestringrequired

State of the vault.

Enum"active""archived"
public_key_compressedstringrequired

The public key of the vault in its compressed form:

  • For ECDSA and Schnorr keys, the public key is represented as 33 bytes (0x02 or 0x03 followed by the x-coordinate) according to the SEC1 standard.
  • For EdDSA, the public key is represented as a 32-byte value, as defined by RFC 8032.

Example: "SGVsbG8="
derivation_infoobjectrequired

The derivation info of the vault.

key_holderobject

The user who owns the keyset of the vault. If not provided, the vault is owned by the organization.

typestringrequired

Aptos vault type.

Discriminator
Value "aptos"
addressstring= 66 characters^0[xX][a-fA-F0-9]+$required

The address of the vault on Aptos chain types.

Example: "0x3300c18e7b931bdfc73dccf3e2d043ad1c9d120c777fff5aeeb9956224e5247a"
derivation_pathstringDeprecatedrequired

The BIP 44 derivation path of the vault.

Example: "m/44/60/0/0/0"
keysetobjectDeprecatedrequired

The keyset of the vault.

Response
application/json
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "created_at": "2019-08-24T14:15:22Z", "modified_at": "2019-08-24T14:15:22Z", "metadata": { "property1": [ … ], "property2": [ … ] }, "name": "string", "created_by": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "user_type": "person", "name": "John Doe", "email": "string", "state": "active", "role": "admin" }, "vault_group": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "vault_count": 0, "can_current_user_create_or_edit_vaults": true }, "pending_vault_group_action": { "type": "add", "vault_group_id": "948d8050-0dde-409f-985b-6d7b133fc9e8", "vault_group_name": "string" }, "state": "active", "derivation_path": "m/44/60/0/0/0", "public_key_compressed": "SGVsbG8=", "derivation_info": { "derivation_path": "m/44/60/0/0/0", "master_public_key": { … } }, "keyset": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "scope": "organization" }, "key_holder": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "user_type": "end_user", "external_id": "user|1234", "state": "active" }, "type": "aptos", "address": "0x3300c18e7b931bdfc73dccf3e2d043ad1c9d120c777fff5aeeb9956224e5247a" }

Export Vaults With Assets

Request

Get a CSV-format list of balances of all vaults and their assets.

Query
vaults_idsArray of strings(uuid)

Vault IDs to filter on.

vault_typesArray of strings

Vault types to filter on.

Items Enum"aptos""black_box""cosmos""evm""solana""starknet""sui""ton""utxo""exchange"
curl -i -X GET \
  'https://api.fordefi.com/api/v1/vaults/export?vault_types=aptos&vaults_ids=497f6eca-6276-4993-bfeb-53cbbbba6f08' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Exported vaults in CSV format

Bodytext/csv
string
Response
No content

Get Vault

Request

Retrieve vault details.

Path
idstring(uuid)required

ID of the vault to retrieve.

curl -i -X GET \
  'https://api.fordefi.com/api/v1/vaults/{id}' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Successful Response

Bodyapplication/json
idstring(uuid)required

The unique identifier of the object in the Fordefi platform.

created_atstring(date-time)required

The date and time when the object was created.

modified_atstring(date-time)required

The date and time when the object was last modified. Any change to any field of the resource is considered a modification.

metadataobject

Metadata in a form of map<str, bool | str | int | array[str]>.

namestringrequired

The name of the vault.

created_byUserRef (object) or UserRef (object) or UserRef (object) or UserRef (object) or UserRef (object)required
One of:

Details of the vault creator.

vault_groupobjectrequired

The vault group this vault belongs to.

pending_vault_group_actionany

Details of pending vault movement to another vault group.

statestringrequired

State of the vault.

Enum"active""archived"
public_key_compressedstringrequired

The public key of the vault in its compressed form:

  • For ECDSA and Schnorr keys, the public key is represented as 33 bytes (0x02 or 0x03 followed by the x-coordinate) according to the SEC1 standard.
  • For EdDSA, the public key is represented as a 32-byte value, as defined by RFC 8032.

Example: "SGVsbG8="
derivation_infoobjectrequired

The derivation info of the vault.

key_holderobject

The user who owns the keyset of the vault. If not provided, the vault is owned by the organization.

typestringrequired

Aptos vault type.

Discriminator
Value "aptos"
addressstring= 66 characters^0[xX][a-fA-F0-9]+$required

The address of the vault on Aptos chain types.

Example: "0x3300c18e7b931bdfc73dccf3e2d043ad1c9d120c777fff5aeeb9956224e5247a"
derivation_pathstringDeprecatedrequired

The BIP 44 derivation path of the vault.

Example: "m/44/60/0/0/0"
keysetobjectDeprecatedrequired

The keyset of the vault.

Response
application/json
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "created_at": "2019-08-24T14:15:22Z", "modified_at": "2019-08-24T14:15:22Z", "metadata": { "property1": [ … ], "property2": [ … ] }, "name": "string", "created_by": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "user_type": "person", "name": "John Doe", "email": "string", "state": "active", "role": "admin" }, "vault_group": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "vault_count": 0, "can_current_user_create_or_edit_vaults": true }, "pending_vault_group_action": { "type": "add", "vault_group_id": "948d8050-0dde-409f-985b-6d7b133fc9e8", "vault_group_name": "string" }, "state": "active", "derivation_path": "m/44/60/0/0/0", "public_key_compressed": "SGVsbG8=", "derivation_info": { "derivation_path": "m/44/60/0/0/0", "master_public_key": { … } }, "keyset": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "scope": "organization" }, "key_holder": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "user_type": "end_user", "external_id": "user|1234", "state": "active" }, "type": "aptos", "address": "0x3300c18e7b931bdfc73dccf3e2d043ad1c9d120c777fff5aeeb9956224e5247a" }

Get Vault Asset

Request

Get a specific asset in a vault.

Path
idstring(uuid)required

ID of the vault to retrieve.

asset_idstring(uuid)required

ID of the asset to retrieve.

Query
pageinteger>= 1

The page number to fetch.

Default 1
sizeinteger[ 0 .. 100 ]

The number of items per page.

Default 50
curl -i -X GET \
  'https://api.fordefi.com/api/v1/vaults/{id}/assets/{asset_id}?page=1&size=50' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Successful Response

Bodyapplication/json
assetAsset (object) or Asset (object) or Asset (object) or Asset (object) or Asset (object)
One of:
Deprecated
priced_assetobjectrequired
balancestring^\d+$required
Example: "1000000000000000000"
balancesobjectrequired

The cryptocurrency balances of the asset.

Response
application/json
{ "asset": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "decimals": 0, "price": { … }, "name": "string", "symbol": "string", "hidden": true, "verified": true, "asset_identifier": { … }, "metadata_uri": "string", "type": "cosmos_asset", "details": { … } }, "priced_asset": { "type": "asset_price", "asset_identifier": { … }, "asset_info": { … }, "price": { … } }, "balance": "1000000000000000000", "balances": { "mined": "1000000000000000000", "pending_incoming": "1000000000000000000" } }

Get Vault Assets

Request

Get a list of all assets in a vault.

Path
idstring(uuid)required

ID of the vault to retrieve.

Query
pageinteger>= 1

The page number to fetch.

Default 1
sizeinteger[ 0 .. 100 ]

The number of items per page.

Default 50
chainsArray of strings
asset_idsArray of strings(uuid)
is_hiddenboolean
searchstring
sort_byArray of strings
Items Enum"asset_name_asc""asset_name_desc""chain_identifier_asc""chain_identifier_desc""balance_asc""balance_desc""market_value_asc""market_value_desc""price_asc""price_desc"
curl -i -X GET \
  'https://api.fordefi.com/api/v1/vaults/{id}/assets?asset_ids=497f6eca-6276-4993-bfeb-53cbbbba6f08&chains=string&is_hidden=true&page=1&search=string&size=50&sort_by=asset_name_asc' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Successful Response

Bodyapplication/json
totalintegerrequired
pageintegerrequired
sizeintegerrequired
owned_assetsArray of objectsrequired
Response
application/json
{ "total": 0, "page": 0, "size": 0, "owned_assets": [ { … } ] }

Rename Vault

Request

Rename an existing vault.

Path
idstring(uuid)required

ID of the vault to rename.

Bodyapplication/jsonrequired
namestringnon-emptyrequired

The new name for the vault.

curl -i -X PUT \
  'https://api.fordefi.com/api/v1/vaults/{id}/name' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "string"
  }'

Responses

Successful Response

Response
No content

Create Address

Request

Create a new address.

Path
idstring(uuid)required

ID of the vault to create address in.

Bodyapplication/jsonrequired
namestringnon-empty

The name of the address.

address_typestring

The type of the address.

Default "segwit"
Enum"legacy""segwit""taproot"
import_addressobject

Additional information when creating an address from an imported key. This field is relevant only for organizations using imported keys.Imported addresses much be either of type LEGACY or SEGWIT.

curl -i -X POST \
  'https://api.fordefi.com/api/v1/vaults/{id}/addresses' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "string",
    "address_type": "legacy",
    "import_address": {
      "derivation_path": "m/44/60/0/0/0"
    }
  }'

Responses

Successful Response

Bodyapplication/json
idstring(uuid)required

The unique identifier of the object in the Fordefi platform.

created_atstring(date-time)required

The date and time when the object was created.

modified_atstring(date-time)required

The date and time when the object was last modified. Any change to any field of the resource is considered a modification.

vaultobjectrequired

The vault this address belongs to.

namestringrequired

The name of the address.

balancesobjectrequired

The balances of the address.

public_key_compressedstringrequired

The compressed public key of the address. As defined in the SEC1 standard: https://www.secg.org/SEC1-Ver-1.0.pdf.

Example: "SGVsbG8="
derivation_pathstringrequired

The BIP-32 derivation path of the address.

Example: "m/44/60/0/0/0"
typestringrequired

The type of the vault address.

Value "utxo"
addressobjectrequired

The address on the chain.

balancestringDeprecated^\d+$

The balance of the address.

Example: "1000000000000000000"
Response
application/json
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "created_at": "2019-08-24T14:15:22Z", "modified_at": "2019-08-24T14:15:22Z", "vault": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "address": "string", "state": "active", "type": "aptos", "logo_url": "http://example.com", "end_user": { … } }, "name": "string", "balance": "1000000000000000000", "balances": { "mined": "1000000000000000000", "pending_incoming": "1000000000000000000" }, "public_key_compressed": "SGVsbG8=", "derivation_path": "m/44/60/0/0/0", "type": "utxo", "address": { "address": "bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq", "address_type": "legacy", "chain": { … } } }

List Vault Addresses

Request

Get a list of all addresses in a vault.

Path
idstring(uuid)required

ID of the vault.

Query
sort_byArray of strings
Items Enum"created_at_asc""created_at_desc""name_asc""name_desc"
pageinteger>= 1

The page number to fetch.

Default 1
sizeinteger[ 0 .. 100 ]

The number of items per page.

Default 50
searchstring
addressesArray of strings

List of addresses to filter on.

address_typesArray of strings

List of address types to filter on.

Items Enum"legacy""p2sh""segwit""taproot"
curl -i -X GET \
  'https://api.fordefi.com/api/v1/vaults/{id}/addresses?address_types=legacy&addresses=string&page=1&search=string&size=50&sort_by=created_at_asc' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Successful Response

Bodyapplication/json
totalintegerrequired
pageintegerrequired
sizeintegerrequired
addressesArray of objectsrequired
Response
application/json
{ "total": 0, "page": 0, "size": 0, "addresses": [ { … } ] }

Rename Vault Address

Request

Rename an existing vault address.

Path
idstring(uuid)required

ID of the vault address to rename.

Bodyapplication/jsonrequired
namestringnon-emptyrequired

The new name for the vault.

curl -i -X PUT \
  'https://api.fordefi.com/api/v1/vaults/addresses/{id}/name' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "string"
  }'

Responses

Successful Response

Response
No content

Vault Groups

This resource collection represents a vault group.

Operations

Assets

This resource collection represents assets.

  • 'Assets', in general, refer to the assets that are supported by Fordefi and can be held by an organization. The Fetch Asset Prices API, for example, returns the current prices of all the assets that are recognized by the system.
  • 'Owned assets' reflects the balance of specific assets that are owned by an organization.

Operations

End Users

This resource collection represents end users.

End users are the users of a third-party app that embeds cryptographic technology provided by Fordefi. Each end user's mobile device can have a unique key-share, where Fordefi holds the matching key-share.

Operations

User Groups

This resource collection represents user groups.

Operations

Exports

This resource collection represents asynchronous export states.

Operations

Organizations

Operations