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.
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
Fields
domain (required) — Risk domain key. One of:
revenue_leakage— Revenue Leakageretention_decay— Retention Decaypricing_pressure— Pricing Pressuregrowth_instability— Growth Instabilityoperational_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)
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
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.