Skip to main content

API key authentication

Include your API key in every request using the X-NearIQ-Key header:
curl https://app.neariq.io/api/v1/me \
  -H "X-NearIQ-Key: niq_your_key_here"

Key format

API keys follow this format:
niq_live_<48-character-hex-string>
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.
ScopeAllows
competitors:readBusiness profile, competitors, reviews, snapshots, GBP health, gap analysis, AI visibility, content history, Engagement Report Card, and GBP insights endpoints
alerts:readAlert list endpoints
exportAccount export endpoint
webhooks:manageCreate, list, update, and delete webhook endpoints
usage:readUsage and API key metadata endpoints
content:writeGenerate and refine Content Studio drafts
payments:writeRecord CRM payment rows
chat:writeSend non-streaming v1 API chat messages
competitors:writeAdd tracked competitors through the v1 API and Zapier actions
business:writeUpdate business profile fields
alerts:writeMark alerts read or unread
contacts:writeCreate CRM contacts
embeds:writeCreate read-only chart embed tokens
notifications:writeUpdate notification delivery settings, including webhook/SMS destinations
reports:writeCreate stored intelligence report records
reviews:writeCreate review request records
social:writeCreate and schedule social posts

Error responses

StatusMeaning
401 UnauthorizedKey is missing, invalid, or revoked
403 ForbiddenKey is valid but your plan or key scopes do not allow the endpoint
{
  "error": "Unauthorized",
  "message": "Invalid or missing API key"
}

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