Act as one client
Use the client API with your partner key and an X-NL-Client header. It behaves exactly as that client’s own key would, with their domains, limits and plan. You don’t need to store a key per client.
Example#
curl -X POST https://api.yourbrand.com/api/links \
-H 'Authorization: Bearer nl_pk_…' -H 'X-NL-Client: ext:user_42' -H 'Content-Type: application/json' \
-d '{"destination_url":"https://bluecafe.com/menu","slug":"menu"}' X-NL-Client takes the client’s id (2) or your own ID with ext: (ext:user_42).
Where it works#
| Method | Path |
|---|---|
GET, POST | /api/links |
GET, PUT, DELETE | /api/links/{id} |
GET | /api/links/{id}/stats |
GET | /api/domains |
GET | /api/usage |
GET | /api/me |
GET | /api/analytics |
Without X-NL-Client, a partner key on these answers 400.
What applies#
Everything that applies to the client’s own key:
- only their links and domains;
- their link and click limits;
- their plan’s features;
403when the client is paused.
A read-only partner key can only use GET.
In code#
const asClient = (ref) => ({
Authorization: `Bearer ${process.env.NL_PARTNER_KEY}`,
'X-NL-Client': `ext:${ref}`,
'Content-Type': 'application/json',
});
const links = await fetch(`${BASE}/api/links`, { headers: asClient('user_42') }).then(r => r.json()); Partner key or client key?#
| Use | When |
|---|---|
Partner key with X-NL-Client | Your own backend acts for customers. |
| A client key | The customer’s own tool, site or app calls the API directly. See Client API keys. |
The activity log records changes made this way against your partner key.


