Skip to main content

createThread

client.chat.createThread(data: CreateChatThreadRequest): Promise<ChatThreadInfo>

Creates a new chat thread.

Provisions a new thread with the specified configuration, without the automatic lookup behavior of initiateNewThread.

Parameters

ParameterTypeRequiredDescription
dataCreateChatThreadRequestYesThe thread creation payload

Returns

Promise<ChatThreadInfo> — A promise that resolves to the newly created ChatThreadInfo

Example

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

const client = new CodeBoltClient();

const result = await client.chat.createThread(/* CreateChatThreadRequest */);
console.log(result);