Integrate15

HTTP API

Two endpoints are paid, everything else is free and public; there are no API keys. Paid calls are settled per request over x402 with Circle's facilitator on Arc. Internal ticks are protected by a bearer secret and are listed so you can run them yourself.

Endpoints

MethodPathPriceWhat it does
POST/api/v1/screen0.01 USDCFull grade of one address (+ name, amountUsdc, payeeBook, clientId, depth). Verdict + signed attestation. Header X-CompliR-Decision-Id. Same-origin browser calls are free.
POST/api/v1/watch0.05 USDC / 30 dRegister address + webhookUrl (+ clientId, payeeBook). Adaptive re-screening; tier.changed webhooks. Header X-CompliR-Watch-Id. Settled after the handler succeeds.
POST/api/v1/tips0.05 USDC stakeSubmit a staked tip about an address. Settled first; same-origin creates a demo tip.
POST/api/v1/shadowfreePayee book + recent payments → wouldHold / wouldLimit / lookalikes / paymentsAtRisk. ≤ 50 addresses, 4 in flight, depth 1.
GET/api/v1/attestation/:addressfreeThe full verdict, always: tier, score, reasons, recommendedLimits, rationale, eddRequested, edd, nextRescreenAt, attestation. Never-seen addresses are screened on demand (source: fresh, ~20-60 s); expired ones are returned at once with expired: true while a background re-screen runs.
GET/api/v1/badge/:address.svgfreeScreened-by-CompliR SVG from the store; grey unknown / expired; Cache-Control max-age=60.
GET/api/v1/decision/:idfreeOne replayable decision-log entry: payload, prevHash, hash, anchorTx.
GET/api/v1/ledger?limit=50freeMost recent ledger entries, newest first.
GET/api/v1/ledger/verifyfreeRe-walks the hash chain; { ok, brokenAt, length }.
GET/api/v1/network/:addressfreeAnonymised network signal: heldElsewhere, concentrationHint, recent blocklist events.
GET/api/v1/network/events?limit=50freeLast USDC blocklist events the reactor saw and what it did.
GET/api/v1/map?limit=150freeTrust Map snapshot: nodes, edges, header stats; cached 10 s.
GET/api/v1/map/changes?limit=freeRecent tier changes from the Trust Map tailer (≤ 200).
GET/api/v1/map/:addressfreeOne Trust Map node with its edges.
GET/api/v1/feed?limit=25freeAnonymised recent screenings (masked addresses).
GET/api/v1/numbersfreePublic counters; own wallets and internal client ids excluded.
GET/api/v1/companyfreeCompany snapshot + last ten operator decisions; cached 30 s.
GET/api/v1/payoutsfreeInvoices, totals, mode, policy and missingForLive. POST adds a demo invoice (same-origin only).
GET/api/v1/reportfreeLatest signed daily report (+ archive); ?format=md. /api/v1/report/:date[.md] for one day; 404 until the first report.
GET/api/v1/tips · /api/v1/tips/:idfreeTip market totals, leaderboard, items (anonymised) · one tip.
GET/api/v1/edd/:idfreePublic view of an EDD request: questions, status, re-screen outcome. Never the answers.
POST/api/v1/edd/:id/answerfreeThe counterparty answers once; answers stored privately, keccak logged, subject re-screened. Second submission → 409.
GET/api/v1/healthfreeLiveness, chain id, explorer URL, USDC and registry addresses, x402 prices, signer mode, example addresses (real wallets).

Prices are the operator's current prices (bounds), read per request; /api/v1/health reports the config defaults. With X402_DISABLED=1 (this deployment today) every endpoint is free and responses carry X-CompliR-Payment: disabled.

Free verdict vs paid screen

The free GET /api/v1/attestation/:address always returns a verdict and runs the same pipeline as the paid screen: sanctions, Circle's USDC blocklist, the two-hop funder trace and the analyst. It returns the same fields: reasons[], recommendedLimits, rationale, eddRequested, edd, nextRescreenAt. Most integrations need no payer key.

