Configuration & Options

Initialization Options

When calling notaify.init(config), you can provide the following options to customize the behavior of the agent:

OptionTypeRequiredDescription
apiKeyIdstringYesYour Notaify API Key ID (public identifier for lookup)
apiKeystringYesYour Notaify API Key (secret key for authentication)
environmentstringNoe.g. "production", "staging" (default: "production")
appNamestringNoLabel your app in the dashboard and emails
silentbooleanNoSuppress Notaify console logs (default: false)
serverUrlstringNoOverride the Notaify server URL (for self-hosted or local dev)
javascript
notaify.init({ apiKeyId: process.env.NOTAIFY_API_KEY_ID, apiKey: process.env.NOTAIFY_API_KEY, environment: 'production', appName: 'My API Server', silent: true, })

What You Receive in the Email

When an error is captured, Notaify processes it and sends an email to the configured email channel containing:

  • Error message and stack trace for quick debugging.
  • AI analysis — a plain-English explanation of what likely went wrong and suggested solutions.
  • Timestamp and environment context.
  • Extra context if you passed it via notaify.capture(error, context).
  • App name (if configured).

Security Recommendations

  • Your NOTAIFY_API_KEY_ID and NOTAIFY_API_KEY are used only to authenticate with the Notaify ingest server.
  • Never expose these in client-side code (e.g., NEXT_PUBLIC_*).
  • Never commit these keys to version control (e.g., git).
  • Always load them safely from environment variables on your Node server.