Skip to main content
The User API provides endpoints for managing user profiles, settings, authentication, and account linking.

getUserSettings

Get the current user’s settings including default currency and preferences.
await client.user.getUserSettings()

Parameters

No parameters required.

Response

Returns the user’s settings object.
userId
string
User ID
defaultCurrency
string
Default currency code for the user
createdAt
Date
Settings creation timestamp
updatedAt
Date
Last update timestamp

updateCurrency

Update the user’s default currency.
await client.user.updateCurrency({
  currency: "EUR"
})

Parameters

currency
CurrencyCode
required
New default currency code (e.g., “USD”, “EUR”, “GBP”)

Response

Returns the updated user settings object.

updateInfo

Update user profile information.
await client.user.updateInfo({
  name: "John Doe",
  image: profileImageFile // or image URL string
})

Parameters

name
string
required
User’s display name (cannot be empty)
image
File | string
Profile image as a File object or URL string. If a File is provided, it will be uploaded to blob storage.

Response

success
boolean
Returns true if the update was successful

updatePassword

Change the user’s password.
await client.user.updatePassword({
  oldPassword: "current-password",
  newPassword: "new-password"
})

Parameters

oldPassword
string
required
Current password (cannot be empty)
newPassword
string
required
New password (must meet password policy requirements)
The new password must meet the application’s password policy requirements.

Response

success
boolean
Returns true if the password was changed successfully

verifyEmail

Send a verification email to the user’s email address.
await client.user.verifyEmail()

Parameters

No parameters required. Uses the authenticated user’s email.

Response

success
boolean
Returns true if the verification email was sent successfully

listAccounts

List all linked authentication accounts for the user.
await client.user.listAccounts()

Parameters

No parameters required.

Response

Returns an array of linked account objects.
accounts
array
Array of linked account information
Each account object includes:
providerId
string
Authentication provider ID (e.g., “google”, “custom-oauth-provider”)
accountId
string
Account identifier with the provider
createdAt
Date
When the account was linked

linkAccount

Link a new authentication provider to the user’s account.
await client.user.linkAccount({
  providerId: "google"
})

Parameters

providerId
enum
required
Provider to link: google or custom-oauth-provider

Response

success
boolean
Returns true if linking was initiated successfully
redirectUrl
string
OAuth redirect URL for completing the linking process (if applicable)
After calling this endpoint, redirect the user to the provided redirectUrl to complete the OAuth flow. They will be redirected back to the account settings page.

unlinkAccount

Unlink an authentication provider from the user’s account.
await client.user.unlinkAccount({
  providerId: "google"
})

Parameters

providerId
enum
required
Provider to unlink: google or custom-oauth-provider

Response

success
boolean
Returns true if the account was unlinked successfully
Ensure the user has at least one authentication method remaining before unlinking an account.

deleteAccount

Permanently delete the user’s account and all associated data.
await client.user.deleteAccount({
  password: "user-password" // Required for email/password accounts
})

Parameters

password
string
User’s password (required for accounts with email/password credentials)

Response

success
boolean
Returns true if the account was deleted successfully
This action is irreversible and will permanently delete:
  • User profile and settings
  • All transactions
  • All bank accounts
  • All budgets
  • All custom categories
  • All linked accounts
The delete account feature must be enabled via feature flag. If disabled, users should contact support to delete their account.

TypeScript Types

type UserSettings = {
  userId: string
  defaultCurrency: CurrencyCode
  createdAt: Date
  updatedAt: Date
}

type UpdateInfoInput = {
  name: string
  image?: File | string
}

type UpdatePasswordInput = {
  oldPassword: string
  newPassword: string
}

type LinkAccountInput = {
  providerId: "google" | "custom-oauth-provider"
}

type UnlinkAccountInput = {
  providerId: "google" | "custom-oauth-provider"
}

type DeleteAccountInput = {
  password?: string
}

Build docs developers (and LLMs) love