Skip to main content

getChildren

client.threads.getChildren(threadId: string): Promise<Thread[]>

Retrieves all direct child threads of a specified thread.

Returns threads that are immediate descendants of the given parent thread. This is useful for navigating thread hierarchies and managing related threads.

Parameters

ParameterTypeRequiredDescription
threadIdstringYesThe unique identifier of the parent thread

Returns

Promise<Thread[]> — A promise that resolves to an array of child Thread objects

Example

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

const client = new CodeBoltClient();

const result = await client.threads.getChildren('threadId');
console.log(result);