User Preferences
Save user preferences including theme customization, parental controls, and other personalization settings.Endpoint
Authentication
Request Body
User’s preferred accent/emphasis color in hexadecimal format.Used to customize the theme and UI elements throughout the application.Example:
"#FF5733", "#3498db"Enable or disable parental control features.
true: Enable content filtering for family-friendly viewingfalse: Disable parental controls
Response
Success Response
Status Code:200 OK
Always
true for successful requests.Updated user preferences object containing the saved settings.
Error Response
Status Code:401 Unauthorized or 500 Internal Server Error
Examples
Preference Details
Accent Color (enfasiscolor)
The accent color is used throughout the application to personalize the user interface:- Navigation highlights
- Button colors
- Link colors
- Progress indicators
- Interactive elements
The accent color should be provided in hexadecimal format (e.g.,
#FF5733). The application automatically adjusts contrast and generates complementary colors for optimal readability.Parental Control
When parental control is enabled:- Content Filtering: Mature-rated anime (R-17+, R+, Rx) are filtered from:
- Search results
- Homepage recommendations
- Trending lists
- Genre browsing
- Visual Indicators: Family-friendly content is prioritized
- Safe Browsing: Explicit content warnings are enforced
State Management Integration
Best Practices
- Debounce Updates: When updating colors with a color picker, debounce API calls to avoid excessive requests
- Optimistic Updates: Update UI immediately, then sync with backend
- Error Handling: Provide clear feedback when preference updates fail
- Validation: Validate hex colors client-side before sending to API
- Persistence: Store preferences in local state management for immediate access
Related Endpoints
- User Collections - Manage anime collections
- Upload Image - Upload profile images
