N Docs
← Back to site

Site API

2 min readUpdated November 23, 2026

Read-only, for the analytics tool’s server. Send Authorization: Bearer nlsk_… (or X-NL-Site-Key). A key sees the links whose destination, or a rule’s destination, is on its websites, and their clicks.

PathGives
GET /api/siteThe connection: its websites, the click ID parameter, the bridge address, whether a live feed is on.
GET /api/site/linksThe links, with people clicks, all clicks and the last click. ?updated_after=<unix> for changes only.
GET /api/site/clicksClicks, oldest first: ?after_id=, ?link_id=, ?since=, `?kind=person\bot\likely_bot\self, ?limit=` (default 500, up to 1000).
GET /api/site/click/{id}One click by its 16-character ID, with its link.
{ "connection": { "id": 1000100, "label": "Client site shop.com", "type": "client_site" }, "sites": ["shop.com"], "click_param": "nlc", "click_ids": "these_sites", "bridge_url": "https://api.yourbrand.com/_nl/bridge.js", "live_feed": false, "version": "1.13.0" }

type is agency for connections you add and client_site for ones a client site made. click_ids is all_links when click IDs are on for every link.

Clicks come as { "clicks": […], "next_after_id": 1205, "more": true }. Each click has the same fields as the partner clicks feed. Pass next_after_id as after_id until more is false.

Examples#

KEY=nlsk_…
BASE=https://api.yourbrand.com/api/site

# The connection
curl $BASE -H "Authorization: Bearer $KEY"

# Links changed since yesterday
curl "$BASE/links?updated_after=$(($(date +%s) - 86400))" -H "Authorization: Bearer $KEY"

# People clicks, from a saved cursor
curl "$BASE/clicks?after_id=1204&kind=person&limit=1000" -H "Authorization: Bearer $KEY"

# One click by its ID
curl $BASE/click/K3v9QpX2aB7mN1zR -H "Authorization: Bearer $KEY"

A typical sync#

  1. Once an hour, read /links?updated_after= to keep link titles and destinations up to date.
  2. Every few minutes, read /clicks?after_id= from your saved cursor until more is false.
  3. When a visit arrives with a click ID, look it up in your copy, or call /click/{id} if it’s newer than your last sync.

Good to know#

  • Keys are checked on every request. A removed key answers 401 within a minute.
  • Clicks follow the dashboard’s Keep clicks for setting; older clicks are gone.
  • For clicks the moment they happen, use the live feed.