Skip to main content

update

plugin.threadsApi.update(threadId: string, data: UpdateThreadRequest): Promise<Thread>

Updates an existing thread with new information.

Modifies the specified thread's configuration, metadata, or other attributes. Only the fields provided in the request will be updated. Use this to make changes to existing threads.

Parameters​

ParameterTypeRequiredDescription
threadIdstringYesThe unique identifier of the thread to update
dataUpdateThreadRequestYesThe update request containing the fields to modify

Returns​

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

Example​

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

const result = await plugin.threadsApi.update('threadId', /* UpdateThreadRequest */);
console.log(result);