Developers

API, postback and MCP

Read your stats, sites, deals and payments over REST, send conversions by server-to-server postback, or let an AI agent do both through the MCP server. Answers are JSON, dates are UTC days, money is USD.

Authentication

One key, sent as a bearer token

Read-only keys can be created by the account owner from the Account page (five live keys per account). Write keys are issued by the network on request. A key is shown once and revocable at any time.

What a key can see

A publisher key sees its own sites, zones, deals, payments and traffic and earnings. An advertiser key sees stats, sites and zones where it has a deal, and its own deals. Keys are read-only for publishers and advertisers.

Limit: 60 calls per key per minute (429 rate_limited beyond). A revoked or expired key answers 401 at once. Request bodies are limited to 64 KB. Status of the platform: lananetwork.com/status.

Every call

curl -s https://app.lananetwork.com/api/v1/me \
  -H "Authorization: Bearer lnk_..."

REST

Endpoints

Base URL https://app.lananetwork.com/api/v1. Read endpoints are available to publisher and advertiser keys within their own data.

Method and pathWhat it returns
GET /meThe key in use: owner, rights, calls this minute.
GET /stats?from=&to=Per UTC day and zone: impressions, clicks, valid clicks, cost or earnings; advertisers also get leads, purchases and payers. Default last 7 days; the range is limited (see below).
GET /sitesYour sites.
GET /zonesYour zones, with their public key.
GET /dealsYour deals. Publisher keys also get the prepaid schedule: paid_through, next_due_date, expected_amount_usd, payment_status.
GET /payments?deal_id=&limit=Prepaid payments, newest first (publisher keys; not available to advertiser keys).

The full machine-readable reference is the OpenAPI 3.1 document. Date ranges for statistics are capped per call: 7 days for publisher and advertiser keys. Unknown fields, bad dates and over-long ranges answer 400.

Last 7 days of stats

curl -s "https://app.lananetwork.com/api/v1/stats" \
  -H "Authorization: Bearer lnk_..."

# or a range
curl -s "https://app.lananetwork.com/api/v1/stats?from=2026-10-01&to=2026-10-07" \
  -H "Authorization: Bearer lnk_..."

Deals with the prepaid schedule

curl -s https://app.lananetwork.com/api/v1/deals \
  -H "Authorization: Bearer lnk_..."

Tag and passback

One line per zone, your usual network behind it

Each zone has its own tag. Visitors we do not buy get the passback of that zone, so your revenue never drops.

The tag of a zone (any format, including the slider, the interstitial and the in-page card)

<script src="https://fieldwren.com/t.js" data-z="z1a2b3c4d" async></script>

Paste it where the zone should show. A slider, interstitial or in-page zone needs no placement: the tag builds a fixed, closable box (a corner box, a full-screen layer shown at the first tap, or a card at the bottom of the screen). Interstitial zones show at most once per visitor and per 24 hours, in-page zones once per 6 hours, and neither has a passback: no purchase means nothing shows. You can put several tags on one page, each zone is detected on its own.

A visitor is bought, or sent to the passback. The passback is plain HTML you set on the zone, injected in place of the ad. Use the tag of ONE spot of your usual network, with the size of the zone.

Passback example: ExoClick banner zone

<script async type="application/javascript" src="https://[your ExoClick serving domain]/ad-provider.js"></script>
<ins class="[class given by ExoClick]" data-zoneid="[your zone id]"></ins>
<script>(AdProvider = window.AdProvider || []).push({"serve": {}});</script>

Passback example: TrafficStars ad spot

[the code TrafficStars shows for ONE banner spot of the same size,
copied from Manage Ad Spots > your spot]

Never put a whole-page tag in a passback: a OneTag, or any code that opens popunders, interstitials or sliders by itself. Every visit we buy would then also run all the formats you already sell, and the visitor would get both. Use the spot of a single placement. See the sizes and where each format shows on the formats page.

Macros

Landing URL macros

Advertisers put these in the landing URL of a campaign. We replace each one with the real value on every click, URL-encoded. Any other {...} is refused.

MacroReplaced by
{click_id}Our click id, 35 characters. Send it back as click_id in your postback (required).
{campaign_id}Public key of the campaign (c + 8 characters).
{src_hostname}Domain of the site that showed the creative (never taken from the Referer).
{site_id}Stable public key of the site (s + 8 hex characters, derived from its domain).
{zone_id}Public key of the zone (z + 8 characters).
{creative_id}Identifier of the creative shown (none for a popunder).
{format}Zone format, for example pop, banner_300x250 or slider_300x250.
{country}Visitor country, ISO 3166-1 alpha-2 (XX if unknown).
{device}mobile, desktop or tablet.
{os}ios, android, windows, macos or other.
{browser}chrome, firefox, safari or other.
{lang}Primary language of the visitor browser, two letters (xx if unknown).

