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

# Messaging

> Index your messaging history in an AI Search collection.

The `message` source indexes your account's messaging history.

## Where this data comes from

Message records come from the [Telnyx Messaging (SMS/MMS)](https://developers.telnyx.com/docs/messaging/messages/configuration-and-usage.md) product -- the messages your account sends and receives through messaging profiles are indexed automatically as a `message` source.

## Attach the Source

```bash theme={null}
curl -X POST https://api.telnyx.com/v2/ai/collections/{uuid}/sources \
  -H "Authorization: Bearer $TELNYX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "source_type": "message" }'
```

There is no per-source configuration. Narrow searches to messages with `sources=message` -- see [Search](https://developers.telnyx.com/docs/ai-search/searching.md).

***

See all source types on the [Sources overview](https://developers.telnyx.com/docs/ai-search/sources.md).
