Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const messages = await client.ai.conversations.messages.list('conversation_id');
console.log(messages.data);{
"data": [
{
"role": "user",
"text": "<string>",
"tool_calls": [
{
"id": "<string>",
"type": "function",
"function": {
"name": "<string>",
"arguments": "<string>"
}
}
],
"created_at": "2025-04-15T13:07:28.764Z",
"sent_at": "2025-04-15T13:07:28.764Z"
}
],
"meta": {
"total_pages": 123,
"total_results": 123,
"page_number": 123,
"page_size": 123
}
}Retrieve messages for a specific conversation, including tool calls made by the assistant.
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const messages = await client.ai.conversations.messages.list('conversation_id');
console.log(messages.data);{
"data": [
{
"role": "user",
"text": "<string>",
"tool_calls": [
{
"id": "<string>",
"type": "function",
"function": {
"name": "<string>",
"arguments": "<string>"
}
}
],
"created_at": "2025-04-15T13:07:28.764Z",
"sent_at": "2025-04-15T13:07:28.764Z"
}
],
"meta": {
"total_pages": 123,
"total_results": 123,
"page_number": 123,
"page_size": 123
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Was this page helpful?