free GET
Latest verdict for the address. First sight of an address screens it on demand (allow ~90 s); later reads take < 1 s. Concurrent requests share one screen.
paid POST /screen
Forces a new screen now and adds context the GET cannot take: amountUsdc (sizes limits and a LOW-verdict guarantee bond), payeeBook (lookalike / address-poisoning checks), name (sanctions name match), clientId attribution.
attestation.validUntil
When the signature lapses: HIGH 1 h, MEDIUM 24 h, LOW 7 d. After it, ICompliR.isAllowed() returns false and the free GET returns the verdict with expired: true, refreshing: true while it re-screens in the background. The next read gets the fresh verdict.
nextRescreenAt
When CompliR plans to re-grade (inside the same tier window). Cache a verdict until min(validUntil, nextRescreenAt); you never need to pay to refresh it.
source
store = latest stored verdict; fresh = screened by this request.
attestation.registryTx
Filled once the on-chain mirror lands (seconds after the screen). A fresh POST response returns null; read it later from the GET. Only on-chain callers (isAllowed) need to wait for it.
edd
Present when the analyst opened Enhanced Due Diligence questions; MEDIUM mostly. A HIGH on a sanctions or blocklist hit has none, because answers cannot clear it.
?wait=<s>
Optional on the GET (1-120). On first sight, if the screen takes longer, returns 202 {status: "screening", retryAfterSeconds} with Retry-After; the screen keeps running. Recommended on hot paths with wait=8.
default wait
Without ?wait the GET waits up to 25 s, then returns 503 SCREENING_IN_PROGRESS with Retry-After: an error, so a client that ignores this API never reads a 2xx without a verdict as a pass. The retry gets the finished screen.
rate limit
Only new first-sight screens: 30 per minute per IP. Reads of known addresses are unlimited. Every response has RateLimit-Policy; first-sight responses add RateLimit-Limit / -Remaining / -Reset. Over the limit: 429 RATE_LIMITED + Retry-After. /api/v1/check: 20 per minute per IP, same 429 shape.
retries
On 202, 503 SCREENING_IN_PROGRESS or 429: wait Retry-After, then GET again. On 502/503/504 without Retry-After, a network error or a timeout: retry up to 3 times with backoff (1 s, 2 s, 4 s) before treating CompliR as unreachable. Do not retry 400/404.
fail closed + limits
202, 429 and 503 SCREENING_IN_PROGRESS are wait-and-retry, never oracle failure. If you fail closed (recommended for outbound), implement this first, or a rate limit or a slow first sight becomes a blocked legitimate payment. Cap the total wait, then apply the fail mode. Retrying an address whose screen is running costs no rate-limit budget; only starting a new first-sight screen does.
fail mode
Only after retries. Recommended default: closed for outbound payments (block or queue for review), open only for small inbound payments, and never silently.

Internal ticks

POST|GET /api/internal/<worker> with Authorization: Bearer $CRON_SECRET runs one tick and returns its summary. Vercel crons call these (see Self-hosting); the worker/*.ts loops call the same functions.

watcher
due re-screens + webhooks + anchor-if-due
trustmap
tail Arc, grade recipients ≥ 25 USDC
treasury
guarded payouts tick
operator
one operator decision
events
blocklist reactor tick · POST { simulate } = drill
refunds
process the refund queue · POST manual refund / requeue
tips
verify + pay tips · POST { review, decision } human override
usyc
revenue yield tick: Circle Earn vault sweep (dry-run unless YIELD_MODE=live; YIELD_BACKEND=usyc for the legacy USYC Teller)
report
generate + sign a daily report (?date=, &force=1)
circle
Circle wallet status · POST { provision: true }

Error shape

json
{ "error": { "code": "VALIDATION_ERROR", "message": "…", "details": { … } } }

INVALID_JSON 400 · VALIDATION_ERROR 400 · NOT_FOUND 404 · RATE_LIMITED 429 · NOT_IMPLEMENTED 501 · SERVICE_PAUSED 503 · SCREENING_IN_PROGRESS 503 · INTERNAL_ERROR 500
x402: PAYMENT_MISCONFIGURED 503 · PAYMENT_VERIFY_UNAVAILABLE 502 · PAYMENT_SETTLE_UNAVAILABLE 502 · PAID_BUT_UNDELIVERED 502
Every response carries X-CompliR-Version: v1 and Cache-Control: no-store (badge, map and company set their own max-age).

x402 headers and statuses

HeaderDirectionMeaning
PAYMENT-REQUIREDresponse (402)base64 PaymentRequired: { x402Version: 2, error?, resource, accepts: [requirements] }; the same object is the JSON body
PAYMENT-SIGNATURErequestbase64 PaymentPayload: { x402Version: 2, resource, accepted, payload: { signature, authorization } }. X-PAYMENT is accepted as a v1-named alias (payload must still be v2).
PAYMENT-RESPONSEresponsebase64 settle receipt: { success, transaction, network, payer, amount, errorReason? }. Mirrored as X-PAYMENT-RESPONSE.
X-CompliR-PaymentresponseCompliR's one-word state: disabled · required · settled · replay · retry · pending · settle-failed · verify-unavailable · settle-unavailable · not-charged · refund-queued
StatusX-CompliR-PaymentWhen
402requiredno PAYMENT-SIGNATURE, bad payload, wrong x402Version, requirements mismatch (scheme, network, asset, payTo, amount, validity), or facilitator /verify said invalid
402pendingsettlement_pending after status polls; retry with the SAME signed authorization to converge on the one payment
402settle-failedfacilitator reported a failed settlement; not charged
200settledpaid and delivered; receipt in PAYMENT-RESPONSE
200replaysame nonce within 5 min after a settled payment: cached response, no second settle
200retrysame nonce while the first attempt is still in flight
4xxnot-chargedthe handler refused (validation, paused) before settlement
500not-chargedhandler threw before settlement
502verify-unavailablefacilitator /verify unreachable; no charge
502settle-unavailablefacilitator /settle unreachable after the handler ran; retry with the same authorization, you will not be charged twice
502refund-queuedsettled but undelivered: PAID_BUT_UNDELIVERED, refund queued to the payer
503-PAYMENT_MISCONFIGURED: x402 enabled but X402_PAY_TO / facilitator URL missing; no charge

Full flow, requirements and the facilitator in x402 payments.