Skip to main content

create

client.threads.create(data: CreateThreadRequest): Promise<Thread>

Creates a new thread with the specified configuration.

Initializes a new thread with the provided settings and parameters. The thread will be created in an initial state and can be executed when ready. Use this to set up new execution units.

Parameters​

ParameterTypeRequiredDescription
dataCreateThreadRequestYesThe thread creation request with configuration details

Returns​

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

Example​

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

const client = new CodeBoltClient();

const result = await client.threads.create(/* CreateThreadRequest */);
console.log(result);