Create placement API
Each request must be authorized using Header:
http
Authorization: Bearer {apiToken}{apiToken} is an API key you create in the publisher cabinet: Account → API keys, with the widgets:write scope. It is shown only once. Details: API keys.
Create a placement
http
POST https://api.adexium.io/api/v1/widget/create| Field | Required | Description |
|---|---|---|
name | yes | Placement name |
type | yes | Placement type, see the table below |
adFormat | yes | Ad format; must match the type, see the table below |
siteUrl | yes | Valid http(s) URL: the public t.me link of your Mini App or bot, your website, or your traffic source |
telegramBotId | for TMA and BOT | Numeric ID of your bot (for a Mini App — the bot it belongs to): the digits before : in the bot token from @BotFather. Send the number only, never the token. It must be the bot from siteUrl |
type | adFormat |
|---|---|
TMA — Telegram Mini App | INTERSTITIAL or PUSH_LIKE |
BOT — Telegram bot | BOT_MESSAGE |
WEB_POPS — website, popunder | WEB_POPS |
WEB_INPAGE — website, in-page notifications | WEB_INPAGE |
DIRECT_LINK — direct link | WEB_POPS |
Request example:
http
POST https://api.adexium.io/api/v1/widget/createjson
{
"adFormat": "INTERSTITIAL",
"name": "Your placement name",
"type": "TMA",
"siteUrl": "https://t.me/yourBot/yourApp",
"telegramBotId": "1234567890"
}Response example:
json
{
"id": 6555,
"uid": "67634220-b46d-4951-a5bc-38961114732e",
"name": "Your placement name",
"siteUrl": "https://t.me/yourBot/yourApp",
"adFormat": "INTERSTITIAL",
"type": "TMA",
"createdAt": "2025-09-14T13:50:08+00:00"
}uid is the Placement ID (WID) you put into the ad code; id is the numeric ID used by the stats API.
A TMA or BOT placement without telegramBotId, or with the ID of a different bot than the one in siteUrl, is rejected with a validation error on the telegramBotId field.