import { ProficientClient } from "@proficient/client";const proficient = new ProficientClient({ apiKey: process.env.PROFICIENT_AI_PUBLISHABLE_KEY, userExternalId: "...", // The user's unique ID in your system});const interactionId = "int_53mfKtX0Da6zaJCp5bNnzxDaEg1xptWvQDr2";const message = await proficient.messages.create({ interactionId, content: "Hello! Tell me something about Anaximander.",});
import { ProficientClient } from "@proficient/client";const proficient = new ProficientClient({ apiKey: process.env.PROFICIENT_AI_PUBLISHABLE_KEY, userExternalId: "...", // The user's unique ID in your system});const interactionId = "int_53mfKtX0Da6zaJCp5bNnzxDaEg1xptWvQDr2";const message = await proficient.messages.create({ interactionId, content: "Hello! Tell me something about Anaximander.",});
import { ProficientClient } from "@proficient/client";const proficient = new ProficientClient({ apiKey: process.env.PROFICIENT_AI_PUBLISHABLE_KEY, userExternalId: "...", // The user's unique ID in your system});const interactionId = "int_53mfKtX0Da6zaJCp5bNnzxDaEg1xptWvQDr2";const message = await proficient.messages.create({ interactionId, content: "Hello! Tell me something about Anaximander.",});
Body
application/json
The data with which a message is created.
Response
200
application/json
<p>Each interaction holds a number of <i>messages</i> and every message belongs to an interaction. The `sent_by` property of a message indicates whether a message was created by an agent or a user.</p>