Skip to main content

execute

plugin.threadsApi.execute(threadId: string, data?: ExecuteThreadRequest): Promise<Thread>

Executes a thread with optional configuration parameters.

Starts or resumes execution of the specified thread. You can provide additional execution parameters to customize the run. The thread will process its configured tasks and operations.

Parameters

ParameterTypeRequiredDescription
threadIdstringYesThe unique identifier of the thread to execute
dataExecuteThreadRequestNoOptional execution configuration parameters

Returns

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

Example

import plugin from '@codebolt/plugin-sdk';

const result = await plugin.threadsApi.execute('threadId');
console.log(result);