v1

latestOpenAPI 3.1.0Proprietary2026-07-1712530196.4 KB
IM-Sync

Incremental sync

Cursor-based incremental sync endpoint for offline-first SDK clients. Returns events that occurred after the given cursor. Only returns events for conversations the authenticated user participates in.

Event types:

  • message.new — New message sent
  • message.edit — Message content edited
  • message.delete — Message deleted
  • conversation.create — Direct or group conversation created
  • conversation.update — Conversation title/description changed
  • conversation.archive — Conversation archived
  • participant.add — Member added to conversation
  • participant.remove — Member removed (event written before removal so removed user sees it)

Sync flow:

  1. On first connect, call with since=0 to get initial events
  2. Store the returned cursor locally
  3. On reconnect or periodic poll, call with since={cursor}
  4. If hasMore is true, keep fetching with updated cursor

Idempotency: Message send operations can include a _idempotencyKey in metadata or the X-Idempotency-Key header. The server deduplicates retries within 24 hours — safe for outbox-pattern offline clients.

get/api/im/sync

Query parameters

sinceinteger

Cursor — last seen event seq number. Pass 0 for initial sync.

limitinteger

Max events to return (1–500).

Response

Sync events

okboolean