PUT /communication/push-tokens/{push_token_id}

更新指定推送令牌的激活状态(is_active)。停用后该令牌不再接收推送,重新激活后恢复。参考:ePrivacy Directive 2002/58/EC、CAN-SPAM Act。

通信服务 `bearerAuth` application/json

请求参数

名称位置类型必填默认值示例约束描述
push_token_id path string 是 推送令牌ID

请求体

Schema: service-communication/internal/handler/dto.UpdatePushTokenRequest

字段类型必填示例约束描述
user_id string 是 usr_abc123
is_active boolean 否 True

响应

状态描述Schema
200更新成功service-communication/internal/handler/dto.OKResponse
400请求参数错误dto.SimpleResponse
401未认证或令牌无效dto.SimpleResponse
403无权访问该资源dto.SimpleResponse
404令牌不存在dto.SimpleResponse
500服务内部错误dto.SimpleResponse

引用的 Schema

dto.SimpleResponse

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

service-communication/internal/handler/dto.OKResponse

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