Skip to main content

API & Integration

Chainara Platform exposes a full REST API for integrating fraud intelligence into your own tools, SIEMs, and automated workflows.

API Keys

API Keys

Generating a Key

Navigate to API Keys in the sidebar:

  1. Click Generate New Key
  2. Give it a descriptive name (e.g. "SIEM Integration", "Exchange Screening")
  3. Copy the key immediately: it is only shown once
  4. Store it securely (environment variable, secrets manager)

Managing Existing Keys

The API Keys page lists all active keys with their name, partial preview, creation date, last-used timestamp, and request stats. Click Delete to revoke a key.

caution

Revocation is immediate. Any system using a deleted key will receive 401 Unauthorized on its next request.

Usage Stats

Each API key tracks its own usage metrics visible on the API Keys page:

MetricDescription
Total RequestsAll requests made with this key in the last 30 days
Success RatePercentage of requests that returned 2xx
Avg ResponseAverage response time in milliseconds
Rate Limit HitsNumber of 429 responses this month

Use these to monitor integration health and identify keys that are hitting rate limits or seeing high error rates.


Base URLs

The API is served from your tenant-specific domain:

https://{tenant}-platform.chainara.io/api/v2
TenantBase URL
Chainara (default)https://platform.chainara.io/api/v2
Ripplehttps://ripple-platform.chainara.io/api/v2
Your orghttps://{tenant}-platform.chainara.io/api/v2

