Skip to main content

create

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

const result = await plugin.threadsApi.create(/* CreateThreadRequest */);
console.log(result);