> ## Documentation Index
> Fetch the complete documentation index at: https://developers.telnyx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List collections

> Returns a paginated list of collections in your organization.



## OpenAPI

````yaml /openapi/source/external/collections/collections.json get /ai/collections
openapi: 3.1.0
info:
  version: 1.0.0
  title: Telnyx API
  x-latency-category: interactive
  x-endpoint-cost: light
  description: >-
    Create and manage AI Collections — logical, searchable groupings of your
    Telnyx product data (voice, meeting bot, and message sources).


    A collection defines *what* data is searchable and *how* it is retrieved.
    You create a collection, attach one or more sources to it, tune its
    retrieval settings, and then run vector or hybrid search scoped to that
    collection. Every collection is automatically scoped to your organization —
    identity is derived from your Telnyx API key and cannot be overridden.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
    description: Telnyx API v2
security:
  - bearerAuth: []
tags:
  - name: AI Collections
    description: >-
      Create and manage logical collections of your Telnyx data, tune retrieval
      settings, manage sources, and run collection-scoped semantic search.
paths:
  /ai/collections:
    get:
      tags:
        - AI Collections
      summary: List collections
      description: Returns a paginated list of collections in your organization.
      operationId: ListCollections
      parameters:
        - $ref: '#/components/parameters/PageNumber'
        - $ref: '#/components/parameters/PageSize'
      responses:
        '200':
          description: A paginated list of collections.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionListEnvelope'
        '401':
          $ref: '#/components/responses/Unauthorized'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            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);
            }
        - lang: Python
          source: |
            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)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/team-telnyx/telnyx-go\"\n\t\"github.com/team-telnyx/telnyx-go/option\"\n)\n\nfunc main() {\n\tclient := telnyx.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tcollections, err := client.AI.Collections.List(context.TODO())\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", collections.Data)\n}\n"
        - lang: Java
          source: |-
            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();
                }
            }
        - lang: Ruby
          source: |-
            require "telnyx"

            telnyx = Telnyx::Client.new(api_key: "My API Key")

            page = telnyx.ai.collections.list

            puts(page)
        - lang: PHP
          source: >-
            <?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();
            }
        - lang: CLI
          source: |-
            telnyx ai:collections list \
              --api-key 'My API Key'
components:
  parameters:
    PageNumber:
      name: page[number]
      in: query
      required: false
      description: Page number to return (1-based). Defaults to 1.
      schema:
        type: integer
        minimum: 1
        default: 1
        example: 1
    PageSize:
      name: page[size]
      in: query
      required: false
      description: Number of results per page. Defaults to 20.
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 20
        example: 20
  schemas:
    CollectionListEnvelope:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Collection'
        meta:
          $ref: '#/components/schemas/ListMeta'
    Collection:
      type: object
      properties:
        uuid:
          type: string
          format: uuid
          example: 6a09ccbd-8f9b-4c3a-9b0e-2f1d3c4b5a6e
        slug:
          type: string
          example: support-transcripts
        record_type:
          type: string
          description: Identifies the record type. Always `ai_collection`.
          example: ai_collection
        name:
          type: string
          example: Support Transcripts
        description:
          type: string
          example: All customer support voice transcripts.
        status:
          type: string
          example: ready
        sources:
          type: array
          items:
            $ref: '#/components/schemas/Source'
        settings:
          $ref: '#/components/schemas/RetrievalSettingsWrapper'
        created_at:
          type: string
          format: date-time
          example: '2026-08-04T12:00:00Z'
        updated_at:
          type: string
          format: date-time
          example: '2026-08-04T12:00:00Z'
    ListMeta:
      type: object
      properties:
        total_pages:
          type: integer
          example: 3
        total_results:
          type: integer
          example: 42
        page_number:
          type: integer
          example: 1
        page_size:
          type: integer
          example: 20
    Errors:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
    Source:
      type: object
      properties:
        id:
          type: string
          example: source_8vkvtcksnawvbnxq48yv2l06wx
        record_type:
          type: string
          description: Identifies the record type. Always `ai_collection_source`.
          example: ai_collection_source
        collection_id:
          type: string
          format: uuid
          example: 6a09ccbd-8f9b-4c3a-9b0e-2f1d3c4b5a6e
        source_type:
          $ref: '#/components/schemas/SourceType'
        bucket_id:
          type: string
          description: The Telnyx Storage bucket name. Present only for `bucket` sources.
          example: policy-docs
        status:
          type: string
          example: ready
    RetrievalSettingsWrapper:
      type: object
      properties:
        record_type:
          type: string
          description: Identifies the record type. Always `ai_collection_settings`.
          example: ai_collection_settings
          readOnly: true
        retrieval:
          $ref: '#/components/schemas/RetrievalSettings'
    Error:
      type: object
      properties:
        code:
          type: string
        title:
          type: string
        detail:
          type: string
        meta:
          type: object
          additionalProperties: true
          properties:
            pointer:
              type: string
              description: >-
                JSON Pointer to the request field that caused the error. Present
                on field-level validation and conflict errors.
              example: /slug
    SourceType:
      type: string
      description: >-
        The type of Telnyx data attached as a source. `bucket` requires an
        additional `bucket_id`. Only `voice` is searchable today; `meeting_bot`,
        `message`, and `bucket` attach but are not yet searchable (Coming soon).
      enum:
        - voice
        - meeting_bot
        - message
        - bucket
      example: voice
    RetrievalSettings:
      type: object
      description: How documents are retrieved when searching the collection.
      properties:
        top_k:
          type: integer
          description: Number of top results to retrieve (1–50).
          minimum: 1
          maximum: 50
          default: 5
          example: 5
        retrieval_type:
          type: string
          description: >-
            Retrieval strategy. `vector` runs semantic similarity search;
            `hybrid` combines vector similarity with keyword matching; `keyword`
            runs lexical (BM25) matching.
          enum:
            - vector
            - hybrid
            - keyword
          default: vector
          example: vector
  responses:
    Unauthorized:
      description: Missing or invalid authentication.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Errors'
          example:
            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
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Telnyx API key. Collections and results are automatically scoped to the
        authenticated user's organization.

````