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

# Sources

> Add, replace, list, and remove data sources from a Search collection.

Sources are the data inputs a collection searches across. Each source type has its own page covering what it indexes and how to enable the underlying data:

| Source type                                                       | What it indexes                             |
| ----------------------------------------------------------------- | ------------------------------------------- |
| [`voice`](/docs/ai-search/sources/voice)                          | Voice call transcriptions for the account   |
| `meeting_bot` <Badge color="yellow" size="sm">Coming soon</Badge> | Meeting transcriptions for the account      |
| `message` <Badge color="yellow" size="sm">Coming soon</Badge>     | Messaging history for the account           |
| `bucket` <Badge color="yellow" size="sm">Coming soon</Badge>      | Files in one specific Telnyx Storage bucket |

Sources are managed through dedicated endpoints -- never through collection `PATCH` (which would be ambiguous about intent). When a source is added, the resource is created with `status` set to `ready` and its content is indexed for search.

## Add One Source

`POST /v2/ai/collections/{uuid}/sources` adds a single source without touching the others.

```bash theme={null}
# Add a voice source
curl -X POST https://api.telnyx.com/v2/ai/collections/b3b1c8a2-9f4e-4d2a-9c1e-2f7a6d5b4c3a/sources \
  -H "Authorization: Bearer $TELNYX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "source_type": "voice" }'
```

```json theme={null}
{
  "data": {
    "id": "source_8vkvtcksnawvbnxq48yv2l06wx",
    "record_type": "ai_collection_source",
    "collection_id": "b3b1c8a2-9f4e-4d2a-9c1e-2f7a6d5b4c3a",
    "source_type": "voice",
    "status": "ready"
  }
}
```

Returns `201 Created` with the new source object.

## Replace All Sources

`PUT /v2/ai/collections/{uuid}/sources` replaces the complete source list. The server reconciles by logical identity:

* `voice` -- by `source_type`

Retained sources are not reindexed. Dropped sources are detached from this collection only -- replacing the list never starts physical cleanup of chunks, embeddings, or metadata, and never deletes the underlying Telnyx product data.

```bash theme={null}
curl -X PUT https://api.telnyx.com/v2/ai/collections/b3b1c8a2-9f4e-4d2a-9c1e-2f7a6d5b4c3a/sources \
  -H "Authorization: Bearer $TELNYX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "sources": [
      { "source_type": "voice" }
    ]
  }'
```

```json theme={null}
{
  "data": [
    { "id": "source_8vkvtcksnawvbnxq48yv2l06wx", "record_type": "ai_collection_source",
      "collection_id": "b3b1c8a2-9f4e-4d2a-9c1e-2f7a6d5b4c3a", "source_type": "voice", "status": "ready" }
  ],
  "meta": {
    "added":    [],
    "retained": [ "source_8vkvtcksnawvbnxq48yv2l06wx" ],
    "removed":  [ "source_8atnodb2vjqlpqwm211lwo739w" ]
  }
}
```

## List Sources

```bash theme={null}
curl -H "Authorization: Bearer $TELNYX_API_KEY" \
  "https://api.telnyx.com/v2/ai/collections/b3b1c8a2-9f4e-4d2a-9c1e-2f7a6d5b4c3a/sources"
```

```json theme={null}
{
  "data": [
    { "id": "source_8vkvtcksnawvbnxq48yv2l06wx", "record_type": "ai_collection_source",
      "collection_id": "b3b1c8a2-9f4e-4d2a-9c1e-2f7a6d5b4c3a",
      "source_type": "voice", "status": "ready" }
  ]
}
```

## Remove One Source

`DELETE /v2/ai/collections/{uuid}/sources/{source_id}` removes a single source; the rest are untouched. Excluded from new searches immediately -- this detaches the collection's pointer to the source only.

A source can back many collections, so detaching never starts physical cleanup of chunks, embeddings, or metadata. Never deletes the original Telnyx product data. Never disables a bucket or credential connection.

```bash theme={null}
curl -X DELETE -H "Authorization: Bearer $TELNYX_API_KEY" \
  "https://api.telnyx.com/v2/ai/collections/b3b1c8a2-9f4e-4d2a-9c1e-2f7a6d5b4c3a/sources/source_8vkvtcksnawvbnxq48yv2l06wx"
```

Returns `204 No Content` -- no body.

## Related

* [Collections](/docs/ai-search/manage-collections) -- create, list, retrieve, update, and delete collections
* [Settings](/docs/ai-search/settings) -- configure retrieval type and top\_k
