Actions60
- User Actions
- Channel Actions
- Accept Invite
- Add Members
- Add Moderators
- Archive
- Ban User
- Create
- Delete
- Delete File
- Delete Image
- Demote Moderators
- Disable Slow Mode
- Enable Slow Mode
- Get Config
- Hide
- Invite Members
- Mark Read
- Mark Unread
- Mute
- Mute Status
- Pin
- Query Channels
- Query Members
- Reject Invite
- Remove Members
- Send Action
- Send File
- Send Image
- Show
- Stop Watching
- Truncate
- Unarchive
- Unban User
- Unmute
- Unpin
- Update
- Watch
- Message Actions
- Moderation Actions
User → Upsert
AI-generatedSummary
Upsert a user in Stream Chat by specifying a unique User ID and optional additional user data to create or update that user's record.
Inputs
- User ID (required) — A unique identifier for the user. Can be any string (e.g., "john_doe", "user123").
- User Data — A JSON object containing user properties such as name, email, image, role, and custom fields. The "id" field is set automatically based on the User ID.
Output shape
a single JSON object representing the created or updated user
The operation returns the full user object after upsert. If an error occurs, it may return an error object; consider enabling 'Continue On Fail' in node settings for bulk operations.
Examples
Example 1: Creating or updating a user named John with role admin
Set User ID to 'john_doe' and User Data to '{"name": "John", "role": "admin"}'.