Skip to main content

Users

Manage the authenticated user's profile and preferences.

Base Path: /api/v1/users Authentication: Required (Bearer Token) Tag: Users


Get Current User

Retrieve the authenticated user's profile and preferences.

GET /users/me

Response

{
"success": true,
"data": {
"id": "880e8400-e29b-41d4-a716-446655440000",
"email": "[email protected]",
"name": "John Doe",
"avatarUrl": "https://...",
"status": "active",
"lastLoginAt": "2025-01-15T09:00:00Z",
"createdAt": "2024-06-01T00:00:00Z",
"preference": {
"lastDocumentId": "550e8400-e29b-41d4-a716-446655440000",
"lastWorkspaceId": "660e8400-e29b-41d4-a716-446655440000",
"theme": "dark",
"sidebarCollapsed": false,
"locale": "en",
"notificationsEnabled": true
}
}
}

Response Type: ApiResponse<UserResponse>


Update Preferences

Update the authenticated user's preferences.

PUT /users/me/preferences

Request Body

{
"lastDocumentId": "550e8400-e29b-41d4-a716-446655440000",
"lastWorkspaceId": "660e8400-e29b-41d4-a716-446655440000",
"theme": "dark",
"sidebarCollapsed": true,
"locale": "vi",
"notificationsEnabled": false
}
FieldTypeRequiredValidationDescription
lastDocumentIdUUIDNo-Last viewed document
lastWorkspaceIdUUIDNo-Last viewed workspace
themeStringNolight, dark, or systemUI theme preference
sidebarCollapsedBooleanNo-Sidebar state
localeStringNoMax 10 charsLanguage locale
notificationsEnabledBooleanNo-Enable/disable notifications

Response Type: ApiResponse<UserResponse>