Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.corsa.finance/llms.txt

Use this file to discover all available pages before exploring further.

External rules let you register rule identifiers from third-party vendors (Chainalysis, TRM Labs, Sardine, etc.) as named entities within Corsa. When an alert arrives from a vendor integration, Corsa matches it against your registered external rules to surface rule names and descriptions in the compliance UI. Full API reference is available in the API Reference.
All SDK examples assume you have initialized the Corsa client as shown in the Node.js SDK Configuration or Python SDK Configuration guide.

Overview

When a third-party vendor (such as Chainalysis or TRM Labs) fires an alert, it includes a vendor-specific rule ID. Without external rules configured, analysts see a raw ID. By registering your external rules in Corsa, alerts from your vendors display human-readable names and descriptions instead. External rules have the same lifecycle as internal rules — draft, active, disabled — and appear alongside internal rules in the Corsa UI.
The vendorName field cannot be set to Corsa — that value is reserved for rules authored inside the platform.

Create an External Rule

Endpoint: POST /v1/external-rules
POST /v1/external-rules
Content-Type: application/json

{
  "name": "High-Risk Wallet Exposure",
  "description": "Flags transactions involving wallets with high-risk exposure scores from Chainalysis",
  "vendorName": "Chainalysis",
  "externalRuleId": "rule_chainalysis_high_risk_001"
}

Request Fields

FieldRequiredDescription
nameYesHuman-readable rule name shown in the Corsa UI
vendorNameYesName of the vendor providing this rule (e.g. Chainalysis, TRM Labs)
descriptionNoExplanation of what the rule detects
externalRuleIdNoThe rule’s identifier in the vendor’s system — used to match incoming alerts

List External Rules

Endpoint: GET /v1/external-rules Returns a paginated list of all external rules for the platform.
GET /v1/external-rules?page=1&limit=20

Filter by Vendor

Use the GET /v1/external-rules/vendors endpoint to retrieve the distinct vendor names in use — useful for building filter UIs or auditing which vendors have rules registered.
REST API
GET /v1/external-rules/vendors

Get an External Rule

Endpoint: GET /v1/external-rules/{id}
GET /v1/external-rules/rule_abc123

Update an External Rule

Endpoint: PUT /v1/external-rules/{id} All fields are optional — only include the fields you want to change.
PUT /v1/external-rules/rule_abc123
Content-Type: application/json

{
  "name": "High-Risk Wallet Exposure (Updated)",
  "description": "Updated description after Chainalysis rule definition change"
}

Delete an External Rule

Endpoint: DELETE /v1/external-rules/{id} Soft-deletes the rule. The rule is removed from active matching but its history is preserved for audit purposes.
DELETE /v1/external-rules/rule_abc123

Rule Response Object

{
  "id": "rule_abc123",
  "version": 1,
  "status": "active",
  "isExternalRule": true,
  "name": "High-Risk Wallet Exposure",
  "description": "Flags transactions involving wallets with high-risk exposure scores from Chainalysis",
  "vendorName": "Chainalysis",
  "externalRuleId": "rule_chainalysis_high_risk_001",
  "createdBy": "user_xyz",
  "createdAt": "2024-01-15T10:00:00Z"
}