Create widget API
Each request must be authorized using Header:
http
Authorization: Bearer {apiToken}
{apiToken} you can see on account page
Create widget
API Endpoint
http
POST https://api.tg-ads.co/api/v1/widget/create
Available parameters:
html
siteUrl - URL of TMA should be valid http url.
type - TMA or BOT
adFormat - INTERSTITIAL, PUSH_LIKE - for TMA, BOT_MESSAGE for BOT
name - Widget Name
Valid URL Example:
http
POST https://api.tg-ads.co/api/v1/widget/create
json
{
"adFormat": "INTERSTITIAL",
"name": "Your Widget name",
"type": "TMA",
"siteUrl": "https://t.me/yourTma"
}
Response example:
json
{
"id": 6555,
"uid": "67634220-b46d-4951-a5bc-38961114732e",
"name": "test",
"siteUrl": "https://t.me/yourTma",
"adFormat": "INTERSTITIAL",
"type": "TMA",
"createdAt": "2025-09-14T13:50:08+00:00"
}