Overview
Returns an async function that sends a message to a conversation. An optimistic entry is inserted into Redux immediately — with a temporary ID — and replaced by the server-confirmed message on success. If the request fails, the optimistic message is flagged withsendFailed: true.
Requires
ChatProvider in the component tree.Usage Example
Props
The ID of the conversation to send the message to.
Parameters
The hook returns a function. That function accepts:Plain text content of the message.
GIF attachment data.
User mentions to embed in the message.
Arbitrary key-value data attached to the message.
ID of the message being quoted. Populates
quotedMessage on the stored message.ID of the parent message when sending a thread reply.
File attachments. When provided, the request is sent as
multipart/form-data.Resolves the sender’s reputation into a
spaceReputation number on the embedded user of the returned message. Accepts a space <uuid>, "none" (project-general bucket), or "context" (server-derived from the request context). Empty string, "general", and null are rejected. See Reputation.When
true, spaceReputation is the subtree sum (the space plus all its descendants). Only honored when spaceReputationId is an explicit <uuid>.Returns
The server-confirmed ChatMessage object. When
spaceReputationId is set, its embedded sender carries an added spaceReputation number. See Reputation.Notes
- At least one of
content,gif,files, or non-emptymetadatashould be provided for a meaningful message. - For integration guidance, see Chat: Messages.

