Skip to main content

complete

plugin.threadsApi.complete(threadId: string): Promise<void>

Marks a thread as completed.

Sets the thread's status to completed, indicating that its execution has finished successfully. This is typically done automatically by the thread, but can be called manually when needed.

Parameters

ParameterTypeRequiredDescription
threadIdstringYesThe unique identifier of the thread to complete

Returns

Promise<void> — A promise that resolves when the thread has been marked complete

Example

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

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