Documentation

Logwise turns user-facing SaaS errors into recovery steps, deflection metrics, and support-ready handoffs.
Use the SDK when you want the browser widget, grouped events, and escalation tracking.

Node.js SDK

1Installation

npm install logwise-sdk

2Configuration

Set your API key in your environment variables (or .env file).

LOGWISE_API_KEY=sk_live_...

3Usage

Capture an error, attach product context, and get a stored event ID back.

Parameters

  • errorThe Error object or string you want explained.
  • optionsOptional context: { includeFix, projectId, environment, release, user }
import { explain } from 'logwise-sdk';

try {
  // Your risky code...
  throw new Error("Something went wrong!");
} catch (error) {
  // Pass the raw error object directly
  const { explanation, fix, errorId } = await explain(error, {
    includeFix: true,
    projectId: 'checkout',
    environment: 'production',
    release: '2026.05.14'
  });
  console.log(explanation);
  console.log(fix); // Array of steps to solve it
  console.log(errorId); // Stored Logwise event
}

4React Error Boundary Widget

Drop in the React boundary to catch screen-crashing bugs, show a recovery flow, and escalate unresolved errors to your support tools.

import { LogwiseErrorBoundary } from 'logwise-sdk/react';

function App() {
  return (
    // Wrap your app or specific risky components
    <LogwiseErrorBoundary
      theme="dark"
      options={{ apiKey: 'sk_live_...' }}
      projectId="checkout"
      environment="production"
      captureGlobalErrors
      captureFetch
    >
      <MyRiskyDashboard />
    </LogwiseErrorBoundary>
  );
}

Raw API

1Authentication

Include your API key in the x-api-key header of every request. You can generate a key in your Dashboard.

x-api-key: sk_live_...

2Endpoint

Send a POST request to https://api.getlogwise.com/explain.

Request Body

  • codeThe error code (e.g. 500). Optional.
  • messageThe error message string.
  • contextStack trace. (PII is auto-redacted).
  • targetAudience"user" or "developer".
  • projectIdProduct area or app name used for dashboard grouping. Optional.
  • environmentUsually "production", "staging", or "development".
const res = await fetch('https://api.getlogwise.com/explain', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'x-api-key': 'sk_live_...'
  },
  body: JSON.stringify({
    code: '500', 
    message: 'Internal Server Error',
    targetAudience: 'user',
    includeFix: true,
    projectId: 'checkout',
    environment: 'production',
    source: 'browser'
  })
});

const data = await res.json();
console.log(data.explanation);
console.log(data.fix); // Array of suggestions

Integrations

Logwise forwards unresolved errors to your favorite tools after a user asks for help. This keeps Slack and ticketing systems focused on support handoffs, not every explained error.

Slack

Receive rich, block-kit formatted messages in any Slack channel.

  1. Create an Incoming Webhook in your Slack workspace.
  2. Copy the Webhook URL.
  3. Go to the Logwise Dashboard and click Add Integration.
  4. Select Slack, enter a name, and paste the URL.

Generic Webhooks

Forward support-requested events to Zapier, Make, or your own backend API. Logwise sends a POST request with a JSON payload:

{
  "event": "error.support_requested",
  "timestamp": "2023-10-25T12:00:00Z",
  "data": {
    "eventId": "evt_...",
    "projectId": "checkout",
    "environment": "production",
    "errorCode": "500",
    "errorMessage": "database connection failed",
    "explanation": "The app couldn't connect to the database securely.",
    "fix": [
      "Check database credentials",
      "Verify network firewall rules"
    ]
  }
}

Zendesk

Create support tickets with the Logwise event ID, grouped fingerprint, user note, URL, release, and suggested fix.

  1. Generate an API token in your Zendesk Admin Center (Apps and Integrations > Zendesk API).
  2. In the Logwise Dashboard, add a Zendesk integration.
  3. Provide your Zendesk subdomain (e.g., mycompany), the agent email, and the API token.

Freshdesk

Automatically create tickets and append Logwise explanations as private notes on Freshdesk.

  1. Generate an API key in your Freshdesk Profile Settings.
  2. In the Logwise Dashboard, add a Freshdesk integration.
  3. Provide your Freshdesk subdomain (e.g., mycompany) and the API token.

Gleap

Create comprehensive bug reports with embedded Logwise AI explanations as internal comments.

  1. Generate an API token in your Gleap Dashboard (Project Settings > Security > API Key).
  2. In the Logwise Dashboard, add a Gleap integration.
  3. Paste your Gleap API token.

Rate Limits

We enforce a rate limit of 100 requests per minute to prevent abuse. In addition, your account is subject to a monthly quota and API-key cap based on your plan.

Plan
Requests
API keys
Sandbox
50/month
1
Launch
500/month
2
Growth
5,000/month
5
Support Ops / Enterprise
25,000/month
10