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
Parameters
The hook returns a function. That function accepts:File attachments, up to 10, each up to 50 MB (a larger file is refused). When provided, the request is sent as
multipart/form-data. Attachments count toward the project’s file storage: on the free plan, or when the project’s usage limit behavior is set to strict, a message whose files would go over the storage limit is refused with 429 project/quota-reached.Returns
The server-confirmed ChatMessage object. When
spaceReputation is requested, 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.

