# Telegram API for channels, albums and pins

Schedule Telegram channel messages, 10-item mixed photo/video albums, silent broadcasts, content protection, spoilers and pinned posts via REST API.

Running Telegram broadcasts across multiple channels means provisioning bot tokens, juggling sendMessage vs sendPhoto vs sendMediaGroup payloads, enforcing 1,024 vs 4,096 character caps and tracking message IDs to pin or delete. PostSyncer handles bot admin onboarding, mixed albums, silent sends and pinning in one REST API.

**REST API:** https://postsyncer.com/api/v1 · **MCP server:** https://postsyncer.com/mcp · **Docs:** https://postsyncer.com/docs/platforms/telegram

## Example Telegram request

```bash
curl -X POST "https://postsyncer.com/api/v1/posts" \
  -H "Authorization: Bearer $POSTSYNCER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "workspace_id": 4815,
    "schedule_type": "schedule",
    "schedule_for": {
      "date": "2026-12-04",
      "time": "16:00",
      "timezone": "America/Los_Angeles"
    },
    "content": [
      {
        "text": "Latte art Fridays are back at Halden Coffee. First pour starts at 5 PM.",
        "media": [
          "https://cdn.postsyncer.com/examples/latte-art.jpg",
          "https://cdn.postsyncer.com/examples/rosetta-pour.mp4"
        ]
      }
    ],
    "accounts": [
      {
        "id": 16244,
        "settings": {
          "disable_notification": true,
          "protect_content": false,
          "pin_message": true,
          "has_spoiler": false,
          "show_caption_above_media": false
        }
      }
    ]
  }'
```

```json
{
  "id": 81432,
  "status": "SCHEDULED",
  "platforms": [
    {
      "account_id": 16244,
      "platform": "telegram",
      "status": "PENDING",
      "settings": {
        "disable_notification": true,
        "pin_message": true
      }
    }
  ],
  "skipped_accounts": [],
  "needs_media": []
}
```

## Quick start

1. **Connect public or private channels via bot link.** Generate a connect link with POST /accounts/connect-links (provider: telegram). The channel owner taps Open Telegram, picks the channel and adds PostSyncer’s bot as an admin.

2. **Schedule messages, albums or pinned broadcasts.** Call POST /posts with plain text, one photo/video/GIF or a 2–10 file mixed album, plus Telegram controls like disable_notification, protect_content, pin_message and has_spoiler.

3. **Monitor public channel views and reactions.** Pull message views (impressions) and reactions (likes) on public channels via GET /analytics/posts/{id}, and subscriber totals for both public and private channels.

## Telegram endpoints

- `POST /api/v1/posts` (`posts:create / schedule / publish`): Schedule or publish Telegram channel text messages, single media items and 2–10 file mixed albums.

- `POST /api/v1/accounts/connect-links` (`accounts:create`): Create a 7-day connect link (each Open Telegram tap in it lasts 15 minutes) so channel admins connect a channel without sharing tokens.

- `DELETE /api/v1/posts/{id}` (`posts:delete`): Cancel scheduled messages or ask Telegram to delete a published message (in an album, only the first item).

- `GET /api/v1/analytics/posts/{id}` (`analytics:read`): Read message views (impressions) and reactions (likes) on public Telegram channels.

- `GET /api/v1/analytics/accounts/{id}` (`analytics:read`): Track channel subscriber count across both public and private Telegram channels.

## Telegram media and text specs

- **Mixed album** (JPG, PNG, GIF, WebP, MP4, MOV, 2 to 10 files mixed): Text attaches as the first item’s caption (≤ 1,024 chars); GIFs inside albums convert to JPEG.

- **Photo & solo GIF** (JPG, PNG, GIF, WebP, Up to 5 MB each): A lone GIF plays as an animation; extreme aspect-ratio images (> 20:1) convert cleanly to JPEG.

- **Video** (MP4, MOV, Up to 20 MB): Telegram Bot API caps video uploads at 20 MB; oversized videos return 422 with the exact limit.

- **Text vs caption cap** (Plain text (no HTML/MD), 4,096 text · 1,024 media caption): Over-limit messages return 422 on schedule/publish (drafts unchecked). Sent as plain text.

- **Caption placement** (Boolean flag, show_caption_above_media): Places the caption above the photo, video or GIF instead of underneath it.

- **platform key:** telegram

- **Channel types:** Public and private Telegram channels only (not groups); requires bot admin permission to post, edit and delete.

- **Threads & first comment:** Multiple content[] items join with blank lines into one message; first comment items are skipped.

- **Deleting posts:** DELETE /posts/{id} removes the channel message; for albums, PostSyncer deletes only the first file, so remove the rest in Telegram.

- **Comments API:** PostSyncer does not read Telegram discussion comments; hide returns 422.

- **Analytics metrics:** Public channels report impressions (views) and likes (reactions); private channels return telegram_private for post stats while still counting subscribers.

## Telegram capabilities and settings

Telegram channels power crypto communities, developer changelogs, newsrooms and creator clubs. PostSyncer exposes native channel controls cleanly alongside your other social networks.

- **No custom Telegram bots to host.** Skip creating BotFather tokens, webhook listeners or admin-check loops. Channel owners tap PostSyncer’s guided Open Telegram link, pick their channel and grant posting rights in seconds.

- **Mixed photo & video albums.** Pass 2 to 10 photos and videos in content[0].media and PostSyncer automatically routes them as a Telegram media group album — converting GIFs inside albums or extreme-ratio photos to JPEG when Telegram requires it.

