Skip to main content

通知设置

全局提醒设置位于 /api/v1/notification-settings。 该端点刻意收窄: 请先在网页端 设置 → 通知 配置好 Bark。见续费提醒指南。之后 Agent 可以通过本接口开关全局提醒、修改提前天数。单个订阅的提醒开关仍使用订阅上的 notificationEnabled。

读取设置

GET /api/v1/notification-settings
如果账号从未在网页端保存过通知设置,API 会返回 404 notification_settings_not_found,并引导到网页提醒配置。

更新设置

PATCH /api/v1/notification-settings 需要 write scope。
请求里如果带上 barkUrl、timeZone、locale 等不可写字段,会返回 400 invalid_notification_settings_field,并附带 writableFields: ["daysBefore","enabled"]。

Agent 行为

如果用户想粘贴 Bark URL 或发送测试推送,应拒绝,并引导到网页端与续费提醒指南。不要编造凭证。