Affiliate API
Campaign data, straight from the API
Pull your campaigns, payouts and tracking links programmatically with a single header. Everything your dashboard shows, machine-readable.
https://api.adsshare.inIntroduction
The Affiliate API gives your systems direct access to the campaign data you see in the AdsShare dashboard: the campaigns available to your account, per-event payouts (including payouts negotiated specifically for you), creatives, and your personal tracking links.
All endpoints are read-only, return JSON, and are scoped to your own account — the API can never show you another affiliate's data.
Authentication
Every request is authenticated with an API key sent in the x-api-key header. Generate your key in the AdsShare dashboard under Settings → API Access.
curl --request GET \
--url 'https://api.adsshare.in/api/v1/campaign/get' \
--header 'x-api-key: REPLACE_WITH_YOUR_KEY'Regenerating your key replaces the old one, which stops working immediately. Update every integration when you rotate.
Optionally restrict your key to specific server IPs. With a whitelist set, requests from any other IP are rejected; leave it empty to allow all IPs.
Keep your key secret — it carries your account's access. Calls are server-to-server: send the key from your backend, never from a browser.
Errors
Authentication failures return 403 with a plain-text body; validation and business errors return 400 with a JSON body.
Invalid API keyThe key does not exist (or was rotated).IP not allowed for this API keyYour key has an IP whitelist and this request came from elsewhere.Account is not activeYour affiliate account is deactivated.{ "status": 400, "error": "…", "message": "…" }Validation or business error — the message says what went wrong.API
Campaigns
The campaigns available to your affiliate account — listings, payouts, creatives and your personal tracking links. All campaign endpoints apply your account's visibility rules automatically.
/api/v1/campaign/getList campaigns
Returns the campaigns your affiliate account is allowed to see, newest first. Payouts inside eventDetails already reflect any affiliate-specific payout configured for you.
- • Visibility rules apply automatically — campaigns that block your account (or are limited to other affiliates) are never returned.
- • Use page + limit to paginate; totalPages in the response tells you when to stop.
Query parameters
pageoptionalinteger ≥ 1Default: 1Page number.
limitoptionalinteger [1 … 200]Default: 20Items per page.
nameoptionalstringCase-insensitive search on the campaign title.
titleoptionalstringAlias of name — same title search.
Responses
Request
curl --request GET \
--url 'https://api.adsshare.in/api/v1/campaign/get?page=1&limit=20' \
--header 'x-api-key: REPLACE_WITH_YOUR_KEY'Response · 200
{
"status": 200,
"data": {
"campaigns": [
{
"_id": "6ac5de71ff10eeaffb6c5640",
"title": "Acme Shopping App",
"desc": "Install + first purchase campaign",
"status": "active",
"goal": "event",
"geo": ["IN"],
"category": ["shopping"],
"isPaid": true,
"payout": "12",
"currency": "INR",
"previewLink": "https://play.google.com/store/apps/details?id=com.acme",
"eventDetails": [
{ "name": "install", "payout": "12", "currency": "INR" },
{ "name": "first_purchase", "payout": "150", "currency": "INR" }
],
"productInfo": {
"_id": "6abc…",
"name": "Acme",
"bannerImage": "https://…",
"category": "shopping"
}
}
],
"currentPage": 1,
"itemsPerPage": 20,
"total": 42,
"totalPages": 3
}
}/api/v1/campaign/get/{id}Get a campaign
Returns one campaign with everything you need to run it — including trackingUrl, your personal tracking link for this campaign, and your affiliate-specific payouts.
- • trackingUrl is unique to your account. Send your traffic through it so clicks and conversions attribute to you.
- • Requesting a campaign that is not visible to your account returns a 400 with “No campaign exists with given id”.
Path parameters
idrequiredstring (24 hex chars)The campaign _id, as returned by List campaigns.
Responses
Request
curl --request GET \
--url 'https://api.adsshare.in/api/v1/campaign/get/6ac5de71ff10eeaffb6c5640' \
--header 'x-api-key: REPLACE_WITH_YOUR_KEY'Response · 200
{
"status": 200,
"data": {
"campaign": {
"_id": "6ac5de71ff10eeaffb6c5640",
"title": "Acme Shopping App",
"status": "active",
"goal": "event",
"eventDetails": [
{ "name": "install", "payout": "12", "currency": "INR" }
],
"trackingUrl": "https://visit.adsshare.in/api/click?campaignId=6ac5de71ff10eeaffb6c5640&affId=YOUR_AFF_ID",
"productInfo": {
"name": "Acme",
"bannerImage": "https://…",
"link": "https://…"
}
}
}
}Model
The Campaign object
The fields you'll most commonly use. Additional internal fields may appear in responses — ignore anything not documented here.
_idoptionalstringCampaign id — use it with Get a campaign and inside your tracking links.
titleoptionalstringCampaign name.
descoptionalstringDescription / offer details.
statusoptionalstring · active | pausedOnly run traffic on active campaigns.
goaloptionalstring · click | impression | conversion | event | app_install | salesWhat the campaign pays for.
geooptionalstring[]Allowed country codes (ISO-3166 alpha-2). Empty means no geo restriction.
categoryoptionalstring[]Campaign categories.
isPaidoptionalbooleanWhether the campaign carries a payout.
payoutoptionalstringCampaign-level payout amount (for click/conversion goals).
currencyoptionalstringPayout currency code.
eventDetailsoptionalobject[]Per-event payouts for event campaigns: { name, payout, currency }. Values already include your affiliate-specific overrides.
previewLinkoptionalstringStore / landing page preview of the product being promoted.
mediaoptionalobject[]Creatives attached to the campaign ({ id, link, type }).
trackingUrloptionalstringGet a campaign only — your personal tracking link for this campaign.
productInfooptionalobjectThe promoted product: { _id, name, link, bannerImage, category }.
Need an endpoint that isn't documented here, or hitting something unexpected? Reach out to your account manager — the API grows with partner needs.