Home Features Salesforce Pricing Demo Quick Start Security Dashboard

API Documentation

Integrate risk detection into any application. Send customer text, get back structured risk assessments in under 2 seconds.

Overview

The RiskDetect API analyzes customer interactions (emails, call transcripts, chat messages) and returns a risk assessment with a numerical score, detected signals, summary, recommended action, and urgency level.

All responses are JSON. All endpoints accept POST requests with JSON bodies.

Authentication

API keys are included in the Authorization header:

GET
Authorization: Bearer rd_your_api_key_here

Get your API key by registering or from the dashboard settings. The live demo does not require authentication.

Base URL

https://riskdetect.app/api

Analyze Interaction

The primary endpoint. Accepts any customer text and returns a full risk assessment.

POST /api/analyze
{
  "content": "This is my third email about this issue...",
  "type": "email",
  "subject": "RE: Urgent",
  "from": "customer@co.com"
}

Request Parameters

ParameterTypeDescription
contentstringrequiredThe customer interaction text to analyze
typestringoptionalInteraction type: email, call_transcript, chat. Auto-detected if omitted.
subjectstringoptionalEmail subject line
fromstringoptionalSender email or identifier

Response

{
  "analysis": {
    "risk_score": 85,
    "risk_level": "high",
    "signals": [
      "BBB complaint threatened",
      "Legal counsel mentioned",
      "Competitor comparison"
    ],
    "summary": "Customer is highly frustrated...",
    "recommended_action": "Escalate to senior manager...",
    "urgency": "today"
  },
  "metadata": {
    "model": "gpt-4o-mini",
    "processingMs": 1842
  }
}

Batch Analyze

Analyze up to 50 interactions in a single request. Results are returned sorted by risk score (highest first).

POST /api/batch-analyze
{
  "emails": [
    { "id": "email-001", "content": "First email...", "type": "email" },
    { "id": "transcript-001", "content": "Agent: Hi...", "type": "call_transcript" }
  ]
}

List Assessments

Fetch your org's stored risk assessments. Paginated and filterable.

GET /api/assessments?limit=50&level=high
ParamTypeDescription
limitnumberResults per page (max 200, default 50)
levelstringFilter by risk level: critical, high, medium, low

Customer Profiles

Aggregated customer profiles from assessment data, sorted by peak risk score.

GET /api/customers

Dashboard Stats

Aggregated statistics and trend data for your org.

GET /api/stats?days=30

Alert Rules

Create, list, and delete automated alert rules. Rules trigger when new assessments match conditions.

GET /api/alert-rules

Create a new rule:

POST /api/alert-rules
{
  "name": "Critical Alert",
  "conditionType": "score_above",
  "conditionValue": "80",
  "actionType": "slack",
  "actionTarget": "https://hooks.slack.com/..."
}

Risk Levels

LevelScoreDescription
critical80-100Immediate intervention required. Legal threats, formal complaints.
high60-79Respond today. Competitor evaluation, escalation demands.
medium30-59Address this week. Growing frustration, repeat contacts.
low0-29Routine. No significant risk signals detected.

Signal Types

RiskDetect tracks 30+ risk signals across these categories:

  • Legal: Attorney mention, BBB complaint, regulatory threat, contract review
  • Competition: Competitor named, comparison language, switching intent
  • Escalation: Manager request, deadline ultimatum, repeated contact
  • Sentiment: Declining tone, frustration language, profanity
  • Behavioral: Usage decline, team downsizing, contract non-renewal
  • Financial: Billing dispute, refund request, overcharge claim

Rate Limits

PlanMonthly LimitDemo (no key)
Starter ($99/mo)250 interactions5 requests/min per IP
Professional ($299/mo)2,500 interactions
Enterprise ($899/mo)Unlimited

Unauthenticated requests are rate-limited to 5/minute per IP. Returns 429 with Retry-After header when exceeded.