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
Get API Key
Sign up for free and get your API key in seconds.
Connect Account
Use our OAuth flow to connect Telegram accounts.
Start Posting
Make API calls to post content to Telegram.
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
/v1/postsCreate or schedule a Telegram post (text, photos, videos, or albums)
/v1/posts/{id}Get status and details of a Telegram post
/v1/posts/{id}Cancel a scheduled Telegram post or delete a published message
/v1/profilesList all connected Telegram channels and groups
/v1/connect/telegramGenerate access code to connect a Telegram channel or group
/v1/connect/telegramDirect connection using chat ID (for power users)
/v1/connect/telegramCheck connection status for a pending access code
Media Specs
Media Requirements
| Type | Format | Max Size | Notes |
|---|---|---|---|
| Photo | JPEG, PNG, GIF, WebP | 10 MB | Up to 10 photos per album |
| Video | MP4, MOV | 50 MB | Up to 10 videos per album |
| Text | UTF-8 | 4096 chars | HTML/Markdown supported |
| Document | Any file type | 50 MB | PDF, 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
{
"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