N Docs
← Back to site

Usage and stats

2 min readUpdated November 23, 2026

Read a client’s usage against their limits, and their click statistics, for billing, dashboards and alerts in your app.

Usage#

GET /clients/{ref}/usage:

curl https://api.yourbrand.com/api/partner/clients/ext:user_42/usage -H 'Authorization: Bearer nl_pk_…'
{ "data": { "links": 1, "link_limit": 500, "clicks_this_month": 0, "click_limit": 50000, "domains": 0, "domain_limit": 3, "month_start": 1793491200, "resets_at": 1796083200 } }

-1 means no limit. Clicks are people only, since month_start (UTC).

Stats#

GET /clients/{ref}/stats with ?days=30 or ?from=&to=, and ?link_id=: clicks (people), visitors, bots and other, conversions and their value, clicks by day, top links, countries, devices and referrers.

{ "data": { "from": 1792756904, "to": 1795348905, "clicks": 0, "visitors": 0, "bots_and_other": 1, "conversions": 0, "conversion_value": 0, "by_day": [], "top_links": [], "countries": [], "devices": [], "referrers": [] } }

Recipes#

Warn customers near their limit

const { data: u } = await fetch(`${BASE}/partner/clients/ext:${id}/usage`, { headers }).then(r => r.json());
if (u.click_limit > 0 && u.clicks_this_month / u.click_limit >= 0.8) notifyCustomer(id, 'You have used 80% of your clicks this month');

Usage-based billing

At the end of each month, read clicks_this_month for each client before resets_at, or sum the clicks feed with ?kind=person for exact counts.

A monthly report

Call stats with ?from= and ?to= for the month, and show clicks, visitors, top_links and countries.

Good to know#

  • Usage numbers can lag by up to a minute; stats are live.
  • Nahnu Links also emails at 80% and 100% of the monthly click limit. See Client limits and usage.