Returns the caller org's wallet accounts, newest first.
Returns the caller org's wallet accounts, newest first.
GET /v1/wallet/accounts
| Address | https://api.hanzo.ai/v1/wallet/accounts |
| Method | GET |
| Operation | get_wallet_accounts |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Returns the caller org's wallet accounts, newest first. Accounts are physically org-scoped, so another tenant's are not reachable from here.
Request
GET /v1/wallet/accounts takes no parameters and no body — the credential is the whole request.
Response
| Status | Body | Meaning |
|---|---|---|
200 | accountList | ok |
200 body — 5 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
accounts | body | WalletAccount[] | — | Accounts are the org's accounts, newest first. |
accounts[].createdAt | body | integer | — | CreatedAt is when the account was opened, Unix seconds. |
accounts[].id | body | string | — | ID is the account id, minted by the server as "acct_" + 24 hex. |
accounts[].name | body | string | — | Name is the label given at creation, trimmed and required. |
accounts[].org | body | string | — | Org is the tenant that owns the account, stamped from the validated principal rather than taken from the request. |
Failure carries the platform error shape — see Errors.
Examples
hanzo wallets accounts getimport { Configuration, WalletApi } from 'hanzoai';
const api = new WalletApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getWalletAccounts();from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import WalletApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = WalletApi(client).get_wallet_accounts()cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.WalletAPI.GetWalletAccounts(context.Background()).Execute()
if err != nil {
return err
}use hanzo_cloud::apis::{configuration::Configuration, wallet_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = wallet_api::get_wallet_accounts(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.WalletApi;
ApiClient client = new ApiClient();
client.setRequestInterceptor(b -> b.header("Authorization", "Bearer " + System.getenv("HANZO_API_KEY")));
var result = new WalletApi(client).getWalletAccounts();The method above is the one at the current release of the document. [email protected] (npm) and [email protected] (PyPI) were generated from an earlier release, where this operation carried a different id, so it spells the method differently — regenerating the clients is what makes the two agree. SDKs →
curl https://api.hanzo.ai/v1/wallet/accounts \
-H "Authorization: Bearer $HANZO_API_KEY"The door reaches wallet through the wallets tool, which names its 7 operations with its own verbs — this one among them, under a name only the door declares. describe explains any of them:
curl -X POST https://api.hanzo.ai/v1/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "describe",
"arguments": {
"op": "list_wallets"
}
}
}'How is this guide?