Skip to main content

Overview

Returns an async function that updates a conversation’s details via the API. This is a low-level hook — it makes the PATCH request and returns the updated conversation without touching Redux state. Use it when you need direct control over when and how state is updated.
Requires ChatProvider in the component tree.

Usage Example

Parameters

The hook returns a function. That function accepts:
string
required
The ID of the conversation to update.
string
New conversation name.
string
New conversation description.
{ file: UploadFileInput; options: UploadImageOptions }
New avatar image and its processing options (a mode and the fields it needs; see Image Processing Modes). file is a browser File or Blob, or a React Native { uri, name, type }. The request is sent as multipart form data, and the previous avatar, if any, is deleted.
string[]
Files to remove: the conversation’s avatarFileId. Removing it clears the avatar. Works alone or with a new avatarFile. Any other id refuses the whole update (400 chat/invalid-remove-file-ids).
'members' | 'team'
Who can post messages: 'members' (any active member) or 'team' (only the space’s active admins and moderators). Only applicable to space conversations.

Returns

Conversation
The updated Conversation object.

Notes

  • This hook does not update Redux state. If you want the result reflected in the UI, dispatch setConversation manually or use useConversation which handles this automatically.
  • For integration guidance, see Chat: Conversations.