createProjectChat()
createProjectChat(
projectId:string,request:CreateProjectChatRequest):Promise<ProjectChat>
Defined in: packages/core/src/index.ts:2200
Create a new chat within a project
Parameters
| Parameter | Type | Description |
|---|---|---|
projectId | string | The unique identifier of the project |
request | CreateProjectChatRequest | Chat creation data (title) |
Returns
Promise<ProjectChat>
The newly created project chat
Throws
401 - Not authenticated
Throws
404 - Project not found
Example
import { createProjectChat } from "@cpod/sdk";
const chat = await createProjectChat("project-123", {
title: "Analysis Discussion",
});
console.log(`Created chat: ${chat.id}`);