Skip to main content

API key format

All Nippy keys use the npk_live_ prefix followed by a random string:
Each key is tied to a specific businessId. The server resolves your business automatically from the key — you don’t need to pass it in SDK methods, but you do in direct REST API calls.
Never expose your key in client-side code (browser, mobile app). Use it only in your backend.

With the SDK

Pass it in the constructor once:
The SDK includes it automatically in every request. You don’t need to manage it manually.

With direct REST API calls

For administration endpoints (creating campaigns, rules, viewing logs) that don’t go through the SDK, include both headers:
Example:

Authentication errors

Best practices

  • Store the key in environment variables (NIPPY_API_KEY)
  • Rotate the key if you suspect it was compromised — contact us at support@nippy.la
  • Use a single NippyClient instance per process; do not recreate it per request