Skip to main content

storeMessage

plugin.chatApi.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 plugin from '@codebolt/plugin-sdk';

const result = await plugin.chatApi.storeMessage(/* StoreMessageRequest */);
console.log(result);