Example landing URL

https://example.com/landing?ocid={click_id}&occ={campaign_id}&osrc={zone_id}&osite={src_hostname}
  &site={site_id}&fmt={format}&os={os}&br={browser}&lg={lang}

The landing URL must be https, carry the four parameters shown first (once each) and no reserved parameter name. Values that are not known for a visit are replaced by a neutral placeholder (for example other or xx), never left as a macro.

Errors

Errors are JSON with a code

{ "error": {
    "code": "invalid_api_key",
    "message": "..."
} }
HTTPCode
400invalid_request, invalid_json, invalid_range, range_too_long
401invalid_api_key, api_key_expired
403forbidden, scope
404not_found
413body_too_large (64 KB maximum)
429rate_limited (retry the next minute; the Retry-After header says how long)
500internal_error (retry in a minute)

Postback

Send conversions server to server

Advertisers report leads and purchases to us with one GET request per event. Each landing URL carries a click_id (the ocid parameter): send it back with the event.

Purchase with a payout

https://postback.lananetwork.com/v1/postback
  ?token=YOUR_TOKEN
  &click_id={ocid}
  &event=purchase
  &payout={amount}
ParameterMeaning
tokenRequired. Your secret postback token: generate or regenerate it on the Postback page of your advertiser dashboard.
click_idRequired. The value sent in ocid on the landing URL (35 characters).
eventRequired. lead, purchase or purchase_recurring (each rebill).
payoutOptional. Amount in USD with a dot as decimal separator.
txOptional. Your transaction id (1 to 64 of letters, digits, dot, underscore, hyphen). With it, each rebill is unique per click and tx.

Check it from a terminal (a made-up click id answers: 200 ERROR: unknown click_id)

curl -s "https://postback.lananetwork.com/v1/postback\
?token=YOUR_TOKEN&click_id=00000000000000000000000000000000000&event=lead"

Rebill or subscription (a purchase counts once per click) with your own transaction id

https://postback.lananetwork.com/v1/postback
  ?token=YOUR_TOKEN
  &click_id={ocid}
  &event=purchase_recurring
  &payout={amount}
  &tx={order_id}
AnswerMeaning
200 OKConversion recorded.
200 OK: duplicateAlready recorded. A lead or purchase counts once per click; a rebill with the same payout and no tx within 60 minutes is a retry.
200 ERROR: unknown click_idNo click with this id on your campaigns. Do not retry.
200 ERROR: click expiredThe click is older than 90 days. Do not retry.
400 ERROR: bad requestA parameter is missing or malformed.
401 ERROR: bad tokenThe token is wrong.
503 ERROR: retryTemporary problem on our side. Retry later.

Trackers

Postback guides for your tracker

Lana Network is the traffic source. Your landing URL points to your tracker campaign and carries our macros; your tracker stores the click id and sends it back to us on every conversion.

Voluum

Where: Traffic sources > New traffic source (custom), then Campaigns > New campaign

  1. Create a traffic source named Lana Network. In its parameters add one named ocid with the placeholder {click_id}, and map it to External ID (Advanced Parameters). Voluum then records our click id as the external ID of each visit.
  2. Turn on the Traffic source postback URL toggle of that source and paste the purchase URL below. Voluum fires one traffic source postback per conversion, so keep one event per URL (use the lead URL if you only track leads).
  3. Create your campaign on that traffic source and copy its campaign URL. Paste it in the landing URL of your Lana campaign and append the four Lana parameters shown above.

Landing URL of your Lana campaign

https://track.example.com/CAMPAIGN_PATH?ocid={click_id}&occ={campaign_id}&osrc={zone_id}&osite={src_hostname}

Voluum postback URL, purchase

https://postback.lananetwork.com/v1/postback?token=YOUR_TOKEN&click_id={externalid}&event=purchase&payout={payout}

Voluum postback URL, lead

https://postback.lananetwork.com/v1/postback?token=YOUR_TOKEN&click_id={externalid}&event=lead

Voluum postback URL, rebill or subscription (purchase_recurring)

https://postback.lananetwork.com/v1/postback?token=YOUR_TOKEN&click_id={externalid}&event=purchase_recurring&payout={payout}&tx={transaction.id}

A purchase counts once per click: a second purchase on the same click answers OK: duplicate and is lost. Subscriptions and rebills must be sent with the purchase_recurring URL, with your transaction id in tx when your tracker has one (each tx then counts once).

How to check it

  • Open Postback in your advertiser space, paste the URL exactly as saved in the tracker (with your token) and press Check URL: it tells you if the token is accepted and which parameter is missing. It never records a conversion.
  • Send one real test click to your campaign and convert it yourself: the lead or purchase should show in your tracker, and if your tracker logs its postbacks, our answer should read OK. A lead or purchase counts once per click.

