POST /push/subscriptions

注册 Web Push 订阅(RFC 8030 VAPID),用于接收推送通知 参考:CAN-SPAM Act (15 U.S.C. §7701) — Commercial Email Compliance。

通知服务 `bearerAuth` application/json

请求体

Schema: service-notification/internal/handler/dto.PushSubscriptionRequest

字段类型必填示例约束描述
endpoint string 是 https://fcm.googleapis.com/fcm/send/...
keys service-notification/internal/handler/dto.PushSubscriptionKeys 是
device_name string 否 Chrome on Windows
device_type string 否 web
user_agent string 否

响应

引用的 Schema

service-core/base/dto.SimpleResponse

字段类型必填示例约束描述
code integer 否
message string 否
timestamp string 否

service-notification/internal/handler/dto.PushSubscriptionDetailResponse

字段类型必填示例约束描述
code integer 否
data service-notification/internal/handler/dto.PushSubscriptionResponse 否
message string 否
timestamp string 否

service-notification/internal/handler/dto.PushSubscriptionKeys

字段类型必填示例约束描述
auth string 是 xK2s9...
p256dh string 是 BP7S2s9...

service-notification/internal/handler/dto.PushSubscriptionResponse

字段类型必填示例约束描述
created_at string 否 2026-05-12T12:00:00Z
device_name string 否 Chrome on Windows
device_type string 否 web
endpoint string 否 https://fcm.googleapis.com/fcm/send/...
id string 否 sub-abc123