Skip to content

Publisher API ​

The publisher endpoints are prefixed with /api/publisher. Except for login / register / password reset, all require the publisher JWT: Authorization: Bearer <token>.

For the response envelope, pagination, and error-code conventions, see Overview & Authentication.

Authentication ​

Login ​

POST /api/publisher/auth/login

ParamTypeRequiredDescription
usernamestringYesUsername or registered email
passwordstringYesLogin password
bash
curl -X POST https://api.adbnk.co/api/publisher/auth/login \
  -H "Content-Type: application/json" \
  -d '{"username":"pub_demo","password":"secret123"}'

The response structure matches advertiser login, returning token / token_type / expires_in / user.

Other auth endpoints ​

MethodPathDescription
POST/auth/registerRegister
POST/auth/forgot-passwordSend reset email, param email
POST/auth/reset-passwordParams token, new_password, confirm_password
POST/auth/logoutLog out
GET/auth/profileCurrent publisher info
POST/auth/passwordChange password (old_password/new_password/confirm_password)

Sites ​

List ​

GET /api/publisher/sites

ParamTypeRequiredDescription
page / page_sizeintNoPagination
keywordstringNoName/domain search
statusstringNoStatus
audit_statusstringNoReview status
start_date / end_datedateNoCreation time range

Create a site ​

POST /api/publisher/sites

ParamTypeRequiredDescription
namestringYesSite name
media_typestringNoMedia type: WEB (default) / APP / TELEGRAM
media_type_idintNoSub-type of the media type. It must belong to the site's media_type; otherwise the request fails with 400 error.site.media_type_id_invalid
domainstringYes*Required for WEB and TELEGRAM; must be a valid, unclaimed domain. For TELEGRAM it is the domain of the Mini App URL
app_packagestringYes*Required for APP; package name unique
urlstringNoSite URL; auto-set to https://<domain> when omitted. For TELEGRAM, send the https URL of the Mini App
tg_bot_usernamestringYes*TELEGRAM only. Bot username: 5–32 characters; starts with a letter, then letters, digits or underscores, and ends with bot (any case). A leading @ is accepted and removed
tg_app_short_namestringNoTELEGRAM only. Mini App short name, 3–30 letters, digits or underscores
descriptionstringNoSite description
industry_idintNoIndustry ID
icpstringNoICP filing number
bash
curl -X POST https://api.adbnk.co/api/publisher/sites \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"name":"My Blog","media_type":"WEB","domain":"blog.example.com"}'

A new site defaults to audit_status=PENDING and must be approved before zones can be created.

Telegram Mini App sites ​

To add a Telegram Mini App, send media_type=TELEGRAM with domain, url, tg_bot_username and, optionally, tg_app_short_name. Don't send a Bot ID or a bot token: we look up the bot from its username. The Telegram fields can't be changed after the site is created (they are ignored on PUT); to use another bot, add a new site. Telegram sites are always reviewed manually. See Telegram Mini App for the whole setup.

bash
curl -X POST https://api.adbnk.co/api/publisher/sites \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"name":"My Mini App","media_type":"TELEGRAM","domain":"app.example.com","url":"https://app.example.com/","tg_bot_username":"my_app_bot"}'

Telegram sites carry an extra tg object in the site response (create, list and details):

FieldTypeDescription
bot_idstringThe Bot ID we found. A decimal string — keep it as a string, it can exceed the safe integer range of JavaScript
bot_usernamestringBot username
app_short_namestring | nullMini App short name
tme_urlstringhttps://t.me/<bot_username>
stepsobjectVerification state: domain, bio, launch, each verified or pending

Check that bot_id and bot_username are your bot.

codemessage_keyMeaning
400error.site.tg_bot_username_invalidThe bot username is not valid
400error.site.tg_short_name_invalidThe Mini App short name is not valid
400error.site.tg_bot_not_foundNo bot with this username was found
400error.site.media_type_id_invalidmedia_type_id doesn't belong to the site's media type (applies to every media type)
429common.rate_limitedToo many bot lookups; try again later
503error.site.tg_resolve_unavailableThe bot lookup is temporarily unavailable; try again later

Other site operations ​

MethodPathDescription
GET/sites/{id}Details
PUT/sites/{id}Update. A changed media_type_id must belong to the site's media type (400 error.site.media_type_id_invalid)
DELETE/sites/{id}Delete
POST/sites/{id}/toggleEnable/pause
GET/sites/{id}/statsSite stats
GET/sites/{id}/verify-codeGet the verification codes. For TELEGRAM sites the response also has a tg object: the fields above plus bio_code (the code for the bot description) and launch_links (the links to open once in Telegram)
POST/sites/{id}/verifyVerify the site, param method. For TELEGRAM sites see below

Verifying a Telegram site ​

A Telegram site is verified in three steps: domain (the same methods as a website), bot description and opening the launch link once in Telegram. Each call to POST /sites/{id}/verify re-checks every step that hasn't passed yet; steps that passed stay passed.

Until all three pass, the call returns 422 with message_key error.site.tg_verify_incomplete and the state of each step in data.steps:

json
{ "code": 422, "message_key": "error.site.tg_verify_incomplete",
  "data": { "steps": { "domain": "verified", "bio": "not_found", "launch": "not_detected" } } }
