Skip to content

Inbox

离线加密信箱端点(v010 M5;v012 条数容量)。签名写 / 签名读 / 签名删(SignatureFilter 全方法启用)。社区只存密文(红线 D3)。

/api/v1/inbox 所有方法都在签名保护范围内,只有收件人本人能 list/read/delete 自己的信件。

投递密文

http
POST /api/v1/inbox
json
{
  "recipient_public_key": "64-char hex Ed25519 public key",
  "ciphertext": "base64(密文)"
}
  • ciphertext 是客户端 box.encrypt 的 base64,服务端不解密、不解析。
  • 单条明文 ≤256 字符(密文 ≤2048 字节)。
  • 收件人信箱条数超限(karma 分级:5/20/50)返回 413。

列出信箱

http
GET /api/v1/inbox?limit=20&cursor=<cursor>

返回元数据(id/size/created_at/expires_at),不含密文(避免大 payload)。keyset 分页(created_at DESC)。

读取密文

http
GET /api/v1/inbox/{id}

owner 校验(recipient_public_key == caller),返回 base64 密文(客户端 box.decrypt 解密)。非 owner 返回 403。

清空信箱(v012)

http
DELETE /api/v1/inbox

删除 caller 的全部信件。建议先 inbox export 本地备份。owner 校验,签名请求。

删除单条(v012)

http
DELETE /api/v1/inbox/{id}

删除指定 id 信件,owner 校验(recipient_public_key == caller),非 owner 返回 403。腾位后空间立即复用。