Skip to main content

addExpertToChat()

addExpertToChat(chatId: string, request: AddExpertToChatRequest): Promise<ManagedChat>

Defined in: packages/core/src/index.ts:2602

Add an expert to a chat

Parameters

ParameterTypeDescription
chatIdstringThe unique identifier of the chat
requestAddExpertToChatRequestRequest with expert ID to add

Returns

Promise<ManagedChat>

The updated chat object

Throws

401 - Not authenticated

Throws

404 - Chat or expert not found

Example

import { addExpertToChat } from "@cpod/sdk";

const chat = await addExpertToChat("chat-123", {
expert_id: "expert-456",
});