Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.neariq.io/llms.txt

Use this file to discover all available pages before exploring further.

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_<32-character-hex-string>
Example: niq_a3f7c92b1d4e8f06b2c5a9e7d1f3b8c2 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 and keys created without an explicit scope list receive all scopes.
ScopeAllows
competitors:readBusiness profile, competitors, reviews, snapshots, GBP health, gap analysis, AI visibility, content history, behavioral signals, 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

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