Skip to main content

updateStatus

client.threads.updateStatus(threadId: string, data: UpdateThreadStatusRequest): Promise<void>

Updates the status of a specific thread.

Changes the execution state of the thread to a new status such as active, paused, or completed. This controls the thread's lifecycle and availability for execution.

Parameters

ParameterTypeRequiredDescription
threadIdstringYesThe unique identifier of the thread to update
dataUpdateThreadStatusRequestYesThe request containing the new status information

Returns

Promise<void> — A promise that resolves when the status has been updated

Example

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

const client = new CodeBoltClient();

const result = await client.threads.updateStatus('threadId', /* UpdateThreadStatusRequest */);
console.log(result);