---
title: "Provision a managed wallet"
method: POST
path: "/createAgentWallet"
tags: ["Agent Wallet"]
---

# Provision a managed wallet

`POST /createAgentWallet`

## Request

- Base URL: `https://laso.finance`
- URL: `https://laso.finance/createAgentWallet`
- Auth: API key in header `Authorization`

Creates the Laso-custodied spend wallet for the account, or returns the existing one, as `walletId` and `address` (the Solana side) plus `baseWalletId` and `baseAddress` (the Base side). Idempotent. Most agents never call this: the wallet is provisioned when the human completes setup on the dashboard, and `getAgentWallet` creates a missing Base side.

A Firebase callable. Callables wrap the request in `{"data": ...}` and the reply in `{"result": ...}`. Send the `id_token` from `/auth` as a Bearer token. Free.

## Request body

- object
  - `data` object, required
    - `userId` string, required: The Laso user id (the `usr_...` value from /auth).

## Response `200`

The wallet id and address on Solana, plus the Base side's id and address.

- object
  - `result` object

## Other responses

- `400`: A required field is missing or invalid.
- `401`: Missing, invalid, or expired Bearer token.

---

[API](https://skmtc.dev/laso/apis/laso-finance-x402-api.md) · [All operations](https://skmtc.dev/laso/apis/laso-finance-x402-api/llms.txt) · [OpenAPI document](https://skmtc.dev/laso/apis/laso-finance-x402-api/revisions/ff8ce20b49ba?raw)