Macro names taken from the tracker documentation: doc.voluum.com/article/traffic-source-postback-url, doc.voluum.com/article/voluum-tracking-tokens

Keitaro

Where: Traffic sources > Create, then Campaigns > Create

  1. Create a traffic source named Lana Network. Keitaro stores the external_id parameter of the campaign link as the External ID of the click, so the Lana landing URL carries external_id={click_id} next to the four Lana parameters.
  2. In the traffic source settings paste the purchase URL below as the S2S postback URL. {external_id} is the value we sent, {revenue} the conversion revenue, {tid} the transaction id.
  3. To send leads and sales to different events, map Keitaro statuses in the URL: event={status:lead=lead sale=purchase}. A status without a mapping (for example rejected) is refused by our postback with 400 and nothing is recorded.

Landing URL of your Lana campaign

https://track.example.com/CAMPAIGN_ALIAS?external_id={click_id}&ocid={click_id}&occ={campaign_id}&osrc={zone_id}&osite={src_hostname}

Keitaro postback URL, purchase

https://postback.lananetwork.com/v1/postback?token=YOUR_TOKEN&click_id={external_id}&event=purchase&payout={revenue}

Keitaro postback URL, lead

https://postback.lananetwork.com/v1/postback?token=YOUR_TOKEN&click_id={external_id}&event=lead

Keitaro postback URL, rebill or subscription (purchase_recurring)

https://postback.lananetwork.com/v1/postback?token=YOUR_TOKEN&click_id={external_id}&event=purchase_recurring&payout={revenue}&tx={tid}

A purchase counts once per click: a second purchase on the same click answers OK: duplicate and is lost. Subscriptions and rebills must be sent with the purchase_recurring URL, with your transaction id in tx when your tracker has one (each tx then counts once).

How to check it

  • Open Postback in your advertiser space, paste the URL exactly as saved in the tracker (with your token) and press Check URL: it tells you if the token is accepted and which parameter is missing. It never records a conversion.
  • Send one real test click to your campaign and convert it yourself: the lead or purchase should show in your tracker, and if your tracker logs its postbacks, our answer should read OK. A lead or purchase counts once per click.

Macro names taken from the tracker documentation: docs.keitaro.io/en/campaigns-and-streams/s2s-postback-placeholders.html, docs.keitaro.io/en/conversions-and-postback/postback.html, docs.adexium.io/advertiser/conversion-tracking-keitaro.html

Binom

Where: Traffic Sources > Create, then Campaigns > Create (Advanced settings > S2S Postback)

  1. Create a traffic source named Lana Network with one token: parameter ocid, set as the External ID of the source ({externalid} is the traffic source token External ID).
  2. Paste the purchase URL below in the S2S Postback field of the traffic source (or of the campaign, which overrides it). {externalid} is our click id, {payout} the payout of the conversion.
  3. Binom has no transaction id token in the S2S postback list. For subscriptions use the purchase_recurring URL anyway: without tx, the same click and amount within 60 minutes count as one rebill.

Landing URL of your Lana campaign

https://track.example.com/CAMPAIGN_KEY?ocid={click_id}&occ={campaign_id}&osrc={zone_id}&osite={src_hostname}

Binom postback URL, purchase

https://postback.lananetwork.com/v1/postback?token=YOUR_TOKEN&click_id={externalid}&event=purchase&payout={payout}

Binom postback URL, lead

https://postback.lananetwork.com/v1/postback?token=YOUR_TOKEN&click_id={externalid}&event=lead

Binom postback URL, rebill or subscription (purchase_recurring)

https://postback.lananetwork.com/v1/postback?token=YOUR_TOKEN&click_id={externalid}&event=purchase_recurring&payout={payout}

A purchase counts once per click: a second purchase on the same click answers OK: duplicate and is lost. Subscriptions and rebills must be sent with the purchase_recurring URL, with your transaction id in tx when your tracker has one (each tx then counts once).

How to check it

  • Open Postback in your advertiser space, paste the URL exactly as saved in the tracker (with your token) and press Check URL: it tells you if the token is accepted and which parameter is missing. It never records a conversion.
  • Send one real test click to your campaign and convert it yourself: the lead or purchase should show in your tracker, and if your tracker logs its postbacks, our answer should read OK. A lead or purchase counts once per click.

Macro names taken from the tracker documentation: docs.binom.org/index.php, docs.binom.org/create-offer.php

RedTrack

