Product
Publishers
Advertisers
Networks
Help
Pause animations
Browse help topics
Reference Everyone

API overview, hosts and authentication

Updated

View as Markdown

Every API call goes to https://affiliateos.xyz over HTTPS. Publishers and networks send their key in the x-api-key header; advertisers send theirs as Authorization: Bearer. Keys belong on your server, never in an app or a browser.

On this page

Hosts

Host (HTTPS)What it’s for
affiliateos.xyzEvery API call: offers, advertiser events, install matching
offerwall.affiliateos.xyzThe Hosted Offerwall, opened at /w/ plus your wall’s app ID
app.affiliateos.xyzThe dashboard you sign in to. Not an API.
Your own serverWhere we send postbacks

Use these hosts exactly. There is no separate api. subdomain. Tracking links come ready-made in each offer’s trackingUrl: put your user’s own ID in place of {SUB_ID} (and the device’s advertising ID in place of {DEVICE_ID} when you have it), and leave the rest of the link as it is.

Which API does what

Publishers and networks send the key in x-api-key, advertisers as Authorization: Bearer, and a signed wall link carries a signature made with ows_ instead of a key.

You areCallWhat it doesKey
PublisherGET /publisher/offersEvery offer you can run, at your payoutpk_
PublisherGET /publisher/offers?segment=topOur picks, in our orderpk_
PublisherThe wall’s URL with ?uid=A hosted wall for one userNone or ows_
AdvertiserPOST /v1/advertiser/eventsReports a step a user completedak_
AdvertiserPOST /v1/advertiser/match-installFinds the tap behind a new installak_
NetworkGET /network-api/offersEvery offer your network can runak_

Full reference: Offer API, Top Offers Feed, Hosted Offerwall, advertiser events, Network API.

Offer lists come back as JSON, with the offers in data.offers and paging details in data.pagination. The Offer API returns every offer in one response unless you send page or per_page (then 50 to a page by default). The Network API pages by default, 50 to a page: keep asking while has_more_pages is true.

Keys

KeyStarts withWhere you make itLifetime
Publisher API keypk_My Profile, then API Keys, then Generate Key. Owners and admins only.Until you revoke it. Up to five at a time.
Network API keyak_Workspace settings, then API Keys, then Generate Key90 days by default. The Expires column shows the date.
Advertiser API keyak_Mint API key on a campaign, or API keys, then Mint new keyUntil you revoke it
Postback secretps_Publishers: Postbacks, then Create postback secret. Networks: Workspace settings, then Generate Webhook Secret.Until you replace or revoke it
Offerwall app secretows_Only for walls set to signed launchesKeep it on your server

Every key and secret you make in the dashboard is shown once, when you make it. Store it before you close the page.

Send the key

Publisher:

Shell
curl -G "https://affiliateos.xyz/publisher/offers" \
  -d country=US -d platform=iOS \
  -H "x-api-key: $AFFILIATEOS_KEY"

Network:

Shell
curl -G "https://affiliateos.xyz/network-api/offers" \
  -d country=US -d platform=ios \
  -H "x-api-key: $AFFILIATEOS_KEY"

Advertiser:

Shell
curl -X POST "https://affiliateos.xyz/v1/advertiser/events" \
  -H "Authorization: Bearer $AFOS_ADVERTISER_KEY" \
  -H "Content-Type: application/json" \
  -d @event.json

Example. Read the key from your server’s environment, never from source code.

When the key is the problem

ResponseWhat it meansWhat to do
401 Missing x-api-key headerNo key reached us on a network callSend the header named exactly x-api-key
401 Invalid or expired API keyThe key is wrong, revoked or past its dateCheck the whole key was copied. Networks: check Expires.
401 Invalid API keyAn advertiser key that is wrong or revokedMint a new key and update your server
401 Partner account is not activeA publisher account that is restrictedContact support
403Network calls: the key is fine, but the account is restricted or still pendingContact support

Why an API key stopped working walks through each case, and Errors and rate limits covers every other error.

Rotate without downtime

Make the new key, deploy it, check a call succeeds, then revoke or remove the old one. Publishers can hold up to five keys, so there’s room, and one key per environment means revoking a staging key never stops production. A network account holds one key unless we raise its limit: check Used in the key list.

Email us before you rotate and we’ll allow a second key, or remove the old key and generate the new one in the same sitting.

For a coding assistant, the AI context files hold the same facts in one Markdown file per role.

Postback. A request we send to your server when a conversion happens, so you can credit the user.What is a postback?
API key. A secret that identifies your account to our API. Publisher keys start with pk_, network and advertiser keys with ak_. Each is shown once.What is an API key?
Postback secret. A key starting with ps_ that signs every postback we send you, so your server can check it came from us. Shown once.What is a postback secret?

Support

Still stuck? Write to us.

One address for every question: hello@affiliateos.ai. Put the details from this list in your first message so we can find the click or conversion without asking you for them again.

Put these in your message

  1. 01The email you sign in with
  2. 02Your role: publisher, advertiser or network
  3. 03The offer ID
  4. 04The click ID or action_id
  5. 05The time it happened, with your time zone
  6. 06What you expected to happen

Looking for a reward in an app? Ask that app's support. It credits your reward, so only it can see your balance.

Search help