Profile
Manage your profile information and preferences.
Get Current User
Section titled “Get Current User”GET /api/v1/users/me
Section titled “GET /api/v1/users/me”Gets the current authenticated user’s profile.
Headers:
Authorization: Bearer eyJhbGci...Response (200 OK):
{ "userId": "usr_abc123", "email": "john@example.com", "name": "John Doe", "avatarUrl": "https://example.com/avatar.jpg", "role": "member", "status": "active", "preferences": { "theme": "dark", "timezone": "America/New_York", "notificationsEnabled": true, "defaultRegion": "us-east-1" }, "lastLoginAt": "2024-01-15T10:00:00Z", "createdAt": "2024-01-01T00:00:00Z", "updatedAt": "2024-01-15T10:00:00Z"}Update Profile
Section titled “Update Profile”PUT /api/v1/users/me
Section titled “PUT /api/v1/users/me”Updates the current user’s profile.
Request:
{ "name": "John D. Doe", "avatarUrl": "https://example.com/new-avatar.jpg"}| Field | Type | Required | Description |
|---|---|---|---|
name | string | No | Display name |
avatarUrl | string | No | URL to avatar image |
Response (200 OK): Returns updated user profile.
Update Preferences
Section titled “Update Preferences”PUT /api/v1/users/me/preferences
Section titled “PUT /api/v1/users/me/preferences”Updates user preferences.
Request:
{ "theme": "dark", "timezone": "America/Los_Angeles", "notificationsEnabled": false, "defaultRegion": "us-west-1"}| Field | Type | Description |
|---|---|---|
theme | string | UI theme: light, dark, or system |
timezone | string | IANA timezone (e.g., America/New_York) |
notificationsEnabled | boolean | Whether to receive email notifications |
defaultRegion | string | Default region for new databases |
Response (200 OK): Returns updated user profile.
Preference Options
Section titled “Preference Options”| Value | Description |
|---|---|
light | Light mode |
dark | Dark mode |
system | Follow system preference |
Timezone
Section titled “Timezone”Use IANA timezone identifiers:
America/New_York- Eastern TimeAmerica/Los_Angeles- Pacific TimeEurope/London- GMT/BSTEurope/Paris- Central European TimeAsia/Tokyo- Japan Standard TimeAustralia/Sydney- Australian Eastern Time
Default Region
Section titled “Default Region”Choose from any available region:
us-east- Newark, NJus-west- Fremont, CAeu-west- London, UKeu-central- Frankfurt, Germany- And more…
C# SDK Example
Section titled “C# SDK Example”var userResult = await client.Users.GetCurrentUserAsync();
if (userResult.IsSuccess){ var user = userResult.Value; Console.WriteLine($"Name: {user.Name}"); Console.WriteLine($"Email: {user.Email}"); Console.WriteLine($"Theme: {user.Preferences.Theme}"); Console.WriteLine($"Timezone: {user.Preferences.Timezone}");}var updateResult = await client.Users.UpdateCurrentUserAsync( new UpdateUserRequest( Name: "John D. Doe", AvatarUrl: "https://example.com/new-avatar.jpg" ));
if (updateResult.IsSuccess){ Console.WriteLine("Profile updated!");}var prefsResult = await client.Users.UpdatePreferencesAsync( new UpdateUserPreferencesRequest( Theme: "dark", Timezone: "America/Los_Angeles", NotificationsEnabled: false, DefaultRegion: "us-west-1" ));
if (prefsResult.IsSuccess){ Console.WriteLine("Preferences updated!");}Profile Fields
Section titled “Profile Fields”| Field | Type | Editable | Description |
|---|---|---|---|
userId | string | No | Unique user identifier |
email | string | No | Account email (contact support to change) |
name | string | Yes | Display name |
avatarUrl | string | Yes | Profile picture URL |
role | string | No | Role in current organization |
status | string | No | Account status |
preferences | object | Yes | User preferences |
lastLoginAt | datetime | No | Last login timestamp |
createdAt | datetime | No | Account creation date |
updatedAt | datetime | No | Last update timestamp |
User Status Values
Section titled “User Status Values”| Status | Description |
|---|---|
active | Account is fully operational |
pending | Email verification pending |
suspended | Account is suspended |
deleted | Account has been deleted |
Next Steps
Section titled “Next Steps”- Dashboard Settings - Manage settings from the UI
- Organizations - Manage team access
- MFA - Enable two-factor authentication