Where: Traffic channels > New from scratch, then Campaigns > New

  1. Create a traffic channel named Lana Network. Declare ocid as its click id parameter with the macro {click_id}: RedTrack keeps it in {ref_id}.
  2. Paste the purchase URL below as the S2S Postback URL of the channel. {ref_id} is our click id, {offer_payout} the offer payout. Changes made later in the channel are not copied to existing campaigns: update the postback in each campaign you already created.
  3. RedTrack has no transaction id macro for channel postbacks. For subscriptions use the purchase_recurring URL anyway: without tx, the same click and amount within 60 minutes count as one rebill.

Landing URL of your Lana campaign

https://track.example.com/CAMPAIGN_PATH?ocid={click_id}&occ={campaign_id}&osrc={zone_id}&osite={src_hostname}

RedTrack postback URL, purchase

https://postback.lananetwork.com/v1/postback?token=YOUR_TOKEN&click_id={ref_id}&event=purchase&payout={offer_payout}

RedTrack postback URL, lead

https://postback.lananetwork.com/v1/postback?token=YOUR_TOKEN&click_id={ref_id}&event=lead

RedTrack postback URL, rebill or subscription (purchase_recurring)

https://postback.lananetwork.com/v1/postback?token=YOUR_TOKEN&click_id={ref_id}&event=purchase_recurring&payout={offer_payout}

A purchase counts once per click: a second purchase on the same click answers OK: duplicate and is lost. Subscriptions and rebills must be sent with the purchase_recurring URL, with your transaction id in tx when your tracker has one (each tx then counts once).

How to check it

  • Open Postback in your advertiser space, paste the URL exactly as saved in the tracker (with your token) and press Check URL: it tells you if the token is accepted and which parameter is missing. It never records a conversion.
  • Send one real test click to your campaign and convert it yourself: the lead or purchase should show in your tracker, and if your tracker logs its postbacks, our answer should read OK. A lead or purchase counts once per click.

Macro names taken from the tracker documentation: help.redtrack.io/knowledgebase/kb/conversion-tracking/supported-dynamic-parameters/, help.redtrack.io/knowledgebase/kb/basic-setup-9785/traffic-channel-9874/adding-traffic-channel-8669/

Generic S2S

Where: Your own server, CRM or checkout

  1. Read the ocid query parameter on your landing page and store it with the visitor (cookie, session or form field) until they convert.
  2. When the visitor converts, your server sends one GET request to the URL below, replacing the braces with real values: the stored ocid, the amount in USD and your order id.
  3. Treat the answer as plain text: OK or OK: duplicate is success. 200 with ERROR: unknown click_id or click expired must not be retried, 503 can be retried later.

Landing URL of your Lana campaign

https://www.example.com/landing?ocid={click_id}&occ={campaign_id}&osrc={zone_id}&osite={src_hostname}

Generic S2S postback URL, purchase

https://postback.lananetwork.com/v1/postback?token=YOUR_TOKEN&click_id={ocid}&event=purchase&payout={amount}

Generic S2S postback URL, lead

https://postback.lananetwork.com/v1/postback?token=YOUR_TOKEN&click_id={ocid}&event=lead

Generic S2S postback URL, rebill or subscription (purchase_recurring)

https://postback.lananetwork.com/v1/postback?token=YOUR_TOKEN&click_id={ocid}&event=purchase_recurring&payout={amount}&tx={order_id}

A purchase counts once per click: a second purchase on the same click answers OK: duplicate and is lost. Subscriptions and rebills must be sent with the purchase_recurring URL, with your transaction id in tx when your tracker has one (each tx then counts once).

How to check it

  • Open Postback in your advertiser space, paste the URL exactly as saved in the tracker (with your token) and press Check URL: it tells you if the token is accepted and which parameter is missing. It never records a conversion.
  • Send one real test click to your campaign and convert it yourself: the lead or purchase should show in your tracker, and if your tracker logs its postbacks, our answer should read OK. A lead or purchase counts once per click.

MCP

Use it from an AI agent

The same key works on a Model Context Protocol server, so an agent can read your stats, sites, deals and payments.

Tools

Read tools available to publisher and advertiser keys: whoami, get_stats, list_sites, site_health, list_deals; publisher keys also get list_payments. The server is stateless and answers in JSON over streamable HTTP.

Claude Code

claude mcp add --transport http lananetwork \
  https://app.lananetwork.com/mcp \
  --header "Authorization: Bearer lnk_..."

Check the tool list by hand

curl -s https://app.lananetwork.com/mcp \
  -H "Authorization: Bearer lnk_..." \
  -H "content-type: application/json" \
  -H "accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

Any client that reads an mcp.json file (Cursor, for example)

{
  "mcpServers": {
    "lananetwork": {
      "url": "https://app.lananetwork.com/mcp",
      "headers": { "Authorization": "Bearer lnk_..." }
    }
  }
}

Need a key or a postback token? Read the postback guide or .