Skip to content

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
FieldRequiredDescription
nameyesPlacement name
typeyesPlacement type, see the table below
adFormatyesAd format; must match the type, see the table below
siteUrlyesValid http(s) URL: the public t.me link of your Mini App or bot, your website, or your traffic source
telegramBotIdfor TMA and BOTNumeric 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
typeadFormat
TMA — Telegram Mini AppINTERSTITIAL or PUSH_LIKE
BOT — Telegram botBOT_MESSAGE
WEB_POPS — website, popunderWEB_POPS
WEB_INPAGE — website, in-page notificationsWEB_INPAGE
DIRECT_LINK — direct linkWEB_POPS

Request example:

http
POST https://api.adexium.io/api/v1/widget/create
json
{
    "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.