TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/akevalion/life_cost/llms.txt
Use this file to discover all available pages before exploring further.
POST /add_wallet endpoint creates a new wallet and immediately links it to every existing user in the system. This means all registered users gain access to the new wallet as soon as it is created — no separate assignment step is required. The endpoint is protected by @login_required and accepts a JSON body describing the wallet.
Method & Path
Authentication
This endpoint requires an active login session. Requests without a valid session cookie are rejected and redirected to the login flow. Session cookies are issued automatically upon successful Google OAuth sign-in.Request Body
The request body must be valid JSON with theContent-Type: application/json header set.
The display name for the new wallet. Must be unique across all wallets in the database — a duplicate name will cause a database constraint error. Maximum 150 characters, as defined by the
Wallet.name column (db.String(150), unique=True, nullable=False).An optional human-readable description of the wallet’s purpose or contents. Omitting this field or passing
null is acceptable. Maximum 300 characters, as defined by the Wallet.description column (db.String(300)).Behavior
After inserting the newWallet row and committing the initial transaction, the handler queries all User records and appends the new wallet to each user’s wallets relationship. This relationship is backed by the user_wallet association table, which records the user_id, wallet_id, and a created_at timestamp for each pairing. A second db.session.commit() persists all of these associations in one batch.
Because all existing users are linked automatically, any user who is already registered at the time of wallet creation will see the new wallet appear in their wallet selector immediately — no further API calls are needed.
Example Request
Example Request Body
Example Response
Error Cases
| Status | Condition |
|---|---|
200 OK | Wallet created and associated with all users successfully. |
401 Unauthorized | The request was made without an authenticated session. The server redirects to the Google login flow. |
500 Internal Server Error | A database error occurred — most commonly a unique constraint violation if a wallet with the given name already exists. |