Assay

API

Send alerts from your monitoring system as they fire, and write the recommendation, citations and policy results back into your case manager.

Send an alert

POST /api/v1/alerts takes one alert with its customer and transactions, or { "alerts": [...] } with up to 50. Each alert is stored, triaged, and returned with the recommendation. Re-sending an external_id already in the workspace returns duplicate and does not bill a run.

curl -X POST https://YOUR-DEPLOYMENT/api/v1/alerts \
  -H "Authorization: Bearer ask_..." \
  -H "Content-Type: application/json" \
  -d '{
  "alert": {
    "external_id": "TM-100231",
    "rule_code": "CASH-STRUCT-01",
    "rule_description": "Three or more cash deposits between $8,000 and $10,000 within 30 days",
    "created_at": "2026-10-03T14:00:00Z",
    "triggered_transaction_ids": ["TX-1", "TX-2", "TX-3"]
  },
  "customer": {
    "external_id": "CUST-55102",
    "name": "Sample Customer A",
    "type": "individual",
    "occupation": "Food truck owner",
    "onboarded_at": "2025-05-20T00:00:00Z",
    "expected_monthly_volume": 6000
  },
  "transactions": [
    { "external_id": "TX-1", "timestamp": "2026-09-24T10:00:00Z", "amount": 9200,
      "direction": "in", "channel": "cash", "location": "Main St location" }
  ]
}'

Response

{
  "results": [{
    "external_id": "TM-100231",
    "alert_id": "ALT-7Q2M4K",
    "status": "triaged",
    "recommendation": "escalate",
    "model_recommendation": "escalate",
    "confidence": 0.9,
    "risk_score": 78,
    "rationale": [
      { "claim": "4 cash deposits between $9,200 and $9,800 ...", "citations": ["TXN-8F3K2Q", "..."] }
    ],
    "policy_hits": [],
    "citations_valid": true,
    "run_id": "RUN-4H7P2M",
    "policy_version": 1,
    "url": "https://YOUR-DEPLOYMENT/app/alerts/ALT-7Q2M4K"
  }]
}

Fetch a result

GET /api/v1/alerts/ALT-7Q2M4K returns the alert, its status, the latest run and every human decision.

Fields

FieldValues
transactions[].directionin, out
transactions[].channelcash, wire, ach, p2p, card, check
alert.typologystructuring, funnel_account, high_risk_wire, sanctions_name, payroll_pattern, seasonal_cash, other. Inferred from the rule code when omitted.
customer.risk_ratinglow, medium, high

API access is part of the Team and Enterprise plans. Keys are stored as SHA-256 hashes and shown once at creation. Every call is metered and written to the audit log.