即知API

HTTP + HPKE

加密通知 API

授权发送来源,端到端加密内容,并向你绑定的设备发送通知。

开始使用

先在 App 验证邮箱并完成设备设置,再使用 CLI 登录并在 iOS 批准发送来源。网页登录或新增 Key 不会替代加密授权。

npm --prefix cli ci
node cli/src/main.js login --api https://api.pushnow.dev --name "My automation"
node cli/src/main.js send --title "Build complete" --body "Ready for review"

以上命令从仓库根目录运行,不依赖已发布的 npm 包。

接口与凭据

https://api.pushnow.dev

MethodPathCredentialPurpose
GET/v1/secure/devicesAccount sessionList your devices
GET/v2/keysAccount sessionList sender Key metadata
GET/v2/logsAccount sessionInspect notification attempts
GET/v2/recipientsSender KeyRead the signed recipient directory
POST/v2/messagesSender KeySubmit an encrypted envelope
POST / PUT/v2/attachments[/<ID>]Sender KeyReserve and upload encrypted files

发送约定

POST /v2/messages 接收 SDK 生成的加密 envelope,不能直接提交明文标题和正文。Idempotency-Key 必须等于 message_id,重试需复用原始加密内容。

  • 省略 notify_device_ids 默认提醒全部符合条件的设备;空数组仅保存到收件箱。
  • scheduled_at 支持未来 30 天内的提醒,消息会立即出现在历史中。
  • 支持加密标题、正文、链接和附件。当前不支持自定义通知声音。
  • accepted 表示服务商已接受,不代表设备已显示通知。

文档和测试