StepValues
domainverified / pending (the verification code was not found on the domain yet)
bioverified / not_found (the code is not in the bot description) / retry (couldn't check right now; try again in a few minutes)
launchverified / not_detected (no launch with the code seen yet) / retry (couldn't check right now; try again)

When all three pass, the call succeeds with verified: true and the steps. Calling it again for a site that is already verified also succeeds with verified: true, but that response may not include steps. This means the site is verified and waiting for our review — audit_status doesn't change (a new site stays PENDING) until the review is done. Verification never approves a Telegram site by itself.

Zones ​

List ​

GET /api/publisher/zones

ParamTypeRequiredDescription
site_idintNoFilter by site
typestringNoAd-type filter
statusstringNoStatus
audit_statusstringNoReview status
keywordstringNoName search

Create a zone ​

POST /api/publisher/zones

ParamTypeRequiredDescription
namestringYesZone name
site_idintYesParent site; must belong to the current publisher and be approved
zone_type_idintYes*Zone-type ID (recommended); the ad type follows from it
ad_type / typestringYes*Ad type, e.g. BANNER / NATIVE / VIDEO / POPUP / REWARDED, etc. Needed only when zone_type_id is not sent
size_idintNoSize ID
widthintNoWidth, default 300
heightintNoHeight, default 250
positionstringNoPosition, default CONTENT
devicestringNoDevice, default ALL
floor_ecpmnumberNoFloor price in eCPM ($ per 1,000 impressions), default 0

On success the system auto-generates a unique zone_key (of the form zone_ab12cd34), used for ad requests.

Other zone operations ​

MethodPathDescription
GET/zones/{id}Details
PUT/zones/{id}Update (site_id immutable)
DELETE/zones/{id}Delete
POST/zones/{id}/toggleEnable/pause
GET/zones/{id}/codeGet embed code
GET/zones/{id}/previewPreview
POST/zones/{id}/submit-auditSubmit for review
GET/zones/{id}/statsZone stats

Telegram Mini App zones ​

On a TELEGRAM site, send zone_type_id; only these zone types are available: banner, mobile banner, sticky banner, floating banner, mobile floating banner, native feed, mobile interstitial, desktop interstitial, rewarded video and rewarded interstitial. Any other type returns 400 error.zone.type_telegram_unsupported.

For these zones, GET /zones/{id}/code returns one Telegram snippet, each shaped {name, description, code}:

KeyZone typesDescription
telegram_tagBanners, floating banners, native feedZone tag plus the SDK, placed in the page
telegram_programmaticInterstitials, rewardedCalls window.adbnk.telegram.init().show() from your code. Also has ssv (boolean): true for rewarded zones, which should grant rewards from the server callback

There is no link, iframe or VAST form for Telegram zones. See Telegram Mini App.

Once you have the zone_key, you can make ad requests — see Ad Request API.

Revenue reporting ​

MethodPathDescription
GET/statistics/exploreFlexible report: choose metrics, dimensions, filters and comparison (what the console's Statistics page uses). Params and export=csv|xlsx work as in the Advertiser API
GET/statistics/explore/metaThe metrics and dimensions available to your account
GET/statistics/reportSummary report
GET/statistics/sitesBy site
GET/statistics/zonesBy zone
GET/statistics/regionGeo report
GET/statistics/hourlyHourly report
GET/statistics/deviceDevice report
GET/statistics/exportExport

GET /api/publisher/statistics/report params:

ParamTypeRequiredDescription
start_datedateNoStart date, default 7 days ago
end_datedateNoEnd date, default today
group_bystringNoGroup dimension, default date
site_idintNoSpecific site

Withdrawals ​

MethodPathDescription
GET/withdrawals/balanceQuery withdrawable balance
GET/withdrawalsWithdrawal record list
POST/withdrawalsInitiate a withdrawal
GET/withdrawals/transactionsFund transactions
GET/withdrawals/payment-methodsAvailable payout channels
GET/withdrawals/bank-cardsBank card list
POST/withdrawals/bank-cardsAdd bank card
DELETE/withdrawals/bank-cards/{id}Delete bank card
GET/withdrawals/{id}Withdrawal details
POST/withdrawals/{id}/cancelCancel withdrawal

Initiate a withdrawal ​

POST /api/publisher/withdrawals

ParamTypeRequiredDescription
amountnumberYesWithdrawal amount, greater than 0 and not below the channel minimum
payment_method / channelstringYesPayout channel: BANK/USDT (channels currently enabled)
account_infostringNoReceiving account info (channel-specific)
bank_infoobjectNoAccount details for the bank channel

KYC hard gate

Withdrawals require the account to complete identity verification (KYC); otherwise the request returns 412.

bash
curl -X POST https://api.adbnk.co/api/publisher/withdrawals \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"amount": 300, "payment_method": "USDT", "account_info": "TRC20:TXxxxx"}'

Fees and taxes are computed per platform and channel config; the final arrival amount = withdrawal amount − fee − tax. For settlement and payout rules, see the Settlement & Payouts guide.

TIP

For more publisher features (blacklist, notification binding, referral, etc.), refer to the publisher console.

Documentation released under the MIT License.