Skip to main content
POST
Create a Wallet

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Body

application/json

Platform-realm (OAuth2 client) wallet creation payload.

Integrators provision wallets for their end users via this surface. Unlike the tenant-realm payload, user_id is always required — the OAuth2 client acts on behalf of the platform itself, not a logged-in user.

user_id
string<uuid>
required

End-user UUID owning the wallet.

name
string
required

Human-readable label, unique per (tenant, user).

Required string length: 1 - 60
currency
string
default:USD

ISO 4217 currency code.

Required string length: 3
make_primary
boolean
default:false

If true, atomically demotes the existing primary wallet in (user, currency) and promotes this new one. The user's first wallet in a currency is always primary regardless of this flag.

idempotency_key
string | null

Optional client-provided idempotency key.

Required string length: 1 - 120

Response

Successful Response

Standard response wrapper for single-object responses and errors.

Generic over the payload type. A route that declares CommonResponse[SomeModel] gets the real data schema rendered in OpenAPI/Swagger; a bare CommonResponse leaves data untyped.

status_code
integer
required

HTTP status code for the response.

data
any
required

Payload or error details.

query_generated_time
integer
required

UTC timestamp (milliseconds since epoch) when response was generated.