Integration Summary
When to use- Make your first successful REST call or MCP connection using two clear happy paths.
- Use the read and write examples together so you can validate state before you mutate it.
Required scopes- Access is inherited from the connected user or JWT session.
- Inspect GET /me or the validate-api-key response to confirm the scopes available to the current token.
Headers- Authorization: Bearer <token>
- X-Origin-App: <client-name>
- Content-Type: application/json on write operations
Request schemaUse the path and query parameter tables below or /platform/openapi.json for the machine-readable schema surface.
Response schemaResponses use the standard request_id/timestamp/data envelope documented in the API overview.
Enums & values- Enum-like values and filter operators are documented inline on the page where available.
- When a value set is account- or tier-dependent, validate against live responses before hard-coding assumptions.
IdempotencyUse Idempotency-Key on retried writes when your client cannot guarantee whether a prior attempt succeeded.
Rate limitsSee /rate-limits. Page intentionally through list endpoints and apply backoff on 429 responses.
Examplescurl, TypeScript, Python
Starter example: POST /api/external/v2/auth/validate-api-key
bash
curl -X POST "https://api.levcapital.com/api/external/v2/auth/validate-api-key" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "X-Origin-App: my-integration"Quickstart
Last updated: March 2026
Use the shortest path that matches your build. Path A gets you to a successful REST API response quickly. Path B gets Lev working inside an MCP-compatible AI client with the least amount of setup ambiguity.
Choose a Path
Path A
First REST API call in about 5 minutes
Best for platform engineers, product teams, internal tools, and sync jobs. You will validate auth and fetch a small page of deals.
Path B
First MCP integration in about 10 minutes
Best for AI product teams and operator workflows. You will connect Lev to a client like Cursor or Claude and verify that auth and tool discovery work.
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, or Claude
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
Copy your key now
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:
Create an API key via the API
bash
curl -X POST "https://api.levcapital.com/api/external/v2/api-keys" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "X-Origin-App: my-integration"
-d '{
"label": "Quickstart Key"
}'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.
POST
/api/external/v2/auth/validate-api-keyValidate an API key and receive authentication details
Request body:
json
{
"api_key": "lev_sk_abc123def456..."
}Response (200):
json
{
"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
Fetch deals
bash
curl -X GET "https://api.levcapital.com/api/external/v2/deals?limit=5" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "X-Origin-App: my-integration"Response:
json
{
"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.
Example MCP client config
json
{
"mcpServers": {
"lev": {
"url": "https://api.levcapital.com/mcp",
"headers": {
"X-Origin-App": "cursor-lev-quickstart"
}
}
}
}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.
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.
- Data Sync Patterns — Use the production sync recipe when you are moving data into another system.