Authentication Required
All API requests require authentication via an API key. Include your key in the X-API-Key header with every request.
Don't have an API key yet? Sign up for free to get started with 1,000 free transactions.
Complete reference for Spectra's fraud detection API. Real-time transaction monitoring with 17 detection rules across general fraud, bonus abuse, and multi-account detection.
All API requests require authentication via an API key. Include your key in the X-API-Key header with every request.
Don't have an API key yet? Sign up for free to get started with 1,000 free transactions.
Submit a single transaction for real-time fraud detection. The API runs all enabled detection rules and returns risk scores and alerts immediately.
| Parameter | Type | Required | Description |
|---|---|---|---|
amount |
number | Required | Transaction amount |
source_account |
string | Optional | Source account identifier |
type |
string | Optional | Transaction type (payment, deposit, withdrawal, etc.) |
country_code |
string | Optional | ISO country code (US, UK, CA, etc.) |
ip_address |
string | Optional | User IP address |
device_fingerprint |
string | Optional | Device fingerprint for multi-account detection |
curl -X POST https://spectra-qqzo.polsia.app/api/transactions \ -H "X-API-Key: sk_spectra_abc123..." \ -H "Content-Type: application/json" \ -d '{ "amount": 250.50, "source_account": "user_12345", "type": "payment", "country_code": "US", "ip_address": "192.168.1.1", "device_fingerprint": "fp_abc123xyz" }'
{
"transaction": {
"id": 123,
"amount": 250.50,
"risk_score": 75,
"flagged": true
},
"alerts": [
{
"alert_type": "velocity",
"severity": "high",
"title": "Velocity alert: 12 transactions in 60 minutes",
"risk_score": 75
}
]
}
Submit multiple transactions for batch processing. Maximum 100 transactions per request.
curl -X POST https://spectra-qqzo.polsia.app/api/transactions/batch \ -H "X-API-Key: sk_spectra_abc123..." \ -H "Content-Type: application/json" \ -d '{ "transactions": [ { "amount": 100, "source_account": "user_1" }, { "amount": 250, "source_account": "user_2" }, { "amount": 50, "source_account": "user_1" } ] }'
Retrieve transaction history with optional filters.
| Parameter | Type | Description |
|---|---|---|
page |
number | Page number (default: 1) |
limit |
number | Results per page (default: 50, max: 100) |
flagged |
boolean | Filter by flagged status (true/false) |
source_account |
string | Filter by source account |
Evaluate transactions against fraud detection rules without persisting them. Useful for testing or pre-screening.
curl -X POST https://spectra-qqzo.polsia.app/api/rules/evaluate \ -H "X-API-Key: sk_spectra_abc123..." \ -H "Content-Type: application/json" \ -d '{ "transactions": [ { "amount": 1000, "source_account": "user_999" } ], "category": "bonus_abuse" }'
Get comprehensive system metrics including transaction volume, detection rates, and alert breakdowns.
curl -X GET https://spectra-qqzo.polsia.app/api/metrics \ -H "X-API-Key: sk_spectra_abc123..."
Health check endpoint (no authentication required). Add ?metrics=true for extended metrics or ?check=db to verify database connectivity.
curl https://spectra-qqzo.polsia.app/health?metrics=true&check=db
Free Trial: 1,000 transactions, no time limit
Rate Limit: 100 requests per minute per API key
Batch Limit: Maximum 100 transactions per batch request
Concurrent Requests: No hard limit, but respect rate limits
When you exceed your transaction limit, you'll receive a 429 Too Many Requests response with details about your current usage.
Spectra includes 17 pre-configured fraud detection rules across three categories:
All rules run automatically on every transaction. Results are returned in real-time with severity levels (low, medium, high, critical) and detailed explanations.