---
title: "Create a wallet (master account) or a sub-account"
method: POST
path: "/wallets"
---

# Create a wallet (master account) or a sub-account

`POST /wallets`

## Request

- Base URL: `https://getsanction.com/api/v1`
- URL: `https://getsanction.com/api/v1/wallets`
- Auth: none declared

Create a root wallet (unauthenticated sign-up), or — with parent_id plus the parent's x-mgmt-key — a sub-account in the account tree. Returns a management key once.

## Request body

- CreateWalletRequest
  - `name` string, required
  - `owner_email` string, email, required
  - `parent_id` string: Create as a sub-account under this wallet (account tree). Requires the parent's x-mgmt-key. Omit for a root wallet.

## Response `201`

Wallet created; management_key shown once

- CreateWalletResponse: management_key is shown once and never retrievable again.
  - `id` string
  - `name` string
  - `owner_email` string
  - `parent_id` string, nullable
  - `management_key` string: Owner key (sk_...). Store it now — shown once.
  - `management_key_prefix` string
  - `warning` string
  - `created_at` string, date-time

## Other responses

- `400`: Invalid request
- `401`: parent_id given but the management key is missing/invalid
- `409`: A wallet already exists for this email
- `429`: Root sign-up rate limit (per IP) exceeded

---

[API](https://skmtc.dev/getsanction/apis/sanction-agent-governance-api.md) · [All operations](https://skmtc.dev/getsanction/apis/sanction-agent-governance-api/llms.txt) · [OpenAPI document](https://skmtc.dev/getsanction/apis/sanction-agent-governance-api/revisions/c645a9e4b72d?raw)
