Creates a new digital wallet account in the Accounts Service and persists it to theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Gianluca-X/DigitalMoney/llms.txt
Use this file to discover all available pages before exploring further.
Accounts table. Each account is associated with exactly one user and holds the CVU and alias generated during registration, along with a running balance. Under normal circumstances this endpoint is invoked automatically by the User Service as part of the registration flow using a pre-shared internal service token, but it can also be called directly by an authenticated user or by an admin-level JWT.
Endpoint
http://localhost:8085
Full URL: http://localhost:8085/accounts/create
Authentication
This endpoint accepts two forms of credentials:- Internal service token — pass the raw token value as the full
Authorizationheader value in the formatBearer <internalToken>. The Accounts Service compares the header against a configured secret (${internal.token}). This is the mechanism used by the User Service during registration. - User JWT — a standard Bearer token issued to an authenticated user. The service extracts the
emailclaim from the JWT to audit the request.
401 Unauthorized.
Request Body
The primary key of the
user record this account belongs to. Must reference
an existing user in the User Service.The user’s email address. Stored on the account for authorization checks
during subsequent operations (e.g., self-service deletion).
The unique human-readable alias generated for the user during registration
(e.g.,
sol.rio.mar).The unique 22-character Uniform Virtual Key generated for the user during
registration.
Optional starting balance for the account. Defaults to
0.00 if omitted.Response Fields
A successful request returns200 OK with an AccountResponse object.
The auto-generated primary key of the newly created account record.
The current balance of the account immediately after creation. Reflects the
initialBalance value from the request, or 0.00 if none was provided.Example
Request
Response
Under typical platform usage you do not need to call this endpoint
manually. When a user registers via
POST /users/register, the User Service
automatically calls POST /accounts/create using the internal service token.
The resulting accountId is then written back to the user record. Call this
endpoint directly only for administrative provisioning or testing purposes.Error Codes
| HTTP Status | Description |
|---|---|
400 Bad Request | The request body is malformed or a required field is missing. |
401 Unauthorized | No valid JWT or internal service token was provided. |
