Here's what you can do with the API:
โ Ad accounts
Get information about an ad account, its balance, spending, available budget, and linked ad accounts.
โ Create ads
Create and edit ads through the API โ set the text, link, CPM, frequency, channel/bot avatar, and other parameters.
Ads can lead to a Telegram channel, a specific post, a bot, or an external website.
โ Different placements
The API supports four placement types:
channel_post โ in channel posts;
bot_banner โ banners in bots;
search_result โ in search results;
video_banner โ video banners.
โ Photos and videos
Can be uploaded directly through the API.
Ads support JPEG/PNG and MP4. Videos can be from 3 to 60 seconds long.
โ Channel targeting
Choose channels where the ad should be shown, as well as exclude specific channels.
You can also target channels by language and topic.
โ User targeting
Available targeting options include countries, locations, languages, topics, topic intersections, audiences, devices, and channel lists.
You can also exclude specific topics, channels, and audiences.
There are separate parameters for showing or excluding ads in political channels.
โ Bot targeting
Choose specific bots where the ad should be displayed.
โ Search targeting
For search_result, you can specify keywords or phrases that users search for to trigger the ad.
โ Audiences
The API supports advertising audiences, which can be used for targeting or excluding users from campaigns.
โ Pixel and conversions
External websites have a separate Pixel API.
You can create a Pixel, create and edit events, get a list of events, and use a specific conversion event in an ad.
This allows you to track not only clicks, but also conversions after users visit the website.
โ Budgets
Set the initial budget, CPM, and daily spending limit.
The API also allows you to increase or decrease the budget, and for inactive ads, return part of the budget back to the ad account.
โ Scheduling
Ads can be started or stopped on specific dates, with a schedule for when they should be shown.
You can also pause and resume ads programmatically.
โ Moderation
The API has a separate ready_for_review status and a submitAdForReview method.
This means ads can be created and submitted for review programmatically.
โ Statistics
Available ad statistics include:
views โ views;
opens โ video opens;
clicks โ clicks;
actions โ conversion actions;
spent_budget โ spent budget.
Statistics can be retrieved for a specific time period and used to generate reports.
โ Finances and transactions
Get transaction history for an ad account and individual ads.
Transactions have in_progress, failed, and completed statuses, along with the amount, currency, and linked account/ad.
โ Currencies
Ad accounts can use:
EUR โ Euro;
TON โ Toncoin (Gram);
XTR โ Telegram Stars.
The currency is selected when creating the ad account and cannot be changed later.
๐ฐ Documentation: ads.telegram.org/docs/api
@telelakel

