Case Studies Reports Integrations Silent Risk Help Contact

API Documentation

The Standwick API provides programmatic access to the Monitor risk analysis engine. Private — available to partners and clients with active API keys.

Authentication

All requests require an API key passed as a Bearer token in the Authorization header. Keys are generated and managed in your Standwick dashboard.

Authorization: Bearer stw_api_xxxxxxxxxxxxxxxxxxxxxxxx

Analyze Risk

POST /api/v1/analyze

Run a risk analysis on a specified domain with your current metrics. Returns a complete Risk Report identical to the web application output.

Request Body

{ "domain": "revenue_leakage", "metrics": { "churn_rate_increase": 12.5, "conversion_rate_decline": 8.0, "average_revenue_per_user_decay": 4.2 }, "timeframe": "30", "trend": "worsening", "context_notes": "Noticed uptick after pricing change in May" }

Fields

domain (required) — Risk domain key. One of:

  • revenue_leakage — Revenue Leakage
  • retention_decay — Retention Decay
  • pricing_pressure — Pricing Pressure
  • growth_instability — Growth Instability
  • operational_bottlenecks — Operational Bottlenecks

metrics (required) — Object mapping signal names to numeric values. Any signals not provided are treated as unavailable. Signal names per domain are shown in the web application form.

timeframe (optional, default "30") — Evaluation window: "7", "30", or "90" days.

trend (optional) — Observed direction: "improving", "stable", "worsening". Leave blank for auto-detection.

context_notes (optional) — Free-text context. More detail produces better-calibrated severity scoring.

Success Response (200)

{ "success": true, "report": { "domain": "revenue_leakage", "domain_label": "Revenue Leakage", "severity_score": 48.5, "severity_label": "🟡 Medium", "trend": "worsening", "primary_signal": "Churn Rate Increase", "root_cause": "Churn rate is trending upward...", "impact_estimate": "18.5%", "highest_leverage_fix": "Implement exit surveys...", "projection": "If revenue leakage continues...", "scenarios": { ... }, "attribution": { ... }, "time_series": { ... }, "benchmarks": { ... }, "cross_domain": { ... } }, "meta": { "api_version": "1.0", "generated_at": "2026-06-04T14:30:00Z" } }

Error Codes

400 — Invalid request (missing domain, invalid JSON, unknown domain).

401 — Missing or invalid API key.

403 — API access disabled for this account.

429 — Rate limit exceeded (future).

500 — Internal error. Retry or contact support.

All errors return JSON with error and message fields.

Quick Start

Replace YOUR_API_KEY with the key from your Settings page.

cURL

curl -X POST https://yourdomain.com/api/v1/analyze \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "domain": "retention_decay", "metrics": { "user_engagement_decline": 15.0, "inactivity_accumulation": 22.0 }, "timeframe": "30" }'

Python

import requests

url = "https://yourdomain.com/api/v1/analyze"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json"
}
data = {
    "domain": "retention_decay",
    "metrics": {
        "user_engagement_decline": 15.0,
        "inactivity_accumulation": 22.0
    },
    "timeframe": "30"
}

response = requests.post(url, headers=headers, json=data)
report = response.json()
print(report["report"]["severity_label"])
print(report["report"]["root_cause"])

JavaScript (Node.js)

const url = "https://yourdomain.com/api/v1/analyze";

const response = await fetch(url, {
    method: "POST",
    headers: {
        "Authorization": "Bearer YOUR_API_KEY",
        "Content-Type": "application/json"
    },
    body: JSON.stringify({
        domain: "retention_decay",
        metrics: {
            user_engagement_decline: 15.0,
            inactivity_accumulation: 22.0
        },
        timeframe: "30"
    })
});

const data = await response.json();
console.log(data.report.severity_label);
console.log(data.report.root_cause);

Access

API keys are generated in your Settings. Usage is billed at $0.05 per API call via Stripe metered billing. No base fee — you pay only for what you use. Subscribe to the API usage plan to activate billing and start making calls.

No-code integrations: Embed Standwick on any website, Google Sheets, or Zapier. Browse all integrations →

No-code option: Embed the Risk Score Widget on any website with one line of code. No development required.