List collections
Returns a paginated list of collections in your organization.
GET
/
ai
/
collections
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const response of client.ai.collections.list()) {
console.log(response);
}import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
page = client.ai.collections.list()
print(page.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"),
)
collections, err := client.AI.Collections.List(context.TODO())
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", collections.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
var page = client.ai().collections().list();
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
page = telnyx.ai.collections.list
puts(page)<?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 {
$page = $client->ai->collections->list();
var_dump($page);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx ai:collections list \
--api-key 'My API Key'curl --request GET \
--url https://api.telnyx.com/v2/ai/collections \
--header 'Authorization: Bearer <token>'{
"data": [
{
"uuid": "6a09ccbd-8f9b-4c3a-9b0e-2f1d3c4b5a6e",
"slug": "support-transcripts",
"record_type": "ai_collection",
"name": "Support Transcripts",
"description": "All customer support voice transcripts.",
"status": "ready",
"sources": [
{
"id": "source_8vkvtcksnawvbnxq48yv2l06wx",
"record_type": "ai_collection_source",
"collection_id": "6a09ccbd-8f9b-4c3a-9b0e-2f1d3c4b5a6e",
"source_type": "voice",
"bucket_id": "policy-docs",
"status": "ready"
}
],
"settings": {
"record_type": "ai_collection_settings",
"retrieval": {
"top_k": 5,
"retrieval_type": "vector"
}
},
"created_at": "2026-08-04T12:00:00Z",
"updated_at": "2026-08-04T12:00:00Z"
}
],
"meta": {
"total_pages": 3,
"total_results": 42,
"page_number": 1,
"page_size": 20
}
}{
"errors": [
{
"code": "10009",
"title": "Authentication failed",
"detail": "The required authentication headers were either invalid or not included in the request.",
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10009"
}
}
]
}Authorizations
Telnyx API key. Collections and results are automatically scoped to the authenticated user's organization.
Query Parameters
Page number to return (1-based). Defaults to 1.
Required range:
x >= 1Example:
1
Number of results per page. Defaults to 20.
Required range:
1 <= x <= 100Example:
20
Was this page helpful?
⌘I
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const response of client.ai.collections.list()) {
console.log(response);
}import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
page = client.ai.collections.list()
print(page.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"),
)
collections, err := client.AI.Collections.List(context.TODO())
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", collections.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
var page = client.ai().collections().list();
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
page = telnyx.ai.collections.list
puts(page)<?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 {
$page = $client->ai->collections->list();
var_dump($page);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx ai:collections list \
--api-key 'My API Key'curl --request GET \
--url https://api.telnyx.com/v2/ai/collections \
--header 'Authorization: Bearer <token>'{
"data": [
{
"uuid": "6a09ccbd-8f9b-4c3a-9b0e-2f1d3c4b5a6e",
"slug": "support-transcripts",
"record_type": "ai_collection",
"name": "Support Transcripts",
"description": "All customer support voice transcripts.",
"status": "ready",
"sources": [
{
"id": "source_8vkvtcksnawvbnxq48yv2l06wx",
"record_type": "ai_collection_source",
"collection_id": "6a09ccbd-8f9b-4c3a-9b0e-2f1d3c4b5a6e",
"source_type": "voice",
"bucket_id": "policy-docs",
"status": "ready"
}
],
"settings": {
"record_type": "ai_collection_settings",
"retrieval": {
"top_k": 5,
"retrieval_type": "vector"
}
},
"created_at": "2026-08-04T12:00:00Z",
"updated_at": "2026-08-04T12:00:00Z"
}
],
"meta": {
"total_pages": 3,
"total_results": 42,
"page_number": 1,
"page_size": 20
}
}{
"errors": [
{
"code": "10009",
"title": "Authentication failed",
"detail": "The required authentication headers were either invalid or not included in the request.",
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10009"
}
}
]
}