Wallets

Add Wallet

Adds a wallet for the caller's own seat. You cannot add a wallet for another recipient with this call (admins use POST /bulkUploadMultipleWallets). The wallet starts PENDING and must pass a test transaction before it is VERIFIED. Only one active wallet per token/network pair is allowed (two when payout wallet allocation is on).

POSThttps://app.toku.com/api/tokuApi/v1/addWallet

This is the v1 (legacy) API. The current API is in the API reference.

curl --request POST \
  --url 'https://app.toku.com/api/tokuApi/v1/addWallet' \
  --header 'Authorization: Bearer <token>' \
  --header 'x-role-type: USER' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "Primary ETH Wallet",
  "walletAddress": "0x1234567890abcdef1234567890abcdef12345678",
  "network": "Ethereum",
  "orgNetworkID": "string",
  "walletTypeCustomID": "string",
  "tokenTypeID": "string",
  "destinationTag": 0,
  "nickName": "My Ledger",
  "twoFactorCode": "string"
}'
200 response
{
  "data": {
    "walletID": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  },
  "error": null
}

Authorizations

Authorizationstringheaderrequired

Bearer authentication header of the form Bearer <token>, where <token> is your API token.

Headers

x-role-typestringrequired

Seat role the token acts as. The token's creator must hold this role in the token's organization; TOKU_ADMIN and unknown values are refused with 401. This operation accepts USER, CLIENT_ORG_ADMIN, FINANCE_ADMIN, CLIENT_ORG_APPROVER and INVESTOR; other roles get 403. FINANCE_ADMIN and CLIENT_ORG_APPROVER seats are refused in new-system organizations.

Available options: USER, CLIENT_ORG_ADMIN, FINANCE_ADMIN, CLIENT_ORG_APPROVER, INVESTOR

Body

application/json

namestringrequired

Wallet name

walletAddressstringrequired

Wallet address. Leading/trailing whitespace is removed; whitespace inside is rejected.

networkstringrequired

Network name, e.g. Ethereum

orgNetworkIDstring

networkID of one of the organization's networks (GET /getNetworksNew)

walletTypeCustomIDstring

walletTypeID from GET /getWalletTypes

tokenTypeIDstring

Token type ID (GET /getTokenTypesNew). Required as a UUID when the organization uses per-token payout routing.

destinationTaginteger

XRPL destination tag

nickNamestring

Nickname

twoFactorCodestring

2FA code. Checked when the organization requires 2FA; required there on new-system organizations.

Response

200Wallet created
dataobjectrequired
Show child attributes
walletIDstring<uuid>required
errorobject | nullrequired

Always null on success

401The token is missing, invalid or expired
errorstringrequired

What went wrong

403The token's seat doesn't have the permission this operation needs
errorobjectrequired
Show child attributes
messagestringrequired
429Too many requests from this address or token. Wait for the number of seconds in the Retry-After header, then retry.
errorstringrequired

What went wrong

500The operation failed. This includes input that doesn't match what the operation accepts; error.message says what was wrong.
errorobjectrequired
Show child attributes
messagestringrequired
Was this page helpful? Suggest edits