Skip to main content

storeMessage

client.chat.storeMessage(data: StoreMessageRequest): Promise<ChatMessage>

Stores a new message in a chat thread.

Persists a message to the thread's message history, recording who sent it and its content.

Parameters

ParameterTypeRequiredDescription
dataStoreMessageRequestYesThe message storage payload

Returns

Promise<ChatMessage> — A promise that resolves to the stored ChatMessage

Example

import { CodeBoltClient } from '@codebolt/clientsdk';

const client = new CodeBoltClient();

const result = await client.chat.storeMessage(/* StoreMessageRequest */);
console.log(result);