Skip to main content

searchThread

plugin.threadsApi.searchThread(threadId: string): Promise<Thread>

Searches for a specific thread by its ID.

Performs a direct lookup to find a thread using its unique identifier. This is the most efficient way to retrieve a thread when you know its ID.

Parameters

ParameterTypeRequiredDescription
threadIdstringYesThe unique identifier of the thread to search for

Returns

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

Example

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

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