Quickstart
Install the SDK, configure your credentials, and create your first AML case — in under 10 minutes.
Before you begin
Make sure you have the following before you start:
| Requirement | Details |
|---|---|
| CaseForge account | Sign up at dashboard.caseforge.io. Free Sandbox tier is sufficient for this guide. |
| API key | Generate one in Dashboard → Settings → API Keys. Use a Sandbox key (cf_sand_…) for this guide. |
| Python 3.9+ or Node.js 18+ | Check your version: python --version or node --version. |
| pip or npm | Included with standard Python and Node.js installations. |
Never commit your API key to source control. Use an environment variable or a secrets manager. See Authentication for best practices.
Step 1 — Install the SDK
Install the CaseForge SDK using your package manager. The SDK has no additional system dependencies.
pip install caseforge-sdk
Requires Python 3.9 or later. If you use a virtual environment (recommended), activate it first: python -m venv .venv && source .venv/bin/activate
npm install @caseforge/sdk
Requires Node.js 18 or later. The package ships with TypeScript type definitions — no @types package needed.
Verify the installation by printing the SDK version:
python -c "import caseforge; print(caseforge.__version__)"
# 2.0.0
node -e "const cf = require('@caseforge/sdk'); console.log(cf.VERSION)"
// 2.0.0
Step 2 — Configure your API key
The SDK reads your API key from the CASEFORGE_API_KEY environment variable by default. Set it in your shell before running your code:
# macOS / Linux
export CASEFORGE_API_KEY="cf_sand_your_key_here"
# Windows PowerShell
$env:CASEFORGE_API_KEY = "cf_sand_your_key_here"
You can also pass the key directly when you create a client instance — useful when you're reading from your own secrets system:
import caseforge
# Reads CASEFORGE_API_KEY automatically
client = caseforge.Client()
# Or supply the key explicitly
client = caseforge.Client(api_key="cf_sand_your_key_here")
import CaseForge from '@caseforge/sdk';
// Reads CASEFORGE_API_KEY automatically
const client = new CaseForge();
// Or supply the key explicitly
const client = new CaseForge({ apiKey: 'cf_sand_your_key_here' });
Step 3 — Create your first case
With the client configured, you can create an AML case. The following example creates a transaction_monitoring case for a customer flagged for structuring activity:
import caseforge
client = caseforge.Client()
# Create a case
case = client.cases.create(
subject_id="cust_7a2b4c", # Your customer ID
case_type="transaction_monitoring",
priority="high",
summary="Structuring — 12 cash deposits below $10k in 30 days",
tags=["structuring", "cash", "q1-2026"],
)
print(f"Case created: {case.id}")
print(f"Status: {case.status}")
print(f"Assigned to: {case.assigned_to}")
print(f"Created at: {case.created_at}")
import CaseForge from '@caseforge/sdk';
const client = new CaseForge();
// Create a case
const aCase = await client.cases.create({
subjectId: 'cust_7a2b4c',
caseType: 'transaction_monitoring',
priority: 'high',
summary: 'Structuring — 12 cash deposits below $10k in 30 days',
tags: ['structuring', 'cash', 'q1-2026'],
});
console.log(`Case created: ${aCase.id}`);
console.log(`Status: ${aCase.status}`);
console.log(`Assigned to: ${aCase.assignedTo}`);
Step 4 — Understand the response
A successful cases.create() call returns a Case object. The key fields you'll use most:
{
"id": "case_9x4m1z",
"subject_id": "cust_7a2b4c",
"case_type": "transaction_monitoring",
"status": "open",
"priority": "high",
"summary": "Structuring — 12 cash deposits below $10k in 30 days",
"tags": ["structuring", "cash", "q1-2026"],
"assigned_to": null,
"created_at": "2026-03-09T14:22:11Z",
"updated_at": "2026-03-09T14:22:11Z"
}
| Field | Type | Description |
|---|---|---|
id | string | Unique case identifier. Use this to retrieve, update, or close the case. |
status | string | open, in_review, escalated, closed, or sar_filed. |
priority | string | low, medium, high, or critical. |
assigned_to | string | null | Analyst ID if the case is assigned. null when unassigned. |
created_at | string (ISO 8601) | UTC timestamp. All timestamps in the API use ISO 8601 format. |
Step 5 — Verify in the dashboard
Open Dashboard → Cases in the CaseForge web app. You'll see the case you just created appear at the top of the case queue with status Open. Click it to view the full detail view, assign it to an analyst, or start attaching transactions.
You've installed the SDK, configured authentication, and created your first case. Next, learn how to authenticate securely for production deployments, or explore the full code sample library.