PUT /notifications/preferences/{user_id}
Update notification receiving preferences for a specified user, including toggles for in-app, email, SMS, push, etc. Reference: CAN-SPAM Act (15 U.S.C. §7701) — Commercial Email Compliance.
Notification Service `bearerAuth` application/json
Request Parameters
| Name | In | Type | Required | Default | Example | Constraints | Description |
user_id |
path |
string |
Yes |
|
|
|
User ID |
Request Body
Schema: dto.NotificationPreferencesRequest
| Field | Type | Required | Example | Constraints | Description |
user_id |
string |
Yes |
usr_abc123 |
|
User ID |
channels |
object |
No |
|
|
Channel settings |
email_enabled |
boolean |
No |
True |
|
Email enabled |
push_enabled |
boolean |
No |
True |
|
Push enabled |
sms_enabled |
boolean |
No |
False |
|
SMS enabled |
Referenced Schemas
dto.NotificationPreferencesDetailResponse
dto.NotificationPreferencesResponse
User notification preference settings
| Field | Type | Required | Example | Constraints | Description |
channels |
object |
No |
|
|
Channel settings |
email_enabled |
boolean |
No |
True |
|
Email enabled |
push_enabled |
boolean |
No |
True |
|
Push enabled |
quiet_hours |
object |
No |
|
|
Do not disturb period |
sms_enabled |
boolean |
No |
False |
|
SMS enabled |
type_prefs |
object |
No |
|
|
Notification type preference |
updated_at |
string |
No |
2026-04-15T10:30:00Z |
|
Update time |
user_id |
string |
No |
usr_abc123 |
|
User ID |
gitee_com_linmes_authms_base_dto.SimpleResponse
| Field | Type | Required | Example | Constraints | Description |
code |
integer |
No |
|
|
|
message |
string |
No |
|
|
|
timestamp |
string |
No |
|
|
|