Partner info
The partner API is for running many clients from your own backend: create them, give them keys and domains, brand their sites, and read their clicks and events. It’s what you use to build your own link product on Nahnu Links.
Basics#
- Address:
https://<your API address>/api/partner. - Key: a partner key (
nl_pk_…) from Settings > Developers. Keep it on your server. - Clients are named by id (
12) or by your own ID withext:(ext:user_42). - Answers are
{ "data": … }, and lists add"meta". - Errors are
{ "error": "…", "code": "…" }. See Errors.
Describe your setup#
GET /api/partner describes your setup:
curl https://api.yourbrand.com/api/partner -H 'Authorization: Bearer nl_pk_…' { "data": { "version": "1.13.0", "write": true, "default_domain": null, "dashboard_url": "https://yourbrand.com/", "clients": 2, "links": 22 } } | Field | Meaning |
|---|---|
version | The edge script version |
write | false means a read-only partner key |
default_domain | The default short domain, if set |
dashboard_url | Your WordPress dashboard |
clients, links | Totals |
Call it when your app starts, to check the key and the setup.
What’s in the partner API#
| Area | Paths | Guide |
|---|---|---|
| Clients | /clients, /clients/{ref} | Clients |
| Their links | /api/links with X-NL-Client | Act as one client |
| Their keys | /clients/{ref}/keys, /keys/{id} | Client API keys |
| Domains | /clients/{ref}/domains, /domains | Domains over the API |
| Brands | /clients/{ref}/brand | White label per client |
| Usage and stats | /clients/{ref}/usage, /clients/{ref}/stats | Usage and stats |
| Feeds | /clicks, /events | Clicks feed, Events feed |
| Webhooks | /webhooks | Webhook endpoints |
A typical integration#
- When a customer signs up in your app,
POST /clientswith yourexternal_id. - Make their links with
X-NL-Client: ext:{your id}. - If they bring a domain,
POST /clients/{ref}/domainsand show them the DNS record. - Show stats from
/clients/{ref}/stats. - Listen for webhooks to keep your app in step.


