# Create accounts

URL: https://docs.hanzo.ai/docs/openapi/wallet/post-wallet-accounts

> Opens a named wallet account for the caller's org.

`POST /v1/wallet/accounts`

> [Wallet →](https://docs.hanzo.ai/docs/openapi/wallet) · [All API references →](https://docs.hanzo.ai/docs/openapi) · [Get started →](https://docs.hanzo.ai/docs/guides)

|               |                                           |
| ------------- | ----------------------------------------- |
| **Address**   | `https://api.hanzo.ai/v1/wallet/accounts` |
| **Method**    | `POST`                                    |
| **Operation** | `post_wallet_accounts`                    |
| **Auth**      | `Authorization: Bearer $HANZO_API_KEY`    |

Opens a named wallet account for the caller's org. An account is
a GROUPING of wallets, not a key or a balance: wallets are created under one
and can be listed by it. The org is stamped by the server from the validated
principal, so a request can never open an account in another tenant.

## Request

1 field, body `application/json` (required).

| Field  | In   | Type   | Required | Description                  |
| ------ | ---- | ------ | -------- | ---------------------------- |
| `name` | body | string | —        | Name is the account's label. |

## Response

| Status    | Body                 | Meaning |
| --------- | -------------------- | ------- |
| `200`     | wallet.WalletAccount | ok      |
| `default` | problem-details      | refused |

`200` body — 4 fields.

| Field       | In   | Type            | Always | Description                                                                                                       |
| ----------- | ---- | --------------- | ------ | ----------------------------------------------------------------------------------------------------------------- |
| `createdAt` | body | integer (int64) | —      | CreatedAt is when the account was opened, Unix seconds.                                                           |
| `id`        | body | string          | —      | ID is the account id, minted by the server as "acct\_" + 24 hex.                                                  |
| `name`      | body | string          | —      | Name is the label given at creation, trimmed and required.                                                        |
| `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](https://docs.hanzo.ai/docs/errors).

## Examples

**CLI**

```bash
hanzo wallet accounts create
```

**SDK**

**.ts**

```ts
import { Configuration, WalletApi } from 'hanzoai';

const api = new WalletApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.postWalletAccounts({ name: "<name>" });
```

**.py**

```python
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).post_wallet_accounts(name="<name>")
```

**.go**

```go
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.WalletAPI.PostWalletAccounts(context.Background()).Execute()
if err != nil {
	return err
}
```

**.rs**

```rust
use hanzo_client::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::post_wallet_accounts(&cfg, Default::default()).await?;
```

**.java**

```java
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.WalletApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new WalletApi(client).postWalletAccounts();
```

**HTTP**

```bash
curl -X POST https://api.hanzo.ai/v1/wallet/accounts \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
       "name": "<name>"
     }'
```

**MCP**

MCP reaches **wallet** through the `wallet` tool, which names its 7 operations with its own verbs — this one among them, under a name only MCP declares. `describe` explains any of them:

```bash
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"
         }
       }
     }'
```

---

[Wallet API](https://docs.hanzo.ai/docs/openapi/wallet) · [All Hanzo APIs](https://docs.hanzo.ai/docs/openapi) · [Interactive reference](https://docs.hanzo.ai/docs/openapi/reference)
