List conversations
Retrieve a list of all AI conversations configured by the user. Supports PostgREST-style query parameters for filtering. Examples are included for the standard metadata fields, but you can filter on any field in the metadata JSON object. For example, to filter by a custom field metadata->custom_field, use metadata->custom_field=eq.value.
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const conversations = await client.ai.conversations.list();
console.log(conversations.data);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
conversations = client.ai.conversations.list()
print(conversations.data)
package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
conversations, err := client.AI.Conversations.List(context.TODO(), telnyx.AIConversationListParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", conversations.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.ai.conversations.ConversationListParams;
import com.telnyx.sdk.models.ai.conversations.ConversationListResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
ConversationListResponse conversations = client.ai().conversations().list();
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
conversations = telnyx.ai.conversations.list
puts(conversations)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$conversations = $client->ai->conversations->list(
id: 'id',
createdAt: 'created_at',
lastMessageAt: 'last_message_at',
limit: 1,
metadataAssistantID: 'metadata->assistant_id',
metadataCallControlID: 'metadata->call_control_id',
metadataTelnyxAgentTarget: 'metadata->telnyx_agent_target',
metadataTelnyxConversationChannel: 'metadata->telnyx_conversation_channel',
metadataTelnyxEndUserTarget: 'metadata->telnyx_end_user_target',
name: 'name',
or: 'or',
order: 'order',
);
var_dump($conversations);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx ai:conversations list \
--api-key 'My API Key'curl --request GET \
--url https://api.telnyx.com/v2/ai/conversations \
--header 'Authorization: Bearer <token>'{
"data": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"created_at": "2025-04-15T13:07:28.764Z",
"metadata": {
"telnyx_conversation_channel": "sms",
"telnyx_agent_target": "+13128675309",
"telnyx_end_user_target": "+13128675309",
"assistant_id": "assistant-123"
},
"last_message_at": "2025-04-15T13:07:28.764Z",
"name": ""
}
]
}{
"detail": [
{
"loc": [
"body",
"name"
],
"msg": "Field required",
"type": "missing"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Filter by conversation ID (e.g. id=eq.123)
Filter by conversation Name (e.g. name=like.Voice%)
Filter by creation datetime (e.g., created_at=gte.2025-01-01)
Filter by last message datetime (e.g., last_message_at=lte.2025-06-01)
Filter by assistant ID (e.g., metadata->assistant_id=eq.assistant-123)
Filter by assistant version ID (e.g., metadata->assistant_version_id=eq.20250812T114318034399). The version that handled the conversation is stored in metadata when the conversation starts; conversations created before this field was tracked, or that never resolved a version, have no assistant_version_id and do not match this filter.
Filter by call control ID (e.g., metadata->call_control_id=eq.v3:123)
Filter by the phone number, SIP URI, or other identifier for the agent (e.g., metadata->telnyx_agent_target=eq.+13128675309)
Filter by the phone number, SIP URI, or other identifier for the end user (e.g., metadata->telnyx_end_user_target=eq.+13128675309)
Filter by conversation channel (e.g., metadata->telnyx_conversation_channel=eq.phone_call)
Limit the number of returned conversations (e.g., limit=10)
x >= 1Order the results by specific fields (e.g., order=created_at.desc or order=last_message_at.asc)
Apply OR conditions using PostgREST syntax (e.g., or=(created_at.gte.2025-04-01,last_message_at.gte.2025-04-01))
Response
Successful Response
Show child attributes
Show child attributes
Was this page helpful?
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const conversations = await client.ai.conversations.list();
console.log(conversations.data);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
conversations = client.ai.conversations.list()
print(conversations.data)
package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
conversations, err := client.AI.Conversations.List(context.TODO(), telnyx.AIConversationListParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", conversations.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.ai.conversations.ConversationListParams;
import com.telnyx.sdk.models.ai.conversations.ConversationListResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
ConversationListResponse conversations = client.ai().conversations().list();
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
conversations = telnyx.ai.conversations.list
puts(conversations)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$conversations = $client->ai->conversations->list(
id: 'id',
createdAt: 'created_at',
lastMessageAt: 'last_message_at',
limit: 1,
metadataAssistantID: 'metadata->assistant_id',
metadataCallControlID: 'metadata->call_control_id',
metadataTelnyxAgentTarget: 'metadata->telnyx_agent_target',
metadataTelnyxConversationChannel: 'metadata->telnyx_conversation_channel',
metadataTelnyxEndUserTarget: 'metadata->telnyx_end_user_target',
name: 'name',
or: 'or',
order: 'order',
);
var_dump($conversations);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx ai:conversations list \
--api-key 'My API Key'curl --request GET \
--url https://api.telnyx.com/v2/ai/conversations \
--header 'Authorization: Bearer <token>'{
"data": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"created_at": "2025-04-15T13:07:28.764Z",
"metadata": {
"telnyx_conversation_channel": "sms",
"telnyx_agent_target": "+13128675309",
"telnyx_end_user_target": "+13128675309",
"assistant_id": "assistant-123"
},
"last_message_at": "2025-04-15T13:07:28.764Z",
"name": ""
}
]
}{
"detail": [
{
"loc": [
"body",
"name"
],
"msg": "Field required",
"type": "missing"
}
]
}