Authentication
All Klozeo API endpoints require authentication via an API key.
Get your API key
Section titled “Get your API key”Sign in to your dashboard at klozeo.com/dashboard, navigate to API Keys, and click New key.
Your API key is shown once at creation time: Klozeo stores only a hashed version for security. Copy it immediately and save it somewhere safe (a password manager, an .env file).
Missed it? Delete the key and create a new one. It takes 10 seconds.
Using your API key
Section titled “Using your API key”Pass the key in the X-API-Key header on every request:
curl -H "X-API-Key: sk_live_your_api_key_here" \ https://api.klozeo.com/api/v1/leadsKey format
Section titled “Key format”All API keys follow the format sk_live_<16-byte hex>.
MCP / OAuth clients
Section titled “MCP / OAuth clients”Using an AI client (Claude, Cursor, Cline…)? You don’t need to touch your API key. MCP clients use a browser-based authorization flow: sign in to your Klozeo account once and the client stores a key automatically. See MCP Setup →
Access and expiry
Section titled “Access and expiry”When you create a key in the dashboard, you choose what it can do and when it stops working. Full access is the default: the key can do everything the API allows. A Read-only key (read) reads like a viewer and changes nothing. A Write-only key (write) creates and updates leads, notes and custom attributes, and gets back only the id and the outcome of each write. Expiry is Never by default, or 30, 90 or 365 days. An expired key stays in the list until you revoke it, and it no longer authorizes any request.
Security
Section titled “Security”- Store your key in an environment variable; never hardcode it in source code.
- Revoke compromised keys immediately from the dashboard. Any other keys you’ve created will continue working. A revoked key is deleted; only its name and dates are kept.
- To isolate your integrations, create one key per integration with the access it needs, and revoke them independently.
Revocation takes effect on the next request whose credential check starts after the
revocation commits, for both the REST API and classic /mcp requests. Revoked,
disabled or expired keys receive HTTP 401. If MCP cannot verify the credential
within two seconds, it refuses the request with HTTP 503; retry later. A request
already refused by a local rate limit may continue returning 429 without access.