AdsShare

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.

Base URLhttps://api.adsshare.in

Introduction

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'
Key rotation

Regenerating your key replaces the old one, which stops working immediately. Update every integration when you rotate.

IP whitelist

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.

403Invalid API keyThe key does not exist (or was rotated).
403IP not allowed for this API keyYour key has an IP whitelist and this request came from elsewhere.
403Account is not activeYour affiliate account is deactivated.
400{ "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.

GET/api/v1/campaign/get

List 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: 1

Page number.

limitoptionalinteger [1 … 200]Default: 20

Items per page.

nameoptionalstring

Case-insensitive search on the campaign title.

titleoptionalstring

Alias of name — same title search.

Responses

200Page of campaigns with pagination info.
400Validation error (e.g. limit above 200). JSON body with error message.
403Missing/invalid API key, IP not whitelisted, or inactive account.

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
  }
}
GET/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

200The campaign, with trackingUrl and productInfo.
400Unknown id, or campaign not visible to your account.
403Missing/invalid API key, IP not whitelisted, or inactive account.

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.

_idoptionalstring

Campaign id — use it with Get a campaign and inside your tracking links.

titleoptionalstring

Campaign name.

descoptionalstring

Description / offer details.

statusoptionalstring · active | paused

Only run traffic on active campaigns.

goaloptionalstring · click | impression | conversion | event | app_install | sales

What the campaign pays for.

geooptionalstring[]

Allowed country codes (ISO-3166 alpha-2). Empty means no geo restriction.

categoryoptionalstring[]

Campaign categories.

isPaidoptionalboolean

Whether the campaign carries a payout.

payoutoptionalstring

Campaign-level payout amount (for click/conversion goals).

currencyoptionalstring

Payout currency code.

eventDetailsoptionalobject[]

Per-event payouts for event campaigns: { name, payout, currency }. Values already include your affiliate-specific overrides.

previewLinkoptionalstring

Store / landing page preview of the product being promoted.

mediaoptionalobject[]

Creatives attached to the campaign ({ id, link, type }).

trackingUrloptionalstring

Get a campaign only — your personal tracking link for this campaign.

productInfooptionalobject

The 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.