v4

OpenAPI 3.1.0raw.githubusercontent.com2026-04-260056.0 KB
Sync

增量同步(轮询)

游标分页增量同步端点。返回指定游标之后的同步事件。 仅返回当前用户参与的对话相关事件。

同步事件类型:

  • message.new — 新消息
  • message.edit — 消息编辑
  • message.delete — 消息删除
  • conversation.create — 创建对话
  • conversation.update — 更新对话
  • conversation.archive — 归档对话
  • participant.add — 添加参与者
  • participant.remove — 移除参与者(移除前写入,被移除用户也能看到)

同步流程:

  1. 首次连接,使用 since=0
  2. 本地保存返回的 cursor
  3. 下次同步使用 since={cursor}
  4. 如果 hasMore=true,继续获取
get/sync

Query parameters

sinceinteger

游标(上次同步的 seq 号,默认 0)

limitinteger

最大返回事件数(1-500)

Response

同步事件

okboolean