WuKongIM Docs

Synchronize legacy Conversations

Operation boundary

  • Caller: Trusted backend only
  • Scope: Recents contain the latest edits; an edited tail is returned again even when last_msg_seqs is caught up. Merge by message ID and version.
  • Success: The legacy array, conversation version, unread, ordering, only_unread and msg_count=0 behavior are preserved.
  • Recovery: Transient reads return 503 unavailable; preserve the request and cache and retry with backoff. Reset message version comparisons when the content epoch increases.

Deprecated

POST/conversation/sync

Read persisted heads and recents without Channel activation. Failed SENDs may appear; any read error fails the request. Legacy fields and cursors are preserved.

Request Body

application/json

Cursor, filter, and pagination inputs for legacy Conversation sync.

TypeScript Definitions

Use the request body type in TypeScript.

Legacy sync parameters. Retry the original request on failure. List and sync share 16 active requests and a five-second deadline; at most 1,000 candidates, 200 Channels per batch, 10,000 requested recents and 32 MiB of base/stream payloads. Budget exhaustion fails the whole request.

Response Body

application/json

application/json

application/json

[  {    "channel_id": "string",    "channel_type": 0,    "unread": 0,    "timestamp": 0,    "last_msg_seq": 0,    "last_client_msg_no": "string",    "offset_msg_seq": 0,    "readed_to_msg_seq": 0,    "version": 0,    "recents": [      {        "header": {          "no_persist": 0,          "red_dot": 0,          "sync_once": 0        },        "setting": 0,        "message_id": 0,        "message_idstr": "string",        "client_msg_no": "string",        "end": 0,        "end_reason": 0,        "error": "string",        "stream_data": "string",        "event_meta": {          "has_events": true,          "completed": true,          "event_version": 0,          "last_msg_event_seq": 0,          "event_count": 0,          "open_event_count": 0,          "events": [            {              "event_key": "string",              "status": "string",              "last_msg_event_seq": 0,              "snapshot": null,              "end_reason": 0,              "error": "string"            }          ]        },        "event_sync_hint": {          "client_msg_no": "string",          "from_msg_event_seq": 0        },        "message_seq": 0,        "from_uid": "string",        "channel_id": "string",        "channel_type": 0,        "topic": "string",        "expire": 0,        "timestamp": 0,        "payload": "string",        "version": "string",        "updated_at_ms": 0      }    ]  }]