> ## Documentation Index
> Fetch the complete documentation index at: https://clearlayer.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Quick Start

> Make your first compliance decision in under 10 minutes.

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

<Steps>
  <Step title="Get your API key">
    The sandbox API key is pre-provisioned and ready to use:

    ```bash theme={null}
    cl_test_key_1234567890
    ```

    Use this key in the `Authorization` header for all authenticated requests. See [Authentication](/authentication) for details.
  </Step>

  <Step title="Check the API">
    `GET /v1/health` requires no authentication. Use it to confirm the API is reachable before making authenticated calls.

    <CodeGroup>
      ```bash curl theme={null}
      curl https://clearlayer-api-production.up.railway.app/v1/health
      ```
    </CodeGroup>

    A successful response returns `200 OK`.
  </Step>

  <Step title="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.

    <CodeGroup>
      ```bash curl theme={null}
      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"
        }'
      ```
    </CodeGroup>

    Expected response:

    ```json theme={null}
    {
      "decision": "allow",
      "reasons": ["policy_requirements_satisfied"],
      "audit_id": "dec_...",
      "policy_version": "v1",
      "timestamp": "2026-03-31T00:00:00.000Z"
    }
    ```

    | Seed ID        | Profile                                            |
    | -------------- | -------------------------------------------------- |
    | `inv_seed_001` | KYC verified, accredited, country: US              |
    | `wal_seed_001` | Screening: verified, risk level: low               |
    | `pol_seed_001` | Requires KYC, accredited, US only, verified wallet |
  </Step>

  <Step title="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.

    <CodeGroup>
      ```bash curl theme={null}
      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"
        }'
      ```
    </CodeGroup>

    Expected response:

    ```json theme={null}
    {
      "decision": "deny",
      "reasons": ["wallet_blocked"],
      "audit_id": "dec_...",
      "policy_version": "v1",
      "timestamp": "2026-03-31T00:00:00.000Z"
    }
    ```

    | Seed ID        | Profile                               |
    | -------------- | ------------------------------------- |
    | `inv_seed_003` | KYC verified, accredited, country: US |
    | `wal_seed_003` | Screening: blocked, risk level: high  |
  </Step>

  <Step title="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.

    <CodeGroup>
      ```bash curl theme={null}
      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"
        }'
      ```
    </CodeGroup>

    Expected response:

    ```json theme={null}
    {
      "decision": "review",
      "reasons": ["kyc_not_verified"],
      "audit_id": "dec_...",
      "policy_version": "v1",
      "timestamp": "2026-03-31T00:00:00.000Z"
    }
    ```

    | Seed ID        | Profile                                  |
    | -------------- | ---------------------------------------- |
    | `inv_seed_002` | KYC pending, not accredited, country: GB |
    | `wal_seed_002` | Screening: pending, risk level: medium   |
  </Step>
</Steps>

<Note>
  For the full list of endpoints, request schemas, and response fields, see the [API Reference](/api/decisions).
</Note>
