Choose a Path
Best for platform engineers, product teams, internal tools, and sync jobs. Validate auth and fetch a small page of deals.
Best for AI product teams and operator workflows. Connect Lev to a client like Cursor or Claude and verify auth and tool discovery.
Best for terminal workflows, shell scripts, CI/CD, and LLM coding agents. Install the CLI, authenticate, and list deals.
Before you start
- A Lev account with API access enabled
- A way to generate an API key in the platform or through the API
- A client you want to test with:
curl,fetch,requests, Cursor, Claude, or the Lev CLI
Path A: First REST API Call
1. Create an API key
The fastest way is through the Lev web app:
- Sign in to app.lev.com, click your name at the bottom of the sidebar, then click Settings
- Select the API Keys tab, click Create key, enter a label like "Quickstart Key", and click Create
- Copy the key immediately — it's only shown once
The full API key is only displayed at creation time. If you lose it, revoke it and create a new one.
Alternatively, create a key via the API if you're automating key provisioning:
2. Validate the key and inspect scopes
Use the validation endpoint to confirm that the key works and inspect the scopes granted to the underlying user.
/api/external/v2/auth/validate-api-keyValidate an API key and receive authentication details
Request body:
{
"api_key": "lev_sk_abc123def456..."
}Response (200):
{
"request_id": "...",
"data": {
"valid": true,
"user_id": 1234,
"account_id": 56,
"scopes": ["deals:read", "deals:write", "contacts:read"],
"tier": "standard"
}
}3. Fetch your first page of deals
Response:
{
"request_id": "a1b2c3d4-...",
"timestamp": "2026-03-20T15:30:45Z",
"data": [
{
"id": 101,
"title": "123 Main St Acquisition",
"loan_amount": 5000000.0,
"loan_type": "acquisition",
"transaction_type": "purchase",
"created_at": "2026-01-15T10:00:00Z"
}
],
"pagination": {
"total": 42,
"limit": 5,
"cursor": "eyJpZCI6IDEwMX0=",
"has_more": true,
"next_cursor": "eyJpZCI6IDEwNn0="
}
}If you get a 401, re-check your Authorization header. If you get a 403, inspect granted_scopes from GET /me or the validation response and confirm the key belongs to a user who can access the target resource.
Path B: First MCP Integration
1. Confirm the auth model you want
- Use JWT / OAuth when the MCP client signs in interactively.
- Use an API key only when the client or server-side bridge can safely store long-lived credentials.
- Always send a meaningful
X-Origin-Appvalue so Lev can identify the calling surface.
2. Add Lev to your MCP client
The exact config shape varies by client, but the important pieces are the same: the Lev server URL, OAuth support, and a clear origin-app identifier.
3. Verify the connection with a safe read
Start with a read-only question or tool action:
- "What account am I connected to in Lev?"
- "List my first five deals."
- "Which scopes are granted to this connection?"
If you want the full setup walkthrough, continue to MCP Setup.
Path C: First CLI Query
1. Install the CLI
pipx install lev-cliRequires Python 3.13+. See CLI Setup for alternative install methods.
2. Authenticate
lev auth loginPaste your API key when prompted. It is stored in your OS keychain — never written to a file. If you don't have a key yet, create one in the Lev web app (see Path A, step 1).
3. Verify and fetch deals
lev auth status # Confirm connection
lev deals list # Fetch your dealsYou should see a formatted table with your deals. When piped, the CLI auto-switches to JSON — which means an LLM coding agent running lev deals list in a shell receives structured data it can parse directly.
# Example: an agent or script capturing JSON output
lev deals list -o json | jq '.data[0].title'If you want the full CLI walkthrough, continue to CLI Setup.
Next Steps
After the quickstart, go one level deeper based on what you are building:
- Authentication — Learn the auth model, required headers, and failure modes in detail.
- Deals — Start with the core deal resource if you are building a product integration.
- MCP Setup — Continue from the MCP path with client-specific setup and troubleshooting.
- CLI Commands — Full command reference with syntax, flags, and output examples.
- Data Sync Patterns — Use the production sync recipe when you are moving data into another system.