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 { data: messages } = await proficient.messages.list({ interactionId });
{
"data": [
{
"id": "<string>",
"object": "message",
"content": "<string>",
"created_at": 123,
"depth": 123,
"interaction_id": "<string>",
"sent_by": "user",
"parent_id": "<string>"
}
],
"has_more": true
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}Messages
List all messages in an interaction
Returns a list of all messages in the specified interaction.
GET
/
messages
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 { data: messages } = await proficient.messages.list({ interactionId });
{
"data": [
{
"id": "<string>",
"object": "message",
"content": "<string>",
"created_at": 123,
"depth": 123,
"interaction_id": "<string>",
"sent_by": "user",
"parent_id": "<string>"
}
],
"has_more": true
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}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 { data: messages } = await proficient.messages.list({ interactionId });
Authorizations
Query Parameters
The unique identifier of the interaction
Used to specify the maximum number of objects that can be returned. Must be an integer ranging from 1 to 100. Defaults to 20.
A pagination cursor parameter that takes an object ID as a value. This indicates the position of the list where you want to start fetching the data. For example, if your first request returns 100 objects ending with obj_100, you can use starting_after=obj_100 in your subsequent API call to retrieve the next page of the list.