All /api/* requests are handled by the same-origin proxy on your tenant's Cloudflare Pages deployment and routed to the correct backend.


Authentication

All requests require the X-API-Key header:

X-API-Key: ek_YOUR_API_KEY

API keys are prefixed with ek_. There is no Bearer token scheme: use X-API-Key only.


Rate Limits

LimiterWindowLimit
Enterprise (per-minute)1 min500 requests
Enterprise (2-hour burst)2 hrs10,000 requests
Public endpoints15 min1,000 requests
Bulk operations1 hr100 requests
Auth endpoints15 min10 requests

Monthly limit: 100,000 requests per API key (set at key creation time).

When rate limited, the API returns 429 Too Many Requests with a Retry-After header indicating how many seconds to wait before retrying.


Blockchain IDs

Use these in any endpoint that takes a blockchainId path parameter:

IDChainSymbolNetwork TypeStatus
1XRPLXRPxrplAvailable
2StellarXLMstellarAvailable
3RLUSDRLUSDxrplAvailable
4FlareFLRevmAvailable
5BitcoinBTCbitcoinAvailable
6EthereumETHevmAvailable
7BSCBNBevmExperimental
8PolygonMATICevmExperimental
9ArbitrumARBevmExperimental
10AvalancheAVAXevmExperimental
11SUISUIsuiExperimental

Endpoint Reference

Wallets

MethodPathDescription
GET/wallets/{blockchainId}/{address}Full wallet intelligence
GET/wallets/{blockchainId}/{address}/risk-scoreRisk score only
GET/wallet/{blockchainId}/{address}/sankeyFund flow (Sankey) data

Fraud Reports

MethodPathDescription
GET/fraud-reportsList fraud reports (filterable)
POST/fraud-reportsSubmit a fraud report

Blacklist

MethodPathDescription
GET/blacklistList all blacklisted addresses

Threat Feed (Enterprise)

MethodPathDescription
GET/feed/snapshotFull threat intelligence snapshot

Webhooks (Enterprise)

MethodPathDescription
GET/webhooksList subscriptions
POST/webhooksCreate subscription
PATCH/webhooks/{id}Update subscription
DELETE/webhooks/{id}Delete subscription
POST/webhooks/{id}/testSend a test delivery
GET/webhooks/{id}/deliveriesView delivery log
POST/webhooks/{id}/rotate-secretRotate signing secret

Domains (Enterprise)

MethodPathDescription
POST/domains/reportSubmit a malicious domain to the threat database and queue for Intel scanning
POST/domains/monitorQueue a domain for Intel scanning without writing to the threat database
GET/domains/lookupLook up a domain's current threat record

Ingest (Bulk Import)

MethodPathDescription
POST/ingest/reportsBulk import fraud reports
POST/ingest/walletsBulk import suspicious wallets
POST/ingest/domainsBulk import malicious domains
POST/ingest/batchAsync batch ingest (large payloads)
GET/ingest/batch/{jobId}Check async batch job status

Intelligence

MethodPathDescription
GET/intelligence/wallet-analysisAdvanced wallet intelligence and pattern analysis

API Keys

MethodPathDescription
GET/api-keysList your API keys
POST/api-keysCreate a new API key

Health

MethodPathDescription
GET/healthAPI health check
GET/openapi.jsonOpenAPI JSON spec (auth required)
GET/openapi.yamlOpenAPI YAML spec (auth required)

The full interactive Swagger UI is available in the Platform at API Docs in the sidebar, where you can explore and test every endpoint with your API key.


Code Examples

cURL

# Wallet intelligence lookup (XRPL, blockchain_id=1)
curl -H "X-API-Key: ek_YOUR_API_KEY" \
"https://{tenant}-platform.chainara.io/api/v2/wallets/1/rYOUR_WALLET_ADDRESS"

# Risk score only
curl -H "X-API-Key: ek_YOUR_API_KEY" \
"https://{tenant}-platform.chainara.io/api/v2/wallets/1/rYOUR_WALLET_ADDRESS/risk-score"

JavaScript

const BASE_URL = 'https://{tenant}-platform.chainara.io/api/v2';
const API_KEY = 'ek_YOUR_API_KEY';

const headers = { 'X-API-Key': API_KEY };

// Wallet lookup
const res = await fetch(`${BASE_URL}/wallets/1/rYOUR_WALLET_ADDRESS`, { headers });
const data = await res.json();

console.log(data.risk_score); // 0–100
console.log(data.risk_level); // "low" | "medium" | "high" | "critical"
console.log(data.is_blacklisted); // boolean
console.log(data.classification); // e.g. "Fake Giveaway"

Python

import requests

BASE_URL = 'https://{tenant}-platform.chainara.io/api/v2'
headers = {'X-API-Key': 'ek_YOUR_API_KEY'}

# Single wallet lookup
r = requests.get(f'{BASE_URL}/wallets/1/rYOUR_WALLET_ADDRESS', headers=headers)
wallet = r.json()
print(wallet['risk_score'], wallet['risk_level'])


Wallet Response Schema

A GET /wallets/{blockchainId}/{address} response returns:

{
"address": "rYOUR_WALLET_ADDRESS",
"blockchain_id": 1,
"risk_score": 85,
"risk_level": "high",
"confidence": 0.80,
"is_blacklisted": true,
"classification": "Fake Giveaway",
"severity_tier": "blacklisted",
"first_seen": "2024-01-15T10:30:00Z",
"last_active": "2024-03-10T14:22:00Z",
"balance_xrp": 0.0,
"total_sent": 45000.0,
"total_received": 45020.0,
"signals": [
{
"type": "reported_fraud",
"description": "3 fraud reports reference this address",
"weight": 0.35
},
{
"type": "linked_to_phishing_domain",
"description": "Associated domain flagged as phishing",
"weight": 0.25
},
{
"type": "rapid_tx",
"description": "Unusually high transaction frequency",
"weight": 0.15
}
],
"fraud_reports": [],
"associated_domains": []
}

Submitting Fraud Reports

curl -X POST "https://{tenant}-platform.chainara.io/api/v2/fraud-reports" \
-H "X-API-Key: ek_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"blockchain_id": 1,
"wallet_address": "rYOUR_WALLET_ADDRESS",
"scam_type": "fake_giveaway",
"description": "Wallet promoted a double-your-XRP giveaway on Twitter",
"domain": "xrp-giveaway-example.live",
"evidence_urls": ["https://twitter.com/example/status/123"]
}'

Scam type values: fake_giveaway, phishing, investment_scam, rug_pull, money_laundering, ponzi, exchange_hack, mixer

Submitted reports enter the system with verificationStatus: pending. They are visible in the Fraud Intelligence feed and queued for analyst review. Once verified, the wallet's risk score is recalculated.


Ingest API (Bulk Import)

The Ingest endpoints allow bulk submission of your own threat intelligence using your existing API key.

# Bulk import suspicious wallets
curl -X POST "https://{tenant}-platform.chainara.io/api/v2/ingest/wallets" \
-H "X-API-Key: ek_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"wallets": [
{
"blockchain_id": 1,
"address": "rADDR1...",
"reason": "Reported by victim: giveaway scam",
"confidence": 0.85
}
]
}'

# Bulk import malicious domains
curl -X POST "https://{tenant}-platform.chainara.io/api/v2/ingest/domains" \
-H "X-API-Key: ek_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"domains": [
{ "domain": "xrp-phish-example.xyz", "category": "phishing" }
]
}'
Ingest tier behavior

All data submitted via the Ingest API is tagged source_tier: community and verification_status: pending, pending admin review. Risk scores for ingest-sourced wallets are capped at 65: below the 75+ threshold for auto-flagging: until an analyst verifies the submission.

For large payloads, use POST /ingest/batch to submit asynchronously and poll GET /ingest/batch/{jobId} for completion status.


Threat Feed

The threat feed delivers a complete snapshot of all current threat indicators for external consumption by SIEMs, exchanges, and compliance tools.

API Docs

Snapshot

# Full threat intelligence snapshot (Enterprise)
curl "https://{tenant}-platform.chainara.io/api/v2/feed/snapshot" \
-H "X-API-Key: ek_YOUR_API_KEY"

# Filter to blacklisted wallets on XRPL only
curl "https://{tenant}-platform.chainara.io/api/v2/feed/snapshot?type=wallet&blockchain=xrpl&severity_tier=blacklisted" \
-H "X-API-Key: ek_YOUR_API_KEY"

Query parameters:

ParameterValuesDescription
typedomain, wallet, fraud_report, community_reportFilter by indicator type
severity_tierblacklisted, suspiciousWallet severity tier
min_confidence0.01.0Minimum confidence threshold
blockchainxrpl, stellar, bitcoin, ethereumFilter by chain
sinceISO 8601 timestampOnly return items updated after this time
cursorstringPagination cursor for large result sets

Use since with a stored timestamp to build an incremental sync: only pull changes since your last fetch.


Webhooks (Real-Time Push)

Webhooks deliver threat events to your endpoint the moment they happen, eliminating the need to poll.

Register a Webhook

curl -X POST "https://{tenant}-platform.chainara.io/api/v2/webhooks" \
-H "X-API-Key: ek_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://your-siem.example.com/chainara-events",
"event_types": ["indicator_added", "indicator_updated", "indicator_removed"],
"indicator_types": ["wallet", "domain"],
"description": "SIEM integration"
}'

The response includes a secret: store it securely for signature verification.

Verify Webhook Signatures

Every delivery includes an X-Chainara-Signature header. Verify it before processing:

import hmac, hashlib

def verify_signature(payload_bytes: bytes, signature: str, secret: str) -> bool:
expected = hmac.new(
secret.encode(),
payload_bytes,
hashlib.sha256
).hexdigest()
return hmac.compare_digest(f"sha256={expected}", signature)

Webhook Payload Format

{
"event": "indicator_added",
"type": "wallet",
"timestamp": "2024-03-15T10:22:00Z",
"data": {
"address": "rWALLET_ADDRESS",
"blockchain": "xrpl",
"risk_score": 82,
"severity_tier": "blacklisted",
"confidence": 0.85,
"classification": "Fake Giveaway"
}
}

Event types: indicator_added, indicator_updated, indicator_removed

Delivery Retry Policy

Chainara retries failed deliveries automatically. If your endpoint returns a non-2xx response or times out:

  • Retries occur with exponential backoff
  • Failed deliveries are visible in the delivery log (GET /webhooks/{id}/deliveries)
  • Each log entry shows the HTTP status your endpoint returned, the response body, and the delivery timestamp

If your endpoint is down for an extended period, use the Threat Feed snapshot (GET /feed/snapshot?since=...) to catch up on missed events once it's back online.

Testing and Monitoring

# Send a test delivery to confirm your endpoint is receiving
curl -X POST "https://{tenant}-platform.chainara.io/api/v2/webhooks/{id}/test" \
-H "X-API-Key: ek_YOUR_API_KEY"

# View delivery history and failure logs
curl "https://{tenant}-platform.chainara.io/api/v2/webhooks/{id}/deliveries" \
-H "X-API-Key: ek_YOUR_API_KEY"

# Rotate signing secret without losing the subscription
curl -X POST "https://{tenant}-platform.chainara.io/api/v2/webhooks/{id}/rotate-secret" \
-H "X-API-Key: ek_YOUR_API_KEY"

Error Responses

All errors follow a consistent JSON format:

{
"error": "Description of what went wrong",
"meta": {
"timestamp": "2024-03-15T10:00:00Z",
"version": "v2",
"endpoint": "/api/v2/wallets/1/rADDR..."
}
}
StatusMeaningCommon Cause
400Bad RequestInvalid address format, missing required field
401UnauthorizedMissing or invalid X-API-Key
403ForbiddenYour plan doesn't include this endpoint
404Not FoundWallet or resource doesn't exist yet
429Too Many RequestsRate limit exceeded: check Retry-After header
500Internal Server ErrorBackend error: retry with exponential backoff

SIEM Integration Pattern

For real-time integration with a SIEM or exchange screening system, use webhooks for new threats and snapshot polling for initial bulk load and catch-up:

Initial setup:
GET /feed/snapshot → load full current threat database into SIEM

Ongoing (choose one):
Option A: Webhooks (recommended):
POST /webhooks → subscribe to indicator_added + indicator_updated
→ Chainara pushes events to your endpoint in real time

Option B: Polling (fallback):
Every 5–15 minutes:
GET /feed/snapshot?since={last_timestamp} → pull incremental changes
Update your SIEM with new/changed indicators

For exchange wallet screening at transaction time, use the wallet endpoint directly:

# Screen a wallet before processing a withdrawal
curl -H "X-API-Key: ek_YOUR_API_KEY" \
"https://{tenant}-platform.chainara.io/api/v2/wallets/1/{customer_wallet_address}/risk-score"

# Block if risk_score >= 75 or is_blacklisted == true

API Documentation (Swagger)

API Integration

The full Swagger UI is available in the Platform at API Docs in the sidebar. It provides:

  • Live endpoint testing with your API key
  • Full request/response schemas for every endpoint
  • Downloadable OpenAPI spec (GET /openapi.json)

The Swagger UI also has an Internal API section (under Manage → Internal API) documenting internal endpoints used by the Platform frontend.