> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.mitu.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.mitu.ai/_mcp/server.

# Create a wallet

POST https://api.mitu.ai/v1/customers/{id}/wallets
Content-Type: application/json

Create an Agent Wallet for a customer.

Reference: https://docs.mitu.ai/api-reference/agent-wallets/create-customer-wallet

## Authentication

- `x-api-key` header (required) — Account API key used to authenticate server-side requests. Use the credentials issued for the same environment as the API base URL.

## Servers

- `https://api.mitu.ai` (Production, default)
- `https://sandbox-api.mitu.ai` (Sandbox)

## Request

### Path parameters

- `id` (string, required) — Unique identifier of the resource.

### Headers

- `Idempotency-Key` (string, optional) — Unique key used to safely retry the same state-changing request.

### Body (application/json)

This endpoint expects a CreateWallet.

- `name` (string, required) — What the customer calls this pot. The agent names it when paying, so it should read the way the customer would say it.
- `limits` (WalletLimits, optional) — What an agent may spend from this wallet, in USD. Zero is an explicit "no limit"; an omitted field keeps whatever the wallet inherited.

## Response

### 201

Wallet created successfully.

- `message` (string, required)
- `data` (Wallet, required)

## Errors

### 400 Bad Request Error

The request is invalid and could not be processed.

- `message` (string, required) — Human-readable description of the error.

### 401 Unauthorized Error

Authentication failed because the API key is missing or invalid.

- `message` (string, required) — Human-readable description of the error.

### 403 Forbidden Error

The authenticated account is not allowed to perform this action.

- `message` (string, required) — Human-readable description of the error.

### 404 Not Found Error

The requested resource could not be found.

- `message` (string, required) — Human-readable description of the error.

### 422 Unprocessable Entity Error

One or more request fields are invalid.

- `message` (string, required)
- `errors` (list of ValidationErrorDetail, required)

### 429 Too Many Requests Error

Too many requests were sent in a short period.

- `message` (string, required) — Human-readable description of the error.

### 500 Internal Server Error

An unexpected error occurred while processing the request.

- `message` (string, required) — Human-readable description of the error.

### 503 Service Unavailable Error

The service is temporarily unavailable.

- `message` (string, required) — Human-readable description of the error.

## Types

### WalletLimits

What an agent may spend from this wallet, in USD. Zero is an explicit "no limit"; an omitted field keeps whatever the wallet inherited.

- `per_payment` (double, optional) — Most one payment may be. Above it, the payment is held for approval.
- `session` (double, optional) — Most the agent may spend in one session. A session is currently the clock hour (UTC).
- `daily` (double, optional) — Most the wallet may spend in a UTC day.
- `monthly` (double, optional) — Most the wallet may spend in a calendar month (UTC).
- `approve_above` (double, optional) — Above this, a payment waits for the customer to approve it.
- `currency` (string, optional)

### Wallet

- `id` (string, optional)
- `customer_id` (string, optional)
- `name` (string, optional)
- `currency` (string, optional)
- `status` (enum, optional) — `frozen` stops the agent spending from the wallet. Deposits still credit.
  - Allowed values: `active`, `frozen`
- `frozen_at` (datetime, optional, nullable) — When the wallet was frozen. `null` while active.
- `frozen_reason` (string, optional, nullable) — The reason given when freezing. `null` while active.
- `balance` (WalletBalance, optional) — What the wallet holds, in the wallet's own currency. Amounts are strings so a balance is never rounded by a JSON number.
- `limits` (WalletLimits, optional) — What an agent may spend from this wallet, in USD. Zero is an explicit "no limit"; an omitted field keeps whatever the wallet inherited.
- `created_at` (datetime, optional)

### ValidationErrorDetail

- `field` (string, required) — Field that failed validation.
- `message` (string, required) — Description of the validation problem.

### WalletBalance

What the wallet holds, in the wallet's own currency. Amounts are strings so a balance is never rounded by a JSON number.

- `total` (string, required) — The wallet's total balance across every network.
- `by_chain` (map from string to string, required) — The same balance broken down by network.

## Examples

**Request**

```json
{
  "name": "Travel",
  "limits": {
    "per_payment": 25,
    "session": 50,
    "daily": 100,
    "monthly": 200,
    "approve_above": 50
  }
}
```

**Response**

```json
{
  "message": "Wallet created successfully",
  "data": {
    "id": "wal_65286515b43d4e3eba93",
    "customer_id": "cus_0t9549fps3xd",
    "name": "Travel",
    "currency": "USDC",
    "status": "active",
    "frozen_at": null,
    "frozen_reason": null,
    "balance": {
      "total": "12.500000",
      "by_chain": {
        "base": "12.500000",
        "solana": "0",
        "tempo": "0"
      }
    },
    "limits": {
      "per_payment": 25,
      "session": 50,
      "daily": 100,
      "monthly": 200,
      "approve_above": 50,
      "currency": "USD"
    },
    "created_at": "2026-09-11T00:32:58.292Z"
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.mitu.ai/v1/customers/id/wallets"

payload = {
    "name": "Travel",
    "limits": {
        "per_payment": 25,
        "session": 50,
        "daily": 100,
        "monthly": 200,
        "approve_above": 50
    }
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.mitu.ai/v1/customers/id/wallets';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"name":"Travel","limits":{"per_payment":25,"session":50,"daily":100,"monthly":200,"approve_above":50}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.mitu.ai/v1/customers/id/wallets"

	payload := strings.NewReader("{\n  \"name\": \"Travel\",\n  \"limits\": {\n    \"per_payment\": 25,\n    \"session\": 50,\n    \"daily\": 100,\n    \"monthly\": 200,\n    \"approve_above\": 50\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("x-api-key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.mitu.ai/v1/customers/id/wallets")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"Travel\",\n  \"limits\": {\n    \"per_payment\": 25,\n    \"session\": 50,\n    \"daily\": 100,\n    \"monthly\": 200,\n    \"approve_above\": 50\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.mitu.ai/v1/customers/id/wallets")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"Travel\",\n  \"limits\": {\n    \"per_payment\": 25,\n    \"session\": 50,\n    \"daily\": 100,\n    \"monthly\": 200,\n    \"approve_above\": 50\n  }\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.mitu.ai/v1/customers/id/wallets', [
  'body' => '{
  "name": "Travel",
  "limits": {
    "per_payment": 25,
    "session": 50,
    "daily": 100,
    "monthly": 200,
    "approve_above": 50
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.mitu.ai/v1/customers/id/wallets");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": \"Travel\",\n  \"limits\": {\n    \"per_payment\": 25,\n    \"session\": 50,\n    \"daily\": 100,\n    \"monthly\": 200,\n    \"approve_above\": 50\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "name": "Travel",
  "limits": [
    "per_payment": 25,
    "session": 50,
    "daily": 100,
    "monthly": 200,
    "approve_above": 50
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.mitu.ai/v1/customers/id/wallets")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```