put__settings_user
PUT /settings/user
Partial Update User Settings
Partially update the current user's settings. This endpoint allows updating specific settings keys while preserving existing values for keys not included in the request. The user must be authenticated.
Request Body Schema
» [key: string]
any
false
none
Partial settings object with key-value pairs to update
TypeScript Client Library
// Using the Flashback TypeScript client
import { FlashbackClient } from '@flashback/client';
const client = new FlashbackClient({ accessToken: 'your-access-token' });
// Partially update user settings
try {
const result = await client.settings.user.partialUpdate({
theme: 'light',
notifications: { email: false }
});
console.log('User settings partially updated:', result);
} catch (error) {
console.error('Failed to partially update user settings:', error);
}
Code Samples
# You can also use wget
curl -X PUT https://backend.flashback.tech/settings/user \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/json' \
-d '{
"theme": "light",
"notifications": {
"email": false
}
}'
Example responses
200 Response
{
"success": true,
"message": "User settings partially updated successfully"
}
400 Response
{
"success": false,
"message": "Failed to partially update user settings"
}
500 Response
{
"success": false,
"message": "Internal server error",
"error": "Database connection failed"
}
Responses
Response Schema
Status Code 200
» success
boolean
true
none
Indicates if the request was successful
» message
string
true
none
Success message describing the operation
Status Code 400
» success
boolean
true
none
Always false for error responses
» message
string
true
none
Error message describing the issue
Status Code 500
» success
boolean
true
none
Always false for error responses
» message
string
true
none
Error message describing the issue
» error
string
false
none
Additional error details if available
DTOs
PartialUpdateSettingsRequest
export interface PartialUpdateSettingsRequest {
// Using [key: string]: any for maximum flexibility - partial updates can contain any JSON-serializable data
[key: string]: any;
}
SettingsErrorResponse
export interface SettingsErrorResponse {
success: false;
message: string;
error?: string;
}
Last updated
Was this helpful?