> ## Documentation Index
> Fetch the complete documentation index at: https://docs.axon402.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Allocate to Wallet

> Vault → pocket internal USDC transfer (server-signed orgs only)

Allocates USDC from the organization vault to an agent pocket. This is the **Allocate from Vault** path — an internal transfer signed by the server on behalf of the vault.

> [!NOTE]
>
> This is a convenience alias for `POST /v1/orgs/:id/transfers/fund` scoped to a single wallet. The vault is resolved automatically from the wallet's organization.

> [!WARNING]
>
> **Server-signed orgs only.** This route requires the server to sign with the vault private key. In `browser` signing mode the server has no vault key, so the call returns `400 VAULT_ALLOCATION_UNAVAILABLE` — browser-signed orgs must use **Deposit to Wallet** (external on-chain transfer) instead. Check `funding.vault_allocation.available` on `GET /v1/wallets/:wallet_id` before calling this route.

The route path (`…/fund`) is preserved for backward compatibility. The user-facing action is "Allocate", not "Fund" — funding now refers specifically to external deposits.

## Request Body

| Field | Type | Required | Description |
| :- | :- | :- | :- |
| `amount_usdc` | `number` | Yes | Amount of USDC to transfer from vault to pocket |

```bash theme={null}
curl -X POST https://api.axon402.com/v1/wallets/$WALLET_ID/fund \
  -H "Authorization: Bearer $AXON_DECISION_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "amount_usdc": 10.00
  }'
```

## Response Fields

| Field | Type | Description |
| :- | :- | :- |
| `success` | `boolean` | Whether the transfer completed |
| `transfer_id` | `string` | UUID of the ledger transfer record |
| `settlement_mode` | `string` | `"gasless"` or `"self_funded"` |
| `tx_hash` | `string` | On-chain transaction hash |
| `from` | `string` | Vault wallet address |
| `to` | `string` | Pocket wallet address |
| `amount_usdc` | `number` | Amount transferred |
| `block_number` | `number` | Block in which the transaction was confirmed |
| `completed_at` | `string` | ISO 8601 timestamp of settlement |

## Errors

### `400 VAULT_ALLOCATION_UNAVAILABLE`

The target org is browser-signed; vault allocation is not available because the server holds no vault signer. Use **Deposit to Wallet** (external on-chain transfer to the pocket's address) instead.

```json theme={null}
{
  "code": "VAULT_ALLOCATION_UNAVAILABLE",
  "message": "Vault allocation requires a server-signed org. This org is browser-signed; use Deposit to Wallet instead.",
  "recoverable": false,
  "details": {
    "signing_mode": "browser",
    "alternative": "external_deposit"
  }
}
```

See [Error Codes](https://docs.axon402.com/docs/api-reference/error-codes.md#vault-allocation-unavailable) for the full enumeration.

### `404 NOT_FOUND`

`wallet_id` does not exist or the caller is not authorized for the organization that owns it.

## See also

* [Wallet Details](https://docs.axon402.com/docs/api-reference/treasury/get-wallet.md) — inspect `funding.vault_allocation.available` before calling this route
* [Allocate from Vault](https://docs.axon402.com/docs/api-reference/treasury/fund-pocket.md) — the org-scoped variant that accepts explicit vault + pocket ids
* [Deposit to Wallet](https://docs.axon402.com/docs/api-reference/treasury/get-wallet.md) — external on-chain funding path (universal; works in both signing modes)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.