Skip to content

User synchronization ​

POST /api/open/v1/users/sync

Use request signing. The first request creates a user by userId; subsequent requests update that user in the same workspace. Sync before submitting chat input.

json
{"userId":"u-1001","nickname":"Alex","avatarUrl":"https://cdn.example.com/avatar.png","gender":"MALE","age":25,"country":"China","region":"Zhejiang","city":"Hangzhou","language":"en","timezone":"Asia/Shanghai","utcOffsetMinutes":480,"status":"ACTIVE","tags":["new user"]}

Fields ​

FieldRequiredConstraint / behavior when omitted
userIdYesAt most 128 characters; must not start with test:
nicknameNoAt most 100 characters; cleared when omitted
avatarUrlNoHTTP(S) URL, at most 1,024 characters; cleared when omitted
genderNoUNKNOWN, MALE, FEMALE, OTHER; defaults to UNKNOWN
ageNo0–150; cleared when omitted
country / region / cityNoAt most 100 characters each; cleared when omitted
languageNoValid language tag, at most 35 characters, such as en; cleared when omitted
timezoneNoValid time zone, at most 64 characters, such as Asia/Shanghai; cleared when omitted
utcOffsetMinutesNoInteger minutes from -840 to 840; cleared when omitted
statusNoACTIVE or BLOCKED; defaults back to ACTIVE when omitted
tagsNoAt most 20 tags of up to 40 characters each; defaults to an empty list

Full synchronization, not a partial update

Send the complete current profile each time. Omitted fields are cleared or defaulted, including console-managed tags and status. Explicitly send BLOCKED to keep a user blocked. Console operator notes are preserved.

Response ​

json
{"code":"OK","message":"success","data":{"userId":"u-1001","created":true,"nickname":"Alex","avatarUrl":null,"gender":"UNKNOWN","age":null,"country":null,"region":null,"city":null,"language":null,"timezone":null,"utcOffsetMinutes":null,"status":"ACTIVE","tags":[],"updatedAt":"2026-10-26T08:00:00Z"}}

This example corresponds to syncing only userId and nickname. created identifies the first synchronization; other fields reflect the saved profile. updatedAt is a UTC ISO 8601 timestamp.

OmniChat · Let conversations happen naturally