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.

Create a policy

POST /v1/policies Creates a compliance policy that defines the rules investors and wallets must satisfy to be granted access to an asset. Policies are referenced by asset_policy_id when requesting a compliance decision.
All requests to this endpoint require a valid API key in the Authorization header.

Request body

name
string
required
A human-readable display name for the policy (e.g. "US Accredited Only").
requires_kyc
boolean
required
If true, the investor’s kyc_status must be "verified" for a decision to be "allow".
requires_accredited
boolean
required
If true, the investor’s accredited_status must be true for a decision to be "allow".
allowed_countries
string[]
An allowlist of 2-letter ISO country codes. If non-empty, only investors from these countries can receive an "allow" decision. Defaults to [].
blocked_countries
string[]
A blocklist of 2-letter ISO country codes. Investors from these countries are always denied. Defaults to [].
wallet_must_be_verified
boolean
required
If true, the wallet’s screening_status must be "verified" for a decision to be "allow".
status
string
Whether the policy is active. Must be "active" or "inactive". Defaults to "active".
When allowed_countries is [] (empty), no country restriction is applied — investors from any country can pass this check. Only set allowed_countries when you want to explicitly restrict access to specific countries.

Response fields

id
string
Unique policy ID. Format: pol_...
name
string
The policy display name.
requires_kyc
boolean
Whether KYC verification is required.
requires_accredited
boolean
Whether accreditation is required.
allowed_countries
string[]
Allowlisted country codes. Empty array means no restriction.
blocked_countries
string[]
Blocklisted country codes.
wallet_must_be_verified
boolean
Whether wallet screening must be "verified".
status
string
"active" or "inactive".
created_at
string
ISO 8601 timestamp of when the policy was created.

Example

curl -X POST https://clearlayer-api-production.up.railway.app/v1/policies \
  -H "Authorization: Bearer cl_test_key_1234567890" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "US Accredited Only",
    "requires_kyc": true,
    "requires_accredited": true,
    "allowed_countries": ["US"],
    "blocked_countries": [],
    "wallet_must_be_verified": true
  }'

201 — Created

{
  "id": "pol_m3n4o5p6q7r8",
  "name": "US Accredited Only",
  "requires_kyc": true,
  "requires_accredited": true,
  "allowed_countries": ["US"],
  "blocked_countries": [],
  "wallet_must_be_verified": true,
  "status": "active",
  "created_at": "2024-01-15T10:32:00.000Z"
}