# Fordefi API
Version: 0.2.0
## Servers
Production
```
https://api.fordefi.com/
```
## Security
### bearerAuth
Type: http
Scheme: bearer
Bearer Format: JWT
## Download OpenAPI description
[Fordefi API](https://docs.fordefi.com/_spec/api/@latest/openapi.yaml)
## Users
These endpoints allow you to get information about users in your Fordefi organization.
There are several types of users in the Fordefi platform:
- **Person**: A human user of the platform.
- **API User**, also commonly known as a service account.
See [Create an API user](https://docs.fordefi.com/developers/getting-started/create-an-api-user).
- **API Signer**: Used to auto-sign transactions.
See [Automate Signing with API Signer](https://docs.fordefi.com/developers/getting-started/set-up-an-api-signer).
Users can have one of three possible 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 or modify them.
The Users API is currently read-only. To add/remove users, visit the Fordefi web console.
### List Users
- [GET /api/v1/users](https://docs.fordefi.com/api/latest/openapi/users/list_users_api_v1_users_get.md): Get a list of users in the organization.
### Get User
- [GET /api/v1/users/{id}](https://docs.fordefi.com/api/latest/openapi/users/get_user_api_v1_users__id__get.md): Gets the user that corresponds to the given ID.
## Authorization Tokens
These endpoints allow you to manage end-user authorization tokens used for Fordefi's WaaS solution.
Authorization tokens allow end users to authenticate with Fordefi. Each end user can have a maximum of ten active authorization tokens at any time.
More information on authenticating end users is provided in the WaaS developer guide.
### Issue Authorization Token
- [POST /api/v1/authorization-tokens](https://docs.fordefi.com/api/latest/openapi/authorization-tokens/issue_authorization_token_api_v1_authorization_tokens_post.md): Issue authorization token for an end user.
### List Authorization Tokens
- [GET /api/v1/authorization-tokens](https://docs.fordefi.com/api/latest/openapi/authorization-tokens/list_authorization_tokens_api_v1_authorization_tokens_get.md): List authorization tokens of end users.
### Delete Authorization Token
- [DELETE /api/v1/authorization-tokens/{id}](https://docs.fordefi.com/api/latest/openapi/authorization-tokens/delete_authorization_token_api_v1_authorization_tokens__id__delete.md): Delete authorization token of an end user.
## Blockchains
These endpoints allow you to get information about blockchains supported by Fordefi.
### List Chains
- [GET /api/v1/blockchains](https://docs.fordefi.com/api/latest/openapi/blockchains/list_chains_api_v1_blockchains_get.md): Get a list of supported blockchains.
### Get Suggested Fees
- [GET /api/v1/blockchains/suggested-fees](https://docs.fordefi.com/api/latest/openapi/blockchains/get_suggested_fees_api_v1_blockchains_suggested_fees_get.md): Get the suggested fees in a specific network.
## Webhooks
These endpoints allow you to manually trigger your pre-configured webhooks.
Use Webhooks describes how to configure webhooks, validate them, and resend them.
There are two webhook types. Webhook V1 and Webhook V2.
- Webhook V1 contains minimal details about the transaction. It is deprecated and will be removed in the future. It is recommended to use Webhook V2 instead.
- Webhook V2 delivers the full set of details about the transaction as retrieved by a call to the Get Transaction endpoint.
### Test Webhook
- [POST /api/v1/webhooks/test](https://docs.fordefi.com/api/latest/openapi/webhooks/test_webhook_api_v1_webhooks_test_post.md): Test a webhook.
### Trigger Transaction Webhook
- [POST /api/v1/webhooks/trigger/transaction/{id}](https://docs.fordefi.com/api/latest/openapi/webhooks/trigger_transaction_webhook_api_v1_webhooks_trigger_transaction__id__post.md): Trigger transaction create and latest state via webhooks.
## Address Book
These endpoints allow you to list the contacts in your address book.
To add/remove contacts, visit the Fordefi web console. See the user guide for more info.
### Create Contact
- [POST /api/v1/addressbook/contacts](https://docs.fordefi.com/api/latest/openapi/address-book/create_contact_api_v1_addressbook_contacts_post.md): Create a new address book contact in an organization.
### List Contacts
- [GET /api/v1/addressbook/contacts](https://docs.fordefi.com/api/latest/openapi/address-book/list_contacts_api_v1_addressbook_contacts_get.md): Get a list of all contacts in an organization.
### Abort Contact
- [POST /api/v1/addressbook/contacts/{id}/proposals/{proposal_id}/abort](https://docs.fordefi.com/api/latest/openapi/address-book/abort_contact_api_v1_addressbook_contacts__id__proposals__proposal_id__abort_post.md): Abort a contact change proposal.
### Edit Contact
- [POST /api/v1/addressbook/contacts/{id}/proposals](https://docs.fordefi.com/api/latest/openapi/address-book/edit_contact_api_v1_addressbook_contacts__id__proposals_post.md): Edit address book contact.
## Transactions
These endpoints allow you to manage transactions on the Fordefi platform.
A transaction represents an operation that can be one of the following:
- An on-chain action that modifies blockchain state
- An off-chain cryptographically signed message or data
Consult the developer guide for more information on
creating,
monitoring,
and simulating tranasctions.
### Export Transactions
- [GET /api/v1/transactions/export](https://docs.fordefi.com/api/latest/openapi/transactions/export_transactions_api_v1_transactions_export_get.md): Start the export process for filtered transactions
### Get Transaction
- [GET /api/v1/transactions/{id}](https://docs.fordefi.com/api/latest/openapi/transactions/get_transaction_api_v1_transactions__id__get.md): Retrieve transaction details.
### List Transactions
- [GET /api/v1/transactions](https://docs.fordefi.com/api/latest/openapi/transactions/list_transactions_api_v1_transactions_get.md): Get a list of all transactions in an organization.
### Create Transaction
- [POST /api/v1/transactions](https://docs.fordefi.com/api/latest/openapi/transactions/create_transaction_api_v1_transactions_post.md): Create a new transaction.
### Create Transaction And Wait
- [POST /api/v1/transactions/create-and-wait](https://docs.fordefi.com/api/latest/openapi/transactions/create_transaction_and_wait_api_v1_transactions_create_and_wait_post.md): Create a new transaction and wait until transaction reaches given state.
### Approve Transaction
- [POST /api/v1/transactions/{id}/approve](https://docs.fordefi.com/api/latest/openapi/transactions/approve_transaction_api_v1_transactions__id__approve_post.md): Approve a transaction.
A transaction awaits approval when the caller API user has been specified as a
potential approver in the policy and the transaction
is in the state.
### Abort Transaction
- [POST /api/v1/transactions/{id}/abort](https://docs.fordefi.com/api/latest/openapi/transactions/abort_transaction_api_v1_transactions__id__abort_post.md): Abort a transaction.
Abort is possible only for a transaction that is in one of the following states:
Waiting for approval
Approved
The aborting user must be one of the following:
The user who created the transaction
An admin
A legitimate approver
API users can abort only the transactions they created.
### Release Transaction
- [POST /api/v1/transactions/{id}/release](https://docs.fordefi.com/api/latest/openapi/transactions/release_transaction_api_v1_transactions__id__release_post.md): Release a transaction.
### Predict Transaction
- [POST /api/v1/transactions/predict](https://docs.fordefi.com/api/latest/openapi/transactions/predict_transaction_api_v1_transactions_predict_post.md): Simulate the transaction and changes in token
balances, in addition to the fee estimation.
### Push Transaction
- [POST /api/v1/transactions/{id}/push](https://docs.fordefi.com/api/latest/openapi/transactions/push_transaction_api_v1_transactions__id__push_post.md): Push an existing signed transaction to the chain. The transaction must
have been previously created with a flag and must now
be in state .
### Update Transaction Spam State
- [PUT /api/v1/transactions/{id}/update-spam-state](https://docs.fordefi.com/api/latest/openapi/transactions/update_transaction_spam_state_api_v1_transactions__id__update_spam_state_put.md): Update transaction's spam state.
### Trigger Transaction Signing
- [POST /api/v1/transactions/{id}/trigger-signing](https://docs.fordefi.com/api/latest/openapi/transactions/trigger_transaction_signing_api_v1_transactions__id__trigger_signing_post.md): Trigger transaction signing.
## Batch Transactions
These endpoints allow you to manage batch transactions on the Fordefi platform.
Batch transactions are currently supported only on Solana, for the purpose
of supporting the `signAllTransactions` flow used by certain Solana DApps.
Batch transactions undergo policy evaluation as a whole: the policy is
applied to a “virtual transaction” whose list of instructions is the union
of the instructions of the individual transactions in the batch, and whose balance
changes are the aggregation of balance changes of the individual transactions.
### Create Batch Transaction
- [POST /api/v1/batch-transactions](https://docs.fordefi.com/api/latest/openapi/batch-transactions/create_batch_transaction_api_v1_batch_transactions_post.md): Create a batch of transactions.
Batch transactions are currently supported only on Solana.
### Predict Batch Transaction
- [POST /api/v1/batch-transactions/predict](https://docs.fordefi.com/api/latest/openapi/batch-transactions/predict_batch_transaction_api_v1_batch_transactions_predict_post.md): Simulate the batch of transactions and show changes in
token balances, in addition to the fee estimation
Batch transactions are currently supported only on Solana.
### Abort Batch Transaction
- [POST /api/v1/batch-transactions/{batch_id}/abort](https://docs.fordefi.com/api/latest/openapi/batch-transactions/abort_batch_transaction_api_v1_batch_transactions__batch_id__abort_post.md): Abort a batch of transactions.
### Approve Batch Transaction
- [POST /api/v1/batch-transactions/{batch_id}/approve](https://docs.fordefi.com/api/latest/openapi/batch-transactions/approve_batch_transaction_api_v1_batch_transactions__batch_id__approve_post.md): Approve a batch of transactions.
## Vaults
These endpoints allow you to manage vaults.
A vault is the basic unit to manage funds.
Each vault supports a single "chain family", such as EVM, Bitcoin, Solana, Cosmos, etc.,
determined by the vault's type. A vault supports all the chains within the chain family
(e.g., an EVM vault supports all EVM chains).
### List Vaults
- [GET /api/v1/vaults](https://docs.fordefi.com/api/latest/openapi/vaults/list_vaults_api_v1_vaults_get.md): Get a list of all vaults in an organization.
### Create Vault
- [POST /api/v1/vaults](https://docs.fordefi.com/api/latest/openapi/vaults/create_vault_api_v1_vaults_post.md): Create a new vault.
### Export Vaults With Assets
- [GET /api/v1/vaults/export](https://docs.fordefi.com/api/latest/openapi/vaults/export_vaults_with_assets_api_v1_vaults_export_get.md): Get a CSV-format list of balances of all vaults and their assets.
### Get Vault
- [GET /api/v1/vaults/{id}](https://docs.fordefi.com/api/latest/openapi/vaults/get_vault_api_v1_vaults__id__get.md): Retrieve vault details.
### Get Vault Asset
- [GET /api/v1/vaults/{id}/assets/{asset_id}](https://docs.fordefi.com/api/latest/openapi/vaults/get_vault_asset_api_v1_vaults__id__assets__asset_id__get.md): Get a specific asset in a vault.
### Get Vault Assets
- [GET /api/v1/vaults/{id}/assets](https://docs.fordefi.com/api/latest/openapi/vaults/get_vault_assets_api_v1_vaults__id__assets_get.md): Get a list of all assets in a vault.
### Archive Vault
- [POST /api/v1/vaults/{id}/archive](https://docs.fordefi.com/api/latest/openapi/vaults/archive_vault_api_v1_vaults__id__archive_post.md): Archive an existing vault.
### Restore Vault
- [POST /api/v1/vaults/{id}/restore](https://docs.fordefi.com/api/latest/openapi/vaults/restore_vault_api_v1_vaults__id__restore_post.md): Restore an archived vault.
### Rename Vault
- [PUT /api/v1/vaults/{id}/name](https://docs.fordefi.com/api/latest/openapi/vaults/rename_vault_api_v1_vaults__id__name_put.md): Rename an existing vault.
### Create Address
- [POST /api/v1/vaults/{id}/addresses](https://docs.fordefi.com/api/latest/openapi/vaults/create_address_api_v1_vaults__id__addresses_post.md): Create a new address.
### List Vault Addresses
- [GET /api/v1/vaults/{id}/addresses](https://docs.fordefi.com/api/latest/openapi/vaults/list_vault_addresses_api_v1_vaults__id__addresses_get.md): Get a list of all addresses in a vault.
### Rename Vault Address
- [PUT /api/v1/vaults/addresses/{id}/name](https://docs.fordefi.com/api/latest/openapi/vaults/rename_vault_address_api_v1_vaults_addresses__id__name_put.md): Rename an existing vault address.
## Vault Groups
These endpoints allow you to view your vault groups.
Vault Groups are used to collectively manage policies and view permissions for a group of vaults.
The API is read-only. To manage vault groups, visit the Fordefi web console. See more info in the
user guide.
### List Vault Groups
- [GET /api/v1/vault-groups](https://docs.fordefi.com/api/latest/openapi/vault-groups/list_vault_groups_api_v1_vault_groups_get.md): Get a list of vault groups in the organization.
## Assets
These endpoints allow you to get information about the assets in your organization,
including metadata, balances, and prices.
Fordefi supports native assets and fungible tokens on each of the supported blockchains,
and on many chains also non-fungible tokens.
Assets are chain-specific, meaning that USDC on Ethereum is different from USDC on Polygon.
### Get Owned Asset
- [GET /api/v1/assets/owned-assets/{id}](https://docs.fordefi.com/api/latest/openapi/assets/get_owned_asset_api_v1_assets_owned_assets__id__get.md): Get a a specific asset owned by an organization.
### List Owned Assets
- [GET /api/v1/assets/owned-assets](https://docs.fordefi.com/api/latest/openapi/assets/list_owned_assets_api_v1_assets_owned_assets_get.md): Get a list of all assets owned by an organization.
### Update Asset Configuration
- [PUT /api/v1/assets](https://docs.fordefi.com/api/latest/openapi/assets/update_asset_configuration_api_v1_assets_put.md): Update the asset's configuration under the entire organization.
### Fetch Asset Prices
- [POST /api/v1/assets/prices](https://docs.fordefi.com/api/latest/openapi/assets/fetch_asset_prices_api_v1_assets_prices_post.md): Fetch the prices of assets.
### Create Asset Info
- [POST /api/v1/assets/asset-infos](https://docs.fordefi.com/api/latest/openapi/assets/create_asset_info_api_v1_assets_asset_infos_post.md): Create asset infos in the Fordefi platform.
## End Users
These endpoints allow you to manage WaaS end-users.
End users correspond to users of the platform who has integrated the Fordefi WaaS solution.
For example, in the case of a retail platform, these would be the retail consumers of the platform.
### List End Users
- [GET /api/v1/end-users](https://docs.fordefi.com/api/latest/openapi/end-users/list_end_users_api_v1_end_users_get.md): Get a list of end users in the organization.
### Create End User
- [POST /api/v1/end-users](https://docs.fordefi.com/api/latest/openapi/end-users/create_end_user_api_v1_end_users_post.md): Create a new end user.
### Get Current End User
- [GET /api/v1/end-users/current](https://docs.fordefi.com/api/latest/openapi/end-users/get_current_end_user_api_v1_end_users_current_get.md): Gets the current end user.
### Get End User
- [GET /api/v1/end-users/{id}](https://docs.fordefi.com/api/latest/openapi/end-users/get_end_user_api_v1_end_users__id__get.md): Gets the end user that corresponds to the given ID.
### Delete End User
- [DELETE /api/v1/end-users/{id}](https://docs.fordefi.com/api/latest/openapi/end-users/delete_end_user_api_v1_end_users__id__delete.md): Delete an end user.
### Set Export End User Keys Permissions
- [PUT /api/v1/end-users/{id}/set-export-end-user-keys-permissions](https://docs.fordefi.com/api/latest/openapi/end-users/set_export_end_user_keys_permissions_api_v1_end_users__id__set_export_end_user_keys_permissions_put.md): Allow or disable export of a keyset for an end user.
## User Groups
These endpoints allow you to view your user groups.
User Groups are used to collectively manage policies and view permissions for a group of users.
The API is read-only. To manage user groups, visit the Fordefi web console. See more info in the
user guide.
### List User Groups
- [GET /api/v1/user-groups](https://docs.fordefi.com/api/latest/openapi/user-groups/list_user_groups_api_v1_user_groups_get.md): Get a list of user groups
### Get User Group
- [GET /api/v1/user-groups/{id}](https://docs.fordefi.com/api/latest/openapi/user-groups/get_user_group_api_v1_user_groups__id__get.md): Retrieve user group details
## Audit Log
These endpoints allow you to manage audit logs.
Audit logs are used to track the actions of users in your organization.
### List Audit Log Records
- [GET /api/v1/audit-log](https://docs.fordefi.com/api/latest/openapi/audit-log/list_audit_log_records_api_v1_audit_log_get.md): Get a list of audit log records.
### Export Audit Log
- [GET /api/v1/audit-log/export](https://docs.fordefi.com/api/latest/openapi/audit-log/export_audit_log_api_v1_audit_log_export_get.md): Get a CSV-format list of audit log records.
## Exports
These endpoints allow you to manage asynchronous actions such as data exports.
### Get Export
- [GET /api/v1/exports/{id}](https://docs.fordefi.com/api/latest/openapi/exports/get_export_api_v1_exports__id__get.md): Get an export by ID
### Abort Export
- [POST /api/v1/exports/{id}/abort](https://docs.fordefi.com/api/latest/openapi/exports/abort_export_api_v1_exports__id__abort_post.md): Abort an export by ID
## Swaps
These endpoints allow you to manage swaps.
### Get Provider Ids
- [GET /api/v1/swaps/provider-ids/{chain_type}](https://docs.fordefi.com/api/latest/openapi/swaps/get_provider_ids_api_v1_swaps_provider_ids__chain_type__get.md): Get provider ids for a chain type.
### Get Quotes
- [POST /api/v1/swaps/quotes](https://docs.fordefi.com/api/latest/openapi/swaps/get_quotes_api_v1_swaps_quotes_post.md): Get available quotes for a swap between two assets.
### Create Transaction
- [POST /api/v1/swaps](https://docs.fordefi.com/api/latest/openapi/swaps/create_transaction_api_v1_swaps_post.md): Create a new spot swap.
### Predict Transaction
- [POST /api/v1/swaps/predict](https://docs.fordefi.com/api/latest/openapi/swaps/predict_transaction_api_v1_swaps_predict_post.md): Simulate the spot swap and changes in token
balances, in addition to the fee estimation.
## Organizations
### Import Keys
- [POST /api/v1/organizations/import-keys](https://docs.fordefi.com/api/latest/openapi/organizations/import_keys_api_v1_organizations_import_keys_post.md): Imports keys for an organization.
### Abort Import Keys
- [POST /api/v1/organizations/abort-import-keys](https://docs.fordefi.com/api/latest/openapi/organizations/abort_import_keys_api_v1_organizations_abort_import_keys_post.md): Aborts the import keys process for an organization.
### Get Import Keys Status
- [GET /api/v1/organizations/import-keys-status](https://docs.fordefi.com/api/latest/openapi/organizations/get_import_keys_status_api_v1_organizations_import_keys_status_get.md): Gets the import keys status for an organization.
### List Keys
- [GET /api/v1/organizations/list-keys](https://docs.fordefi.com/api/latest/openapi/organizations/list_keys_api_v1_organizations_list_keys_get.md): Lists the imported keys for an organization.