DankADS HTTP API
Everything you need to integrate ad serving into your Telegram bot. Simple HTTP endpoints — no libraries or SDKs required. Just make REST calls from any language or framework.
Quick Start
Register Your Bot
Sign up as a publisher and add your Telegram bot to get an API key.
Fetch Ads
Call GET /v1/fetch-ad from your bot to get an ad to display.
Get Paid
Impressions and clicks are tracked automatically. Withdraw via crypto.
Base URL
Authentication
All API requests require your bot's API key sent via the x-ad-api-key header.
Advertiser endpoints use JWT bearer tokens via the Authorization: Bearer <token> header (or access_token cookie for browser sessions).
# Publisher (bot) authentication curl -H "x-ad-api-key: YOUR_API_KEY" \ "https://ads.myrx.pw/v1/fetch-ad?user_telegram_id=12345&user_lang=en" # Advertiser authentication curl -H "Authorization: Bearer YOUR_JWT_TOKEN" \ "https://ads.myrx.pw/v1/campaigns"
Ad Serving
/v1/fetch-ad
Fetch a targeted ad for a user. Returns ad content, click URL, and impression tracking URL.
user_telegram_id (required),
user_lang (optional),
user_country (optional),
tags (optional)
x-ad-api-key: YOUR_KEY
/track/impression
Register an ad impression. Called automatically via the impression URL returned by /v1/fetch-ad.
/c/{short_code}
Track an ad click and redirect to the advertiser's destination URL. Called when users tap the ad button.
Campaign Management
/v1/campaigns
List all campaigns for the authenticated advertiser.
/v1/campaigns
Create a new campaign with bid amount, budget, and pricing model (CPC/CPM).
/v1/campaigns/{campaign_id}
Update a campaign's name, bid amount, daily budget, total budget, or date range.
/v1/campaigns/{campaign_id}
Delete a campaign (only if no spend has occurred).
/v1/campaigns/{campaign_id}/stats
Get performance stats for a campaign (clicks, impressions, spend, CTR over time).
Ad Management
/v1/ads
List all ads for a campaign.
/v1/ads
Create a new ad with title, body text, destination URL, and optional media.
/v1/ads/{ad_id}
Update an ad's content, destination, tags, or targeting settings.
/v1/ads/{ad_id}
Delete an ad.
Stats & Revenue
/v1/advertiser/stats
Advertiser dashboard stats — aggregated clicks, impressions, and spend across all campaigns.
/v1/publisher/deposit
Request a withdrawal of earnings to a crypto wallet.
Response Format
All endpoints return JSON. Successful responses include the result data. Errors follow this structure:
{
"detail": "Error description"
}
Rate Limits
Ad serving endpoints are rate-limited per IP to prevent abuse. Exceeding limits will return
429 Too Many Requests. Standard dashboard endpoints are
rate-limited to 60 requests per minute per user.
Need Help?
Check out the integration guide in your publisher dashboard, or reach out for support.