Skip to main content

Documentation Index

Fetch the complete documentation index at: https://clearlayer.mintlify.app/llms.txt

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

Clearlayer evaluates investors, wallets, and policies to produce real-time compliance decisions. This guide walks you through the full flow using the sandbox environment.
1

Get your API key

The sandbox API key is pre-provisioned and ready to use:
cl_test_key_1234567890
Use this key in the Authorization header for all authenticated requests. See Authentication for details.
2

Check the API

GET /v1/health requires no authentication. Use it to confirm the API is reachable before making authenticated calls.
curl https://clearlayer-api-production.up.railway.app/v1/health
A successful response returns 200 OK.
3

Request a decision — allow

Request a compliance decision for a verified, accredited US investor with a clean wallet against the US Accredited Only Fund policy. The engine evaluates all checks in order and returns allow when every requirement is satisfied.
curl -X POST https://clearlayer-api-production.up.railway.app/v1/decisions \
  -H "Authorization: Bearer cl_test_key_1234567890" \
  -H "Content-Type: application/json" \
  -d '{
    "investor_id": "inv_seed_001",
    "wallet_id": "wal_seed_001",
    "asset_policy_id": "pol_seed_001",
    "action": "transfer"
  }'
Expected response:
{
  "decision": "allow",
  "reasons": ["policy_requirements_satisfied"],
  "audit_id": "dec_...",
  "policy_version": "v1",
  "timestamp": "2026-03-31T00:00:00.000Z"
}
Seed IDProfile
inv_seed_001KYC verified, accredited, country: US
wal_seed_001Screening: verified, risk level: low
pol_seed_001Requires KYC, accredited, US only, verified wallet
4

Try a deny

Use an investor with a blocked wallet. The decision engine checks wallet status first — a blocked wallet immediately produces deny regardless of KYC or accreditation status.
curl -X POST https://clearlayer-api-production.up.railway.app/v1/decisions \
  -H "Authorization: Bearer cl_test_key_1234567890" \
  -H "Content-Type: application/json" \
  -d '{
    "investor_id": "inv_seed_003",
    "wallet_id": "wal_seed_003",
    "asset_policy_id": "pol_seed_001",
    "action": "transfer"
  }'
Expected response:
{
  "decision": "deny",
  "reasons": ["wallet_blocked"],
  "audit_id": "dec_...",
  "policy_version": "v1",
  "timestamp": "2026-03-31T00:00:00.000Z"
}
Seed IDProfile
inv_seed_003KYC verified, accredited, country: US
wal_seed_003Screening: blocked, risk level: high
5

Try a review

Use an investor with pending KYC and an unverified wallet. The engine returns review when a required check cannot yet pass but has not been explicitly blocked.
curl -X POST https://clearlayer-api-production.up.railway.app/v1/decisions \
  -H "Authorization: Bearer cl_test_key_1234567890" \
  -H "Content-Type: application/json" \
  -d '{
    "investor_id": "inv_seed_002",
    "wallet_id": "wal_seed_002",
    "asset_policy_id": "pol_seed_001",
    "action": "transfer"
  }'
Expected response:
{
  "decision": "review",
  "reasons": ["kyc_not_verified"],
  "audit_id": "dec_...",
  "policy_version": "v1",
  "timestamp": "2026-03-31T00:00:00.000Z"
}
Seed IDProfile
inv_seed_002KYC pending, not accredited, country: GB
wal_seed_002Screening: pending, risk level: medium
For the full list of endpoints, request schemas, and response fields, see the API Reference.