Skip to main content

API key authentication

Include your API key in every request using the X-NearIQ-Key header:

Key format

API keys follow this format:
Example: niq_live_your_api_key_here Keys are case-sensitive and must be kept secret. Do not expose them in client-side code, public repositories, or URLs.

Generating and revoking keys

Keys are managed in SettingsAPI:
  • Generate — creates a new key. The full key is only shown once at creation.
  • Revoke — immediately invalidates the key. All requests using it will return 401.

Key scopes

API keys can be limited to the parts of the API an integration needs. Existing keys keep their stored scopes. Keys created without an explicit scope list use the default read-only scope set. API-key management itself is dashboard-session only.

Error responses

Security best practices

  • Store keys in environment variables, never hardcoded
  • Use one key per integration so you can revoke selectively
  • Rotate keys periodically
  • Never log or print API keys