N Docs
← Back to site

Clients

2 min readUpdated November 23, 2026
MethodPathDoes
POST/clientsAdd a client: name (required), email, plan, external_id (unique), metadata (JSON object, up to 4 KB), link_limit, click_limit, domain_limit (-1 is unlimited; defaults 100, 50,000 and 3), is_active.
GET/clientsList: ?search=, `?status=active\paused, ?external_id=, ?limit=, ?offset=`.
GET/clients/{ref}One client.
PATCH/clients/{ref}Change any of the fields. is_active: false pauses the account: its links keep working, its keys can’t change anything.
DELETE/clients/{ref}Delete. Its keys stop working; its domains (with their links) come back to you. Add ?purge=links to delete its links as well.
curl -X POST https://api.yourbrand.com/api/partner/clients -H 'Authorization: Bearer nl_pk_…' -H 'Content-Type: application/json' \
  -d '{"name":"Blue Cafe","email":"hello@bluecafe.example","external_id":"user_42","metadata":{"plan":"growth"},"link_limit":500}'
{ "data": { "id": 2, "external_id": "user_42", "name": "Blue Cafe", "email": "hello@bluecafe.example", "plan": "starter", "is_active": true, "link_limit": 500, "click_limit": 50000, "domain_limit": 3, "metadata": { "plan": "growth" }, "created_at": 1795348904, "updated_at": 1795348904 } }

The same external_id again answers 409 with the existing client, so a retried sign-up is safe:

{ "error": "A client with this external_id already exists", "code": "external_id_taken", "data": { "id": 2, "external_id": "user_42", … } }

Client ids are never reused.

Recipes#

Find a client by your own ID

curl https://api.yourbrand.com/api/partner/clients/ext:user_42 -H 'Authorization: Bearer nl_pk_…'

Upgrade a customer’s limits when they change plan in your app

curl -X PATCH https://api.yourbrand.com/api/partner/clients/ext:user_42 -H 'Authorization: Bearer nl_pk_…' \
  -H 'Content-Type: application/json' -d '{"plan":"growth","link_limit":5000,"click_limit":500000}'

Pause a customer who stopped paying, then resume

curl -X PATCH $BASE/partner/clients/ext:user_42 -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"is_active":false}'
curl -X PATCH $BASE/partner/clients/ext:user_42 -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"is_active":true}'

Delete a customer and their links

curl -X DELETE "$BASE/partner/clients/ext:user_42?purge=links" -H "Authorization: Bearer $KEY"

metadata#

Store anything your app needs about the client, up to 4 KB of JSON: your plan name, a CRM id, a region. It’s returned with the client and in webhook events, and Nahnu Links never uses it.

Good to know#

  • external_id must be unique. Use your own user or account ID.
  • Every change sends a client.created, client.updated or client.deleted event.
  • Clients made over the API show on the dashboard’s Clients page like any other.