PUT /notifications/preferences/{user_id}
更新指定用户的通知接收偏好,包括App内通知、邮件、短信、推送等渠道的开关控制 参考:CAN-SPAM Act (15 U.S.C. §7701) — Commercial Email Compliance。
通知服务 `bearerAuth` application/json
Request Parameters
| Name | In | Type | Required | Default | Example | Constraints | Description |
user_id |
path |
string |
Yes |
|
|
|
用户ID |
Request Body
Schema: dto.NotificationPreferencesRequest
| Field | Type | Required | Example | Constraints | Description |
user_id |
string |
Yes |
usr_abc123 |
|
用户ID |
channels |
object |
No |
|
|
渠道设置 |
email_enabled |
boolean |
No |
True |
|
邮件启用 |
push_enabled |
boolean |
No |
True |
|
推送启用 |
sms_enabled |
boolean |
No |
False |
|
短信启用 |
Referenced Schemas
dto.NotificationPreferencesDetailResponse
dto.NotificationPreferencesResponse
用户通知偏好设置
| Field | Type | Required | Example | Constraints | Description |
channels |
object |
No |
|
|
渠道设置 |
email_enabled |
boolean |
No |
True |
|
邮件启用 |
push_enabled |
boolean |
No |
True |
|
推送启用 |
quiet_hours |
object |
No |
|
|
免打扰时段 |
sms_enabled |
boolean |
No |
False |
|
短信启用 |
type_prefs |
object |
No |
|
|
通知类型偏好 |
updated_at |
string |
No |
2026-04-15T10:30:00Z |
|
更新时间 |
user_id |
string |
No |
usr_abc123 |
|
用户ID |
gitee_com_linmes_authms_base_dto.SimpleResponse
| Field | Type | Required | Example | Constraints | Description |
code |
integer |
No |
|
|
|
message |
string |
No |
|
|
|
timestamp |
string |
No |
|
|
|