Skip to main content

updateThreadStep

plugin.chatApi.updateThreadStep(threadId: string, stepId: string, updateData: Record<string, unknown>): Promise<ChatThreadStep>

Updates a step within a chat thread.

Modifies the properties of an existing step, such as its status, content, or metadata.

Parameters​

ParameterTypeRequiredDescription
threadIdstringYesThe unique identifier of the thread
stepIdstringYesThe unique identifier of the step to update
updateDataRecord<string, unknown>YesThe fields to update on the step

Returns​

Promise<ChatThreadStep> — A promise that resolves to the updated ChatThreadStep

Example​

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

const result = await plugin.chatApi.updateThreadStep('threadId', 'stepId', /* Record<string, unknown> */);
console.log(result);