Targeting codes and groups
GET /v1/targeting lists the country, language and topic codes and ad button values campaigns accept; GET /v1/groups lists campaign groups.
GET /v1/targeting
The codes POST /v1/campaigns accepts. The lists are the ones the Adsly create form uses, so a code from here is never refused as unknown.
curl -s https://app.adsly.pro/api/v1/targeting -H "X-API-Key: $ADSLY_API_KEY"
{
"success": true,
"data": {
"countries": [ { "code": "DE", "name": "Germany" }, { "code": "US", "name": "United States" } ],
"languages": [ { "code": "en", "name": "English" }, { "code": "zh-hans", "name": "Chinese (Simplified)" } ],
"topics": [ { "id": 7, "name": "Cryptocurrencies" }, { "id": 26, "name": "Investments" } ],
"buttons": [ "subscribe", "view", "read", "learn_more", "download", "open", "sign_up", "buy", "order", "play", "try", "leave_request" ]
}
}
| List | Used in | Notes |
|---|---|---|
countries[].code | countries | ISO 3166 two-letter codes, plus Telegram’s own FT (anonymous numbers). |
languages[].code | languages | Telegram’s language keys — e.g. pt-br and pt-pt, not pt. |
topics[].id | topics, exclude_topics | Numbers; the ids are not consecutive. |
buttons | button | Only in cabinets whose features.ad_button is true. |
The lists change rarely — fetch them once and cache them for a day.
Groups
Groups are folders for campaigns in the panel. Put new campaigns or copies into one with group_id (existing) or new_group_name (created, or reused if the name exists).
GET /v1/groups
curl -s "https://app.adsly.pro/api/v1/groups?account_id=53" -H "X-API-Key: $ADSLY_API_KEY"
{ "success": true, "data": [ { "id": 7, "account_id": 53, "name": "October test", "color": "#6366f1" } ] }
Without account_id you get the groups of every cabinet the key reaches. A group belongs to one cabinet — group_id from another cabinet is refused.
Updated 2026-10-08