Create a wallet
Provisions a reusable address you can hand out repeatedly — for a customer balance, a recurring subscriber, or any long-lived deposit destination. Unlike a collection, an API wallet does not expire and accepts any number of deposits.
Supported networks
| Network | Identifier |
|---|---|
| Polygon | MATIC_MAINNET |
| Polygon Amoy (testnet) | MATIC_AMOY |
| BNB Smart Chain | BSC_MAINNET |
| Ethereum | ETHEREUM_MAINNET |
| Bitcoin | BITCOIN_MAINNET |
| Tron | TRON_MAINNET |
Body
Provide either network or networks — not both.
A single network identifier. Required unless networks is supplied.
One or more network identifiers, for an address usable across compatible
chains. Required unless network is supplied; must contain at least one
entry.
Sending network and networks in the same request is a validation error.
Pick one form.
Request
curl -X POST "https://api-prod.useknit.io/api/v1/wallets" \
-H "Authorization: Bearer $KNIT_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "network": "MATIC_MAINNET" }'curl -X POST "https://api-prod.useknit.io/api/v1/wallets" \
-H "Authorization: Bearer $KNIT_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "networks": ["MATIC_MAINNET", "BSC_MAINNET", "ETHEREUM_MAINNET"] }'Response
Returns 201 with the new wallet.
{
"statusCode": 201,
"message": "Wallet created successfully",
"data": {
"id": "d95143d2-c076-49da-b121-b3beed054bf3",
"businessId": "a2667393-2c6c-43c9-a288-6167e2b2b591",
"network": "MATIC_MAINNET",
"networkId": "MATIC_MAINNET",
"networks": ["MATIC_MAINNET"],
"address": "0x1adb0a39bde00fa0957e519584cb5c51fefcb37f",
"isActive": true,
"createdAt": "2024-02-26T13:59:19.000000Z",
"updatedAt": "2024-02-26T13:59:19.000000Z"
},
"success": true
}Use this in every subsequent wallet request.
The deposit address. Safe to display and reuse.
The wallet's primary network. When you supplied networks, this is the
first entry.
Every network the address is usable on.
What happens on a deposit
Deposits into an API wallet are recorded as
wallet transactions and credited to
your API account, so the funds are immediately available to
payouts. A
WALLET_FUNDING_SUCCESSFUL webhook is delivered for each confirmed deposit.
Errors
| Status | Cause |
|---|---|
401 | Missing or invalid token, IP not allow-listed, or missing wallets:write |
400 | Neither network nor networks was supplied, both were supplied, or a network identifier is not supported |