- **Silent sends, content protection & auto-pinning.** Toggle disable_notification for quiet overnight posts, protect_content to block forwarding and saving, and pin_message to pin the announcement right after delivery.

- **Spoiler media & above-media captions.** Blur photos, videos or GIFs until tapped with has_spoiler: true, or move the caption above the visual using show_caption_above_media: true.

- **Strict 4,096 / 1,024 length guards.** Telegram splits its limit sharply between text-only posts (4,096 chars) and media captions (1,024 chars). PostSyncer enforces the exact rule synchronously with 422 before scheduling.

- **Cross-post without HTML parse failures.** Because PostSyncer transmits clean plain text to Telegram, stray asterisks, underscores or angle brackets from your X or LinkedIn copy never trigger Telegram Markdown/HTML parse errors.

- `title` (string (≤ 4,096 / 1,024)): Telegram-specific message text overriding content[0].text; a longer one is refused with 422 on schedule or publish.

- `disable_notification` (boolean): Broadcasts the message silently without triggering subscriber push sounds.

- `protect_content` (boolean): Prevents channel subscribers from forwarding or saving the message.

- `pin_message` (boolean): Pins the message (or album’s first item) in the channel right after publish.

- `has_spoiler` (boolean): Applies Telegram’s shimmering spoiler cover over attached photos, videos or GIFs.

- `show_caption_above_media` (boolean): Renders the caption above the media attachment instead of underneath.

- `media` (number[]): Overrides shared post media with Telegram-sized media library IDs (≤ 20 MB videos).

## Clean channel onboarding without asking users for BotFather tokens

Most developer tools force users to open BotFather, generate a secret bot token, paste it into a dashboard and manually promote their bot in channel settings. PostSyncer replaces that fragile flow with one guided connect link generated by POST /api/v1/accounts/connect-links (provider: telegram).

The channel owner taps Open Telegram, clicks Start, selects a public or private channel (the connect link lasts 7 days, and each Open Telegram tap stays active for 15 minutes and connects one channel), and Telegram promotes PostSyncer’s bot with post, edit and delete rights automatically. Public channels where the bot is already an admin can also connect directly by @username.

## Designing around Telegram’s 20 MB video ceiling and pin permissions

Telegram’s standard Bot API caps uploaded videos at 20 MB and media captions at 1,024 characters. When you cross-post a 150 MB YouTube or TikTok clip alongside Telegram, PostSyncer validates every account up front and flags the 20 MB ceiling with HTTP 422 — letting you supply a compressed clip in Telegram’s accounts[].settings.media without touching the higher-bitrate master sent to other networks.

When pin_message is true, PostSyncer pins the message once right after delivery. If the channel admin removed the bot’s edit-messages right, the post still publishes and PostSyncer records a setting_not_applied note explaining how to re-enable pinning.

## Public channel views & reactions vs private channel tracking

For public Telegram channels, PostSyncer reads per-post views (mapped to impressions) and reactions (mapped to likes) directly from the channel’s public page. Private channels have no public web preview, so per-post analytics transparently report analytics_unavailable.reason: telegram_private while GET /analytics/accounts/{id} still tracks subscriber growth accurately.

Keep in mind that DELETE /posts/{id} has PostSyncer delete only the first item of a multi-file album, so remove the rest in Telegram; single messages and single-media posts delete completely.

## Broadcast to Telegram channels from ChatGPT, Claude or OpenClaw via MCP

Connect your AI agent to PostSyncer’s MCP server to schedule silent Telegram digests, pin release announcements and check public channel view counts alongside all 12 networks.

Related pages: [Telegram MCP](https://postsyncer.com/telegram-mcp), [Telegram scheduler](https://postsyncer.com/telegram-scheduler), [Unified social media API](https://postsyncer.com/unified-social-media-api).

## Limits and plans

| Plan | Social accounts | Posts | API posts a day, per network |
| --- | --- | --- | --- |
| Free | 2 | 20 a month | Within the 20 |
| Starter ($29 a month) | 10 | Unlimited | Unlimited |
| Pro ($49 a month) | 30 | Unlimited | Unlimited |
| Agency ($99 a month) | 100, then $1/mo each | Unlimited | Unlimited |

Every plan: 60 requests a minute for each PostSyncer user, across all their keys, the API and the MCP server together.

## FAQ

### Does the Telegram API support both public and private channels?

Yes. Both public and private Telegram channels connect through PostSyncer’s bot onboarding link. Groups are not supported — only channels.

### Can I publish mixed photo and video albums to Telegram?

Yes. Pass 2 to 10 photos and videos in content[0].media and PostSyncer sends them as a Telegram media group album, attaching your text to the first item.

### Does PostSyncer support silent messages, content protection and pinning?

Yes. Set disable_notification, protect_content, pin_message, has_spoiler or show_caption_above_media inside accounts[].settings on POST /api/v1/posts.

### Why is Telegram’s video limit 20 MB?

Telegram’s Bot API limits video uploads to 20 MB (photos up to 5 MB). Compress larger videos or pass a Telegram-specific library ID in settings.media when cross-posting.

### Does Telegram parse Markdown or HTML in post text?

No. PostSyncer sends plain text to Telegram (up to 4,096 characters for text messages and 1,024 characters for media captions) so cross-posted copy never fails on unescaped formatting.

### What analytics are available for Telegram channels?

Public channels return views (impressions) and reactions (likes) per post plus subscriber counts. Private channels track subscriber counts while reporting telegram_private for per-post metrics.

---

Page: https://postsyncer.com/telegram-api · Updated 2026-11-27
