Publisher API
The Publisher API gives you programmatic access to your reports, to the CPA offers available to your account and to ad tags for your websites. All endpoints return JSON and accept only GET requests.
Base URL: https://publisher.advertica.com/api/v1
A successful response wraps the result in data:
{ "data": { ... } }
Money values are numbers in the currency of your account (see currency), percentages are numbers from 0 to 100.
Parameters: optional parameters are sent as query string variables in the URL - add ? after the endpoint and join more parameters with &:
https://publisher.advertica.com/api/v1/campaigns?country=US
https://publisher.advertica.com/api/v1/campaigns?country=US&category=5&page=2
https://publisher.advertica.com/api/v1/reports/42?startDate=2026-09-01&endDate=2026-09-30
Parameters that are not set use their default value. Only the API key goes in the header, never in the URL.
Authentication
Create an API key in the publisher panel under Publisher API → API Keys. The API is enabled per account - if you don't see the Publisher API menu in your panel, contact support. For every key you can set:
- Name - to recognise the key, e.g. the application that uses it.
- Validity - forever, or until a date (the key works until the end of that day).
- IP restriction - allow all IPs, or only listed IP addresses / CIDR ranges (IPv4 and IPv6).
The name, validity and IP restriction can be changed later (Edit), the key itself stays the same. The full key can be shown again with the eye icon in the list of your keys. Send it in the Authorization header of every request:
curl -H "Authorization: Bearer YOUR_API_KEY" https://publisher.advertica.com/api/v1/me
Never send the key in the URL - such requests are rejected. If a key leaks, revoke it and create a new one. Every call made with your keys, including rejected ones, is listed under Publisher API → API Logs.
Errors & limits
Errors return an HTTP status code and a body:
{ "error": { "code": "invalid_api_key", "message": "Invalid or revoked API key." } }
| HTTP | code | Meaning |
|---|---|---|
| 401 | missing_api_key | No key in the Authorization header. |
| 401 | invalid_api_key | Unknown or revoked key. |
| 401 | api_key_expired | The key is past its validity date. |
| 401 | key_in_url | The key was sent in the URL instead of the header. |
| 403 | ip_not_allowed | The request comes from an IP the key is not allowed for. |
| 403 | api_disabled | The Publisher API is not enabled for your account - contact support. |
| 403 | account_inactive / account_not_approved | Your account is deactivated / not approved yet. |
| 404 | not_found | Unknown endpoint, report, campaign or ad tag type. |
| 405 | method_not_allowed | Only GET is supported. |
| 422 | invalid_parameter | A parameter has an invalid value - see message. |
| 429 | rate_limited | Too many requests; wait the number of seconds in the Retry-After header. |
| 503 | maintenance | Reports are temporarily unavailable. |
| 500 | internal_error | Unexpected error, please try again later. |
Rate limits: 60 requests per minute per account (all keys together), of which at most 5 calls of /reports/{id}.
GET /me
Checks the key and returns your account settings. Useful as a first test call.
{
"data": {
"publisher_id": 123456,
"currency": "USD",
"api_key": { "name": "Dashboard", "prefix": "adv_1a2b3c4d", "valid_until": null, "ip_whitelist": ["203.0.113.10"] },
"rate_limit": { "requests_per_minute": 60, "report_requests_per_minute": 5 }
}
}
GET /reports
Lists your saved reports. Save a report in the publisher panel (Reports → set up columns and filters → save) and call it by its id.
{
"data": {
"reports": [
{ "id": 42, "name": "Daily by country", "type": "impressions", "url": "https://publisher.advertica.com/api/v1/reports/42" }
]
}
}
type is impressions for reports saved on the main / complete report and conversions for conversion reports.
GET /reports/{id}
Returns the data of a saved report. Columns, filters and sorting are taken from the saved report.
| Parameter | Description |
|---|---|
startDate, endDate | Optional, YYYY-MM-DD, both or none, max. 93 days. Without them the date range of the saved report is used (e.g. "Last 7 days" is always relative to today). |
type | Campaign type: cpa (default), push, cpm_cpc or all. Conversion reports support cpa and push. |
page | Page number, default 1. |
limit | Rows per page, default 100, max. 1000. |
curl -H "Authorization: Bearer YOUR_API_KEY" "https://publisher.advertica.com/api/v1/reports/42?startDate=2026-09-01&endDate=2026-09-30"
{
"data": {
"report": { "id": 42, "name": "Daily by country", "type": "impressions", "campaign_type": "cpa" },
"period": { "start_date": "2026-09-01", "end_date": "2026-09-30" },
"currency": "USD",
"columns": [
{ "key": "date", "label": "Date", "kind": "dimension" },
{ "key": "country", "label": "Country", "kind": "dimension" },
{ "key": "impressions", "label": "Impressions", "kind": "metric" }
],
"totals": { "impressions": 120500, "clicks": 3100, "conversions": 85, "ctr": 2.5726, "cr": 0.0705, "earnings": 154.2, "ecpm": 1.2797 },
"rows": [
{ "date": "2026-09-30", "country": { "id": "US", "name": "United States" }, "impressions": 4200, "clicks": 110, "conversions": 3, "ctr": 2.619, "cr": 0.0714, "earnings": 6.1, "ecpm": 1.4524 }
],
"pagination": { "page": 1, "limit": 100, "total_rows": 540, "total_pages": 6 }
}
}
Dimensions are the columns chosen in the saved report. Plain values (date, hour, month, device_group, status, time) are returned as they are, references (country, campaign, website, placement, ad format, device, OS, browser, ...) as { "id": ..., "name": ... }.
Metrics of impressions reports:
| Field | Description |
|---|---|
impressions | Impressions (unique visitors for push). |
clicks | Clicks. |
conversions | Conversions (subscriptions for push). |
ctr | Click-through rate in %. |
cr | Conversion rate in %. |
earnings | Your earnings. |
ecpm | Earnings per 1000 impressions (page RPM for push). |
totals are the sums of the whole report (all pages), null when there is no data.
Conversion reports return one row per conversion with the chosen columns plus payout (your payout) and payout_updating (true for push subscriptions whose value is not known yet, payout is then null). totals is null.
GET /campaigns
Lists the CPA offers available to your account - the same offers as on the Offers page.
| Parameter | Description |
|---|---|
country | Optional, two-letter country code - only offers targeting this country. |
category | Optional, category ID. |
page | Page number, default 1. |
limit | Offers per page, default 50, max. 500. |
curl -H "Authorization: Bearer YOUR_API_KEY" "https://publisher.advertica.com/api/v1/campaigns?country=US&limit=20"
{
"data": {
"campaigns": [
{
"id": 1234,
"name": "Example Offer",
"active": true,
"category": "Dating",
"flow": "SOI",
"payout": { "type": "per_country", "amount": 0.5, "min": 0.5, "max": 2.4, "currency": "USD" },
"countries": ["DE", "US"],
"adult": false,
"created": "2026-08-14"
}
],
"pagination": { "page": 1, "limit": 50, "total_rows": 210, "total_pages": 5 }
}
}
payout.type:
fixed- the same payout for all countries (amount).per_country- payout differs by country,min/maxgive the range, the exact values are in the campaign detail.amountis the payout of countries without their own price (ornull).revshare- a share of the advertiser's payout,amountis in % (currencyis%).variable- the payout depends on the conversion.
countries is a list of country codes or "any".
GET /campaigns/{id}
Returns all details of an offer.
| Parameter | Description |
|---|---|
placement | Optional placement name used in tracking_link (a-z, A-Z, 0-9, _), default default. Placements are reported separately in your reports. |
curl -H "Authorization: Bearer YOUR_API_KEY" "https://publisher.advertica.com/api/v1/campaigns/1234?placement=footer"
| Field | Description |
|---|---|
id, name, active, category, flow, created | Same as in the list. |
end_date | Date the campaign ends, null if not set. |
description, additional_restrictions | Texts from the offer page (HTML), null if empty. |
image_url, landing_page_preview_url | Campaign logo and landing page screenshot, null if not available. |
payout | As in the list, plus per_country: [{ "country": "US", "country_name": "United States", "amount": 2.4 }]. |
landing_page_content | What the landing page may contain: adult, soft_adult, gambling, drugs, pretense_of_danger, auto_download (true / false). |
targeting | countries ([{"id", "name"}]), devices, operating_systems, browsers, excluded_browsers, carriers - each a list of names or "any". |
capping | { "conversions_per_user": 1, "period_days": 30 } (period_days null = lifetime), or null without capping. |
budget_limited | true when the campaign runs under a budget - once it is reached, your visitors are redirected to other offers. |
forbidden_traffic | Traffic types not allowed for this offer, e.g. incentivized, adult, social_media, email, search. |
tracking_link | Your direct tracking link for this offer. |
banners | [{ "id", "size", "width", "height", "language", "image_url" }] - banners of the offer. |
GET /adtags
Lists the ad tag types you can generate and the accepted values of their parameters (including the current list of banner sizes).
curl -H "Authorization: Bearer YOUR_API_KEY" https://publisher.advertica.com/api/v1/adtags
{
"data": {
"ad_tag_types": [
{
"type": "banner",
"url": "https://publisher.advertica.com/api/v1/adtags/banner",
"format": "html",
"parameters": {
"website_type": { "values": ["non_adult"], "default": "non_adult" },
"placement": { "values": "a-z, A-Z, 0-9, _ (max. 100 characters)", "default": "default" },
"size": { "values": ["responsive", "300x250", "728x90", "160x600", "468x60", "300x50"], "default": "300x250" }
}
}
]
}
}
GET /adtags/{type}
Generates an ad tag - the same code as the Ad Tags page of the publisher panel. type is one of smartlink, banner, popup, redirect. All parameters are optional, the defaults are the same as in the panel.
| Type | Parameter | Values |
|---|---|---|
smartlink | traffic_type | non_adult (default) |
placement | Placement name, see below. | |
banner | website_type | non_adult (default) |
placement | Placement name, see below. | |
size | Banner size as WIDTHxHEIGHT, e.g. 300x250 (default), 728x90, 160x600, 468x60, 300x50, or responsive. The full list is in GET /adtags. | |
popup | website_type | non_adult (default) |
placement | Placement name, see below. | |
pop_type | popup (default), popunder, tabunder, tabup | |
display_on | all (default), desktop, mobile - devices the ads are shown on. | |
redirect | website_type | non_adult (default) |
placement | Placement name, see below. | |
redirect_on | mobile (default), desktop, all - which visitors are redirected. |
placement names the place where you use the tag, e.g. homepage_header (a-z, A-Z, 0-9, _, max. 100 characters, default default). Every placement is reported separately - filter or group your reports by placement to compare them. Use a different placement for every slot you want to measure.
curl -H "Authorization: Bearer YOUR_API_KEY" "https://publisher.advertica.com/api/v1/adtags/banner?size=728x90&placement=homepage_header"
{
"data": {
"type": "banner",
"placement": "homepage_header",
"settings": { "website_type": "non_adult", "size": "728x90" },
"format": "html",
"code": "<ins style=\"width: 728px;height:90px\" ...><script src=\"...\" async></script></ins>",
"usage": "HTML. Paste it into your page where the banner should be shown, once per banner slot."
}
}
| Field | Description |
|---|---|
settings | The settings the tag was generated with, including defaults. |
format | url for smartlink - code is a link to send your visitors to; html for the other types - code is an HTML snippet to paste into your page. |
code | The ad tag. Use it exactly as returned, do not modify it. |
usage | Short instructions where to put the code. |
Where to put the code:
- smartlink - a URL; use it as a link, a button target or a redirect for your traffic. Visitors are sent to the best matching offer.
- banner - paste the snippet where the banner should appear; for more banners on one page paste one snippet per slot.
- popup - paste the snippet once into every page where pop ads should run, e.g. right before
</body>. - redirect - paste the snippet into the page; matching visitors are redirected to an offer right away, so use it only on pages meant for that.
Every call returns a new tag; tags generated earlier keep working. Statistics of all tags appear in your reports under their placement.
Example workflow
A typical integration - e.g. a script or an AI assistant that builds a website and monetizes it:
GET /me- check that the key works.GET /adtags- see which ad tags and settings are available.GET /adtags/banner?size=300x250&placement=sidebar,GET /adtags/popup?placement=site, ... - generate a tag for every slot, each with its own placement, and paste the returnedcodeinto the website.- Save a report in the publisher panel (Reports → e.g. group by date and placement → save), then
GET /reportsto find itsid. GET /reports/{id}?startDate=...&endDate=...- read impressions, clicks and earnings per placement.
Keep the API key out of the website code - ad tags do not need it, the key is only for calling the API.
