Campaigns API
GET
/a/campaignsThis endpoint is deprecated and may be removed in a future version.
List your campaigns, newest first, with their prices, events, targeting, caps, payout rules, creatives and landing pages. Combine the filters below to narrow the list; deleted campaigns are never included. To fetch or change one campaign use GET or PATCH /a/campaigns/{campaignId}.
Authentication
Domain ID — your network's tenant ID (header: X-Domain-Id)
API Key (header: X-Api-Key)
Secret Key (header: X-Api-Secret)
No API key yet? Start a 14-day free trial and generate a key from your dashboard's security settings. No credit card required.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
campaignId | query | string | No | Only these campaigns: one ID or several separated by commas. |
advertiserId | query | string | No | Only campaigns of these advertisers: one ID or several separated by commas. |
campaignName | query | string | No | Campaigns whose name contains this text (case-insensitive). |
category | query | string | No | Campaigns in a category whose name or slug contains this text, e.g. finance. |
status | query | string | No | Only campaigns with this status (any letter case). Omit for all. |
page | query | integer | No | Page to return, starting at 1. meta.pagination.totalPages says how many there are. |
limit | query | integer | No | Campaigns per page, 1–100. Default 20. |
Responses
| Status | Description |
|---|---|
| 200 | Campaigns, newest first. |
| 400 | Authentication parameters missing (X-Domain-Id, X-Api-Key, X-Api-Secret) |
| 401 | Invalid API key or secret |
| 403 | Calling IP not on the key's allowlist, or API access not in your plan |
| 422 | A parameter is invalid |
| 429 | Rate limit reached (120 requests a minute per API key). Wait for Retry-After seconds. |
Response fields (inside data)
| Field | Type | Description |
|---|---|---|
campaignId | integer | |
advertiserId | integer | |
advertiseId deprecated | integer | Misspelled duplicate of advertiserId; will be removed. |
campaignName | string | |
status | string (active | pending | ended) | |
visibility | string (public | requireapproval | private) | public: any affiliate can run it; requireapproval: affiliates apply first; private: only affiliates you assign. |
previewUrl | string | |
url | string | Destination (offer) URL, with tracking macros such as {click_id}. |
paymentModel | string | Payment model code, e.g. CPA, CPL, CPS, CPI. |
payout | number | string | What the affiliate earns per conversion: a number, or a string such as "12.5%" when the payment model is a percentage of the sale (CPS, CPAS, RevShare, IB). |
revenue | number | string | What the advertiser pays you per conversion; same format as payout. |
currency | string | |
startDate | string | Y-m-d H:i:s, in the campaign timezone. |
endDate | string | Y-m-d H:i:s, in the campaign timezone. |
description | string | Plain text (HTML removed). |
terms | string | Plain text (HTML removed). |
categories | array of strings | |
events | array of objects | Conversion events (goals) of the campaign. |
events[].name | string | |
events[].token | string | Event token to send in postbacks. |
targetingRules | array of objects | Active targeting rules. |
targetingRules[].id | integer | |
targetingRules[].name | string | |
targetingRules[].action_on | string | Which traffic the rule acts on, e.g. All, Click Only, Conversion only. |
targetingRules[].conditions | array of objects | Conditions (field, operator, value). |
targetingRules[].fallback_url | string | |
targetingRules[].fallback_campaign_id | integer | |
cappingRules | array of objects | Active caps. |
cappingRules[].id | integer | |
cappingRules[].name | string | |
cappingRules[].cap_type | string (shared | individual) | shared: one cap for all affiliates together; individual: a cap per affiliate. |
cappingRules[].type | string (gross_clicks | unique_clicks | gross_conversions | approved_conversions | pending_conversions) | What is counted against the cap. |
cappingRules[].period | string (hourly | daily | weekly | monthly) | How often the cap resets. |
cappingRules[].value | integer | Cap limit per period. |
cappingRules[].over_cap_action | string (stop | conversion_accept | conversion_reject | conversion_pending) | Once the cap is reached: stop = stop the campaign; conversion_accept / conversion_reject / conversion_pending = keep tracking and mark further conversions approved, rejected or pending. |
cappingRules[].event | string | Event token(s) the cap counts, if limited to events. |
cappingRules[].timezone | string | Timezone the cap period resets in. |
payoutRules | array of objects | Active payout rules (prices that override the campaign price when their conditions match). |
payoutRules[].id | integer | |
payoutRules[].name | string | |
payoutRules[].model | string | |
payoutRules[].conditions | array of objects | |
payoutRules[].affiliate_price | number | string | What the affiliate earns under this rule (number, or "x%" for percentage models). |
payoutRules[].advertiser_price | number | string | What the advertiser pays under this rule (number, or "x%"). |
payoutRules[].currency | string | |
creatives | array of objects | Approved creatives. file is set for banner_image, video and email; email for email; content for html_ad and sms_text. |
creatives[].id | integer | |
creatives[].title | string | |
creatives[].type | string | Banner Image, Email Creative, SMS Text, Video or Html ad. |
creatives[].file | object | |
creatives[].file.url | string | |
creatives[].file.name | string | |
creatives[].file.content_type | string | |
creatives[].email | object | |
creatives[].email.sender_name | string | |
creatives[].email.subject_line | string | |
creatives[].content | object | |
creatives[].content.code | string | |
landingPages | array of objects | |
landingPages[].name | string | |
landingPages[].url | string | |
landingPages[].type | string |