API Reference

Telegram API

Post text, photos, videos, and albums to Telegram channels and groups with a single API call.

Quick Start

Get started in 3 steps

1

Get API Key

Sign up for free and get your API key in seconds.

2

Connect Account

Use our OAuth flow to connect Telegram accounts.

3

Start Posting

Make API calls to post content to Telegram.

Post to Telegram
JavaScript
const response = await fetch('https://getlate.dev/api/v1/posts', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    content: 'Just launched our new API! Check it out 🚀',
    mediaItems: [{ type: 'image', url: 'https://example.com/launch.png' }],
    platforms: [{
      platform: 'telegram',
      accountId: 'acc_abc123'
    }],
    publishNow: true
  })
});

const post = await response.json();
console.log(post.post._id); // '65f1c0a9e2b5af0012ab34cd'

Endpoints

Telegram Endpoints

POST/v1/posts

Create or schedule a Telegram post (text, photos, videos, or albums)

GET/v1/posts/{id}

Get status and details of a Telegram post

DELETE/v1/posts/{id}

Cancel a scheduled Telegram post or delete a published message

GET/v1/profiles

List all connected Telegram channels and groups

GET/v1/connect/telegram

Generate access code to connect a Telegram channel or group

POST/v1/connect/telegram

Direct connection using chat ID (for power users)

PATCH/v1/connect/telegram

Check connection status for a pending access code

Media Specs

Media Requirements

TypeFormatMax SizeNotes
PhotoJPEG, PNG, GIF, WebP10 MBUp to 10 photos per album
VideoMP4, MOV50 MBUp to 10 videos per album
TextUTF-84096 charsHTML/Markdown supported
DocumentAny file type50 MBPDF, ZIP, etc.

Late automatically transcodes and optimizes media for Telegram's requirements.

Rate Limits

API Limits

Telegram has strict flood control limits. Late handles these automatically with intelligent queuing and retries for reliable posting.

Late handles all rate limiting automatically. We queue and retry requests as needed.

Capabilities

Features

  • Post text, photos, videos, and documents
  • Schedule posts for optimal times
  • Media albums (up to 10 items)
  • HTML and Markdown formatting
  • Silent notifications option
  • Channel and group support
  • Message deletion support
  • Webhook notifications for post status

Response

Response Example

Response
200 OK
{
  "post": {
    "_id": "65f1c0a9e2b5af0012ab34cd",
    "status": "published",
    "content": "Just launched our new API! Check it out 🚀",
    "platforms": [{
      "platform": "telegram",
      "accountId": { "_id": "acc_abc123", "username": "My Channel" },
      "status": "published",
      "platformPostId": "123456",
      "platformPostUrl": "https://t.me/c/1234567890/123456"
    }],
    "publishedAt": "2025-01-10T10:30:00Z"
  },
  "message": "Post published successfully"
}

Start building with Telegram API

Skip the Bot API complexity. Late handles authentication, rate limits, and message formatting so you can ship faster.

Free tier available • No credit card required • 99.97% uptime