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

# Telegram Bot

> Understand Telegram bot conversations, start payloads, and attachments.

Connected Telegram bots use `ticket.channel.type: "telegram"` in webhooks. Personal Telegram accounts use the separate [Telegram Account](https://docs.yo-lead.com/concepts/telegram-account.md) channel type. Bots are connected and managed in the YoLead UI.

## Contacts and sending

Telegram Bot recipients use `telegram_user_id`. Starting an outbound conversation requires a user who has previously contacted the connected bot and whom the bot can still reach. A contact identity alone does not grant permission to message that user.

In Embed, replying in an existing chat requires `showSendInput`. Starting a new conversation requires `startOutboundChat`, employee access, and the corresponding plan feature. See [Embed capabilities](https://docs.yo-lead.com/embed/capabilities.md).

## Messages and attachments

New messages can contain [attachment descriptors](https://docs.yo-lead.com/concepts/message-attachments.md). Telegram albums appear as separate messages; Public API history can include `mediaGroupId` to group their items.

Employees can send up to five JPEG/PNG photos or up to five documents in one send. Photos and documents cannot be mixed. The caption limit is 1024 characters. Photos support up to 10 MiB per file and documents up to 20 MiB, subject to lower storage limits and provider restrictions.

## Attribution and history

An incoming `/start` command can supply `ticket.attribution.payload` when it creates a ticket. See [Ticket attribution](https://docs.yo-lead.com/concepts/ticket-attribution.md) for capture rules.

History contains messages stored by YoLead. Starting a new outbound bot conversation does not import earlier Telegram correspondence. Ticket history and incoming-message webhooks use the common message contract.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.