> ## 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.

# Update a collection

> Updates a collection's metadata (`name` and/or `description`). Sources and settings are managed through their own sub-resources.



## OpenAPI

````yaml /openapi/source/external/collections/collections.json patch /ai/collections/{uuid}
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/{uuid}:
    patch:
      tags:
        - AI Collections
      summary: Update a collection
      description: >-
        Updates a collection's metadata (`name` and/or `description`). Sources
        and settings are managed through their own sub-resources.
      operationId: UpdateCollection
      parameters:
        - $ref: '#/components/parameters/Uuid'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCollectionRequest'
      responses:
        '200':
          description: The updated collection.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
      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
            });


            const CollectionEnvelope = await
            client.ai.collections.update('uuid', {
              name: 'Support Transcripts (2026)',
            });


            console.log(CollectionEnvelope.data);
        - 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
            )
            collection_envelope = client.ai.collections.update(
                uuid="uuid",
                name="Support Transcripts (2026)",
            )
            print(collection_envelope.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\tcollection, err := client.AI.Collections.Update(\n\t\tcontext.TODO(),\n\t\t\"uuid\",\n\t\ttelnyx.AICollectionUpdateParams{\n\t\t\tName: telnyx.String(\"Support Transcripts (2026)\"),\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", collection.Data)\n}\n"
        - lang: Java
          source: |-
            package com.telnyx.sdk.example;

            import com.telnyx.sdk.client.TelnyxClient;
            import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
            import com.telnyx.sdk.models.ai.collections.CollectionUpdateParams;

            public final class Main {
                private Main() {}

                public static void main(String[] args) {
                    TelnyxClient client = TelnyxOkHttpClient.fromEnv();

                    CollectionUpdateParams params = CollectionUpdateParams.builder()
                        .name("Support Transcripts (2026)")
                        .build();
                    var response = client.ai().collections().update("uuid", params);
                }
            }
        - lang: Ruby
          source: >-
            require "telnyx"


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


            collection_envelope = telnyx.ai.collections.update("uuid", name:
            "Support Transcripts (2026)")


            puts(collection_envelope)
        - 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 {
              $collection_envelope = $client->ai->collections->update(
                'uuid',
                name: 'Support Transcripts (2026)',
              );

              var_dump($collection_envelope);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: CLI
          source: |-
            telnyx ai:collections update \
              --api-key 'My API Key' \
              --uuid 6a09ccbd-8f9b-4c3a-9b0e-2f1d3c4b5a6e \
              --name 'Support Transcripts (2026)'
components:
  parameters:
    Uuid:
      name: uuid
      in: path
      required: true
      description: The collection's unique identifier.
      schema:
        type: string
        format: uuid
        example: 6a09ccbd-8f9b-4c3a-9b0e-2f1d3c4b5a6e
  schemas:
    UpdateCollectionRequest:
      type: object
      description: Metadata-only update. Provide either or both fields.
      properties:
        name:
          type: string
          example: Support Transcripts (2026)
        description:
          type: string
          example: Updated description.
    CollectionEnvelope:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/Collection'
    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'
    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:
    BadRequest:
      description: The request was malformed or failed validation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Errors'
          example:
            errors:
              - code: '10015'
                title: Bad Request
                detail: The request failed because it was not well-formed.
                meta:
                  url: https://developers.telnyx.com/docs/overview/errors/10015
    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
    NotFound:
      description: The requested resource does not exist.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Errors'
          example:
            errors:
              - code: collection_not_found
                title: Collection not found
                detail: >-
                  No collection with uuid 'b3b1c8a2-9f4e-4d2a-9c1e-2f7a6d5b4c3a'
                  exists for this account.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Telnyx API key. Collections and results are automatically scoped to the
        authenticated user's organization.

````