Retrieve Conversation
Retrieve a single conversation.
GET /agents/{agentId}/conversations/{conversationId}
Path Parameters
Section titled “Path Parameters”agentId string Required
The agent id
conversationId string Required
The conversation id
Response Type
Section titled “Response Type”type InconvoConversation = { id: string; userContext: Record<string, number | string>; messages: { message: string; type: "text" | "chart" | "table"; id?: string; // id exists only for an Inconvo response chart?: { $schema: "https://vega.github.io/schema/vega-lite/v5.json"; // ... vega-lite spec }; table?: { head: string[]; body: string[][]; }; }[];}; Request
import Inconvo from "@inconvoai/node";
const inconvo = new Inconvo({ apiKey: process.env.INCONVO_API_KEY});
const conversation = await inconvo.agents.conversations.retrieve( "convo_abc123", { agentId: "agt_123" });
console.log(conversation);{ "id": "convo_abc123", "userContext": { "organisationId": 1 }, "messages": [ { "type": "text", "message": "What is our most popular product this quarter?" }, { "id": "64683e57-6601-4241-8afd-376418c84068", "type": "text", "message": "The most popular product this quarter is the iPhone 15, with 8 units ordered (from the start of this quarter to date)." } ]}