Account API reference
Use account statistics to track your lead database and API keys to connect your automations. API key management requires the owner or an admin.
Export your account
Section titled “Export your account”GET /account/export returns your whole account as one JSON file, for a backup or to move your data elsewhere. Only the account owner can run it. The file contains:
scoring_rules: your scoring rules.webhooks: each webhook’s URL, events and whether it is active. Signing secrets are never exported.members: the email, role and status of each member and pending invitation.leads: every lead with its customattributesandnotes, as in the JSON lead export.lead_changes: the history of your current leads, as returned byGET /leads/{id}/changes.
curl -o klozeo-account.json \ "https://api.klozeo.com/api/v1/account/export" \ -H "X-API-Key: sk_live_your_key"The file is streamed, so even a large account starts downloading right away. If the export fails after it has started, the download is interrupted rather than ending in a file that looks complete: run it again. The history of leads you have deleted is not included.
Endpoint reference
Section titled “Endpoint reference”Paths include the /api/v1 prefix. Schema fields marked required must be present; other fields may be omitted. Nullable values are shown explicitly.
| Method | Path | Description |
|---|---|---|
| GET | /api/v1/account/export |
Export account |
| GET | /api/v1/api-keys |
List API keys |
| POST | /api/v1/api-keys |
Create API key disabled |
| DELETE | /api/v1/api-keys/{id} |
Delete API key |
| GET | /api/v1/stats |
Get stats |
GET /api/v1/account/export
Section titled “GET /api/v1/account/export”Owner only. One JSON document for portability or handover: scoring rules, webhooks (URL, events, active; never the signing secret), members and pending invitations (email, role, status), every lead with its attributes and notes, and the audit trail of current leads. The response is streamed: a failure after the first 64 KiB breaks the transfer instead of returning a status.
Accepted authentication: ApiKey or BearerKey.
| Status | Description | Content type / schema | Headers |
|---|---|---|---|
| 200 | Success | application/json: AccountExport |
X-RateLimit-Limit: {"type":"integer"} Request budget of the binding limit named by X-RateLimit-Scope. Window: 10 minutes. Per credential: Free 250, Pro 2500, Scale 5000. Per account: Free 2500, Pro 62500, Scale 250000, or more when the account keeps more keys and assistant connections than its plan allows.; X-RateLimit-Remaining: {"type":"integer"} Remaining requests in the current window.; X-RateLimit-Reset: {"type":"integer"} Window reset, Unix seconds.; X-RateLimit-Scope: {"type":"string","enum":["credential","account"]} Which limit the other X-RateLimit-* headers describe: credential (the API key, assistant connection or dashboard session) or account. Present with the other X-RateLimit-* headers. |
| 400 | Request rejected. | application/json: Error400 |
X-RateLimit-Limit: {"type":"integer"} Request budget of the binding limit named by X-RateLimit-Scope. Window: 10 minutes. Per credential: Free 250, Pro 2500, Scale 5000. Per account: Free 2500, Pro 62500, Scale 250000, or more when the account keeps more keys and assistant connections than its plan allows.; X-RateLimit-Remaining: {"type":"integer"} Remaining requests in the current window.; X-RateLimit-Reset: {"type":"integer"} Window reset, Unix seconds.; X-RateLimit-Scope: {"type":"string","enum":["credential","account"]} Which limit the other X-RateLimit-* headers describe: credential (the API key, assistant connection or dashboard session) or account. Present with the other X-RateLimit-* headers. |
| 401 | Invalid or missing credentials. | application/json: Error401 |
X-RateLimit-Limit: {"type":"integer"} Request budget of the binding limit named by X-RateLimit-Scope. Window: 10 minutes. Per credential: Free 250, Pro 2500, Scale 5000. Per account: Free 2500, Pro 62500, Scale 250000, or more when the account keeps more keys and assistant connections than its plan allows.; X-RateLimit-Remaining: {"type":"integer"} Remaining requests in the current window.; X-RateLimit-Reset: {"type":"integer"} Window reset, Unix seconds.; X-RateLimit-Scope: {"type":"string","enum":["credential","account"]} Which limit the other X-RateLimit-* headers describe: credential (the API key, assistant connection or dashboard session) or account. Present with the other X-RateLimit-* headers. |
| 403 | Permission denied. Create lead also returns leads_limit_reached when the storage quota is reached. lead_access_required: an admin without lead access from the workspace owner, on the dashboard or an assistant connection. That admin can still manage API keys, webhooks and scoring rules. API keys never get it. workspace_read_only: the workspace is read-only because its owner owns another Free workspace ranked before it (their first workspace, otherwise the oldest), and only one Free workspace per owner stays editable. Editing resumes when this workspace moves to Pro or Scale, or when its owner no longer owns any Free workspace ranked before it. Every change to leads, scoring rules and the status list is refused, from an API key, the dashboard or an assistant connection. Reading, export, members, API keys, webhooks and assistant connections still work. | application/json: Error403 |
X-RateLimit-Limit: {"type":"integer"} Request budget of the binding limit named by X-RateLimit-Scope. Window: 10 minutes. Per credential: Free 250, Pro 2500, Scale 5000. Per account: Free 2500, Pro 62500, Scale 250000, or more when the account keeps more keys and assistant connections than its plan allows.; X-RateLimit-Remaining: {"type":"integer"} Remaining requests in the current window.; X-RateLimit-Reset: {"type":"integer"} Window reset, Unix seconds.; X-RateLimit-Scope: {"type":"string","enum":["credential","account"]} Which limit the other X-RateLimit-* headers describe: credential (the API key, assistant connection or dashboard session) or account. Present with the other X-RateLimit-* headers.; WWW-Authenticate: {"type":"string"} Present for MCP insufficient_scope. |
| 413 | Body exceeds 1 MiB (10 MiB for /leads/batch). | application/json: Error413 |
X-RateLimit-Limit: {"type":"integer"} Request budget of the binding limit named by X-RateLimit-Scope. Window: 10 minutes. Per credential: Free 250, Pro 2500, Scale 5000. Per account: Free 2500, Pro 62500, Scale 250000, or more when the account keeps more keys and assistant connections than its plan allows.; X-RateLimit-Remaining: {"type":"integer"} Remaining requests in the current window.; X-RateLimit-Reset: {"type":"integer"} Window reset, Unix seconds.; X-RateLimit-Scope: {"type":"string","enum":["credential","account"]} Which limit the other X-RateLimit-* headers describe: credential (the API key, assistant connection or dashboard session) or account. Present with the other X-RateLimit-* headers. |
| 429 | Rate limit exceeded. Retry-After is always present. Quota exhaustion (computed or cached) includes all four X-RateLimit-* headers. The earlier per-key admission-work refusal can omit those quota headers. | application/json: Error429 |
X-RateLimit-Limit: {"type":"integer"} Request budget of the binding limit named by X-RateLimit-Scope. Window: 10 minutes. Per credential: Free 250, Pro 2500, Scale 5000. Per account: Free 2500, Pro 62500, Scale 250000, or more when the account keeps more keys and assistant connections than its plan allows. Present on computed/cached quota exhaustion; may be absent on earlier admission-work refusal.; X-RateLimit-Remaining: {"type":"integer"} Remaining requests in the current window. Present on computed/cached quota exhaustion; may be absent on earlier admission-work refusal.; X-RateLimit-Reset: {"type":"integer"} Window reset, Unix seconds. Present on computed/cached quota exhaustion; may be absent on earlier admission-work refusal.; X-RateLimit-Scope: {"type":"string","enum":["credential","account"]} Which limit the other X-RateLimit-* headers describe: credential (the API key, assistant connection or dashboard session) or account. Present with the other X-RateLimit-* headers.; Retry-After: {"type":"integer"} Seconds until retry. Early admission refusals may omit the quota headers. |
| 500 | Internal error. | application/json: Error500 |
X-RateLimit-Limit: {"type":"integer"} Request budget of the binding limit named by X-RateLimit-Scope. Window: 10 minutes. Per credential: Free 250, Pro 2500, Scale 5000. Per account: Free 2500, Pro 62500, Scale 250000, or more when the account keeps more keys and assistant connections than its plan allows.; X-RateLimit-Remaining: {"type":"integer"} Remaining requests in the current window.; X-RateLimit-Reset: {"type":"integer"} Window reset, Unix seconds.; X-RateLimit-Scope: {"type":"string","enum":["credential","account"]} Which limit the other X-RateLimit-* headers describe: credential (the API key, assistant connection or dashboard session) or account. Present with the other X-RateLimit-* headers. |
| 503 | Authentication unavailable. | application/json: Error503 |
X-RateLimit-Limit: {"type":"integer"} Request budget of the binding limit named by X-RateLimit-Scope. Window: 10 minutes. Per credential: Free 250, Pro 2500, Scale 5000. Per account: Free 2500, Pro 62500, Scale 250000, or more when the account keeps more keys and assistant connections than its plan allows.; X-RateLimit-Remaining: {"type":"integer"} Remaining requests in the current window.; X-RateLimit-Reset: {"type":"integer"} Window reset, Unix seconds.; X-RateLimit-Scope: {"type":"string","enum":["credential","account"]} Which limit the other X-RateLimit-* headers describe: credential (the API key, assistant connection or dashboard session) or account. Present with the other X-RateLimit-* headers. |
GET /api/v1/api-keys
Section titled “GET /api/v1/api-keys”List API keys
Accepted authentication: ApiKey or BearerKey.
| Status | Description | Content type / schema | Headers |
|---|---|---|---|
| 200 | Success | application/json: Keys |
X-RateLimit-Limit: {"type":"integer"} Request budget of the binding limit named by X-RateLimit-Scope. Window: 10 minutes. Per credential: Free 250, Pro 2500, Scale 5000. Per account: Free 2500, Pro 62500, Scale 250000, or more when the account keeps more keys and assistant connections than its plan allows.; X-RateLimit-Remaining: {"type":"integer"} Remaining requests in the current window.; X-RateLimit-Reset: {"type":"integer"} Window reset, Unix seconds.; X-RateLimit-Scope: {"type":"string","enum":["credential","account"]} Which limit the other X-RateLimit-* headers describe: credential (the API key, assistant connection or dashboard session) or account. Present with the other X-RateLimit-* headers. |
| 400 | Request rejected. | application/json: Error400 |
X-RateLimit-Limit: {"type":"integer"} Request budget of the binding limit named by X-RateLimit-Scope. Window: 10 minutes. Per credential: Free 250, Pro 2500, Scale 5000. Per account: Free 2500, Pro 62500, Scale 250000, or more when the account keeps more keys and assistant connections than its plan allows.; X-RateLimit-Remaining: {"type":"integer"} Remaining requests in the current window.; X-RateLimit-Reset: {"type":"integer"} Window reset, Unix seconds.; X-RateLimit-Scope: {"type":"string","enum":["credential","account"]} Which limit the other X-RateLimit-* headers describe: credential (the API key, assistant connection or dashboard session) or account. Present with the other X-RateLimit-* headers. |
| 401 | Invalid or missing credentials. | application/json: Error401 |
X-RateLimit-Limit: {"type":"integer"} Request budget of the binding limit named by X-RateLimit-Scope. Window: 10 minutes. Per credential: Free 250, Pro 2500, Scale 5000. Per account: Free 2500, Pro 62500, Scale 250000, or more when the account keeps more keys and assistant connections than its plan allows.; X-RateLimit-Remaining: {"type":"integer"} Remaining requests in the current window.; X-RateLimit-Reset: {"type":"integer"} Window reset, Unix seconds.; X-RateLimit-Scope: {"type":"string","enum":["credential","account"]} Which limit the other X-RateLimit-* headers describe: credential (the API key, assistant connection or dashboard session) or account. Present with the other X-RateLimit-* headers. |
| 403 | Permission denied. Create lead also returns leads_limit_reached when the storage quota is reached. lead_access_required: an admin without lead access from the workspace owner, on the dashboard or an assistant connection. That admin can still manage API keys, webhooks and scoring rules. API keys never get it. workspace_read_only: the workspace is read-only because its owner owns another Free workspace ranked before it (their first workspace, otherwise the oldest), and only one Free workspace per owner stays editable. Editing resumes when this workspace moves to Pro or Scale, or when its owner no longer owns any Free workspace ranked before it. Every change to leads, scoring rules and the status list is refused, from an API key, the dashboard or an assistant connection. Reading, export, members, API keys, webhooks and assistant connections still work. | application/json: Error403 |
X-RateLimit-Limit: {"type":"integer"} Request budget of the binding limit named by X-RateLimit-Scope. Window: 10 minutes. Per credential: Free 250, Pro 2500, Scale 5000. Per account: Free 2500, Pro 62500, Scale 250000, or more when the account keeps more keys and assistant connections than its plan allows.; X-RateLimit-Remaining: {"type":"integer"} Remaining requests in the current window.; X-RateLimit-Reset: {"type":"integer"} Window reset, Unix seconds.; X-RateLimit-Scope: {"type":"string","enum":["credential","account"]} Which limit the other X-RateLimit-* headers describe: credential (the API key, assistant connection or dashboard session) or account. Present with the other X-RateLimit-* headers.; WWW-Authenticate: {"type":"string"} Present for MCP insufficient_scope. |
| 413 | Body exceeds 1 MiB (10 MiB for /leads/batch). | application/json: Error413 |
X-RateLimit-Limit: {"type":"integer"} Request budget of the binding limit named by X-RateLimit-Scope. Window: 10 minutes. Per credential: Free 250, Pro 2500, Scale 5000. Per account: Free 2500, Pro 62500, Scale 250000, or more when the account keeps more keys and assistant connections than its plan allows.; X-RateLimit-Remaining: {"type":"integer"} Remaining requests in the current window.; X-RateLimit-Reset: {"type":"integer"} Window reset, Unix seconds.; X-RateLimit-Scope: {"type":"string","enum":["credential","account"]} Which limit the other X-RateLimit-* headers describe: credential (the API key, assistant connection or dashboard session) or account. Present with the other X-RateLimit-* headers. |
| 429 | Rate limit exceeded. Retry-After is always present. Quota exhaustion (computed or cached) includes all four X-RateLimit-* headers. The earlier per-key admission-work refusal can omit those quota headers. | application/json: Error429 |
X-RateLimit-Limit: {"type":"integer"} Request budget of the binding limit named by X-RateLimit-Scope. Window: 10 minutes. Per credential: Free 250, Pro 2500, Scale 5000. Per account: Free 2500, Pro 62500, Scale 250000, or more when the account keeps more keys and assistant connections than its plan allows. Present on computed/cached quota exhaustion; may be absent on earlier admission-work refusal.; X-RateLimit-Remaining: {"type":"integer"} Remaining requests in the current window. Present on computed/cached quota exhaustion; may be absent on earlier admission-work refusal.; X-RateLimit-Reset: {"type":"integer"} Window reset, Unix seconds. Present on computed/cached quota exhaustion; may be absent on earlier admission-work refusal.; X-RateLimit-Scope: {"type":"string","enum":["credential","account"]} Which limit the other X-RateLimit-* headers describe: credential (the API key, assistant connection or dashboard session) or account. Present with the other X-RateLimit-* headers.; Retry-After: {"type":"integer"} Seconds until retry. Early admission refusals may omit the quota headers. |
| 500 | Internal error. | application/json: Error500 |
X-RateLimit-Limit: {"type":"integer"} Request budget of the binding limit named by X-RateLimit-Scope. Window: 10 minutes. Per credential: Free 250, Pro 2500, Scale 5000. Per account: Free 2500, Pro 62500, Scale 250000, or more when the account keeps more keys and assistant connections than its plan allows.; X-RateLimit-Remaining: {"type":"integer"} Remaining requests in the current window.; X-RateLimit-Reset: {"type":"integer"} Window reset, Unix seconds.; X-RateLimit-Scope: {"type":"string","enum":["credential","account"]} Which limit the other X-RateLimit-* headers describe: credential (the API key, assistant connection or dashboard session) or account. Present with the other X-RateLimit-* headers. |
| 503 | Authentication unavailable. | application/json: Error503 |
X-RateLimit-Limit: {"type":"integer"} Request budget of the binding limit named by X-RateLimit-Scope. Window: 10 minutes. Per credential: Free 250, Pro 2500, Scale 5000. Per account: Free 2500, Pro 62500, Scale 250000, or more when the account keeps more keys and assistant connections than its plan allows.; X-RateLimit-Remaining: {"type":"integer"} Remaining requests in the current window.; X-RateLimit-Reset: {"type":"integer"} Window reset, Unix seconds.; X-RateLimit-Scope: {"type":"string","enum":["credential","account"]} Which limit the other X-RateLimit-* headers describe: credential (the API key, assistant connection or dashboard session) or account. Present with the other X-RateLimit-* headers. |
POST /api/v1/api-keys
Section titled “POST /api/v1/api-keys”Create API key disabled
Accepted authentication: ApiKey or BearerKey.
| Status | Description | Content type / schema | Headers |
|---|---|---|---|
| 400 | Request rejected. | application/json: Error400 |
X-RateLimit-Limit: {"type":"integer"} Request budget of the binding limit named by X-RateLimit-Scope. Window: 10 minutes. Per credential: Free 250, Pro 2500, Scale 5000. Per account: Free 2500, Pro 62500, Scale 250000, or more when the account keeps more keys and assistant connections than its plan allows.; X-RateLimit-Remaining: {"type":"integer"} Remaining requests in the current window.; X-RateLimit-Reset: {"type":"integer"} Window reset, Unix seconds.; X-RateLimit-Scope: {"type":"string","enum":["credential","account"]} Which limit the other X-RateLimit-* headers describe: credential (the API key, assistant connection or dashboard session) or account. Present with the other X-RateLimit-* headers. |
| 401 | Invalid or missing credentials. | application/json: Error401 |
X-RateLimit-Limit: {"type":"integer"} Request budget of the binding limit named by X-RateLimit-Scope. Window: 10 minutes. Per credential: Free 250, Pro 2500, Scale 5000. Per account: Free 2500, Pro 62500, Scale 250000, or more when the account keeps more keys and assistant connections than its plan allows.; X-RateLimit-Remaining: {"type":"integer"} Remaining requests in the current window.; X-RateLimit-Reset: {"type":"integer"} Window reset, Unix seconds.; X-RateLimit-Scope: {"type":"string","enum":["credential","account"]} Which limit the other X-RateLimit-* headers describe: credential (the API key, assistant connection or dashboard session) or account. Present with the other X-RateLimit-* headers. |
| 403 | Permission denied. Create lead also returns leads_limit_reached when the storage quota is reached. lead_access_required: an admin without lead access from the workspace owner, on the dashboard or an assistant connection. That admin can still manage API keys, webhooks and scoring rules. API keys never get it. workspace_read_only: the workspace is read-only because its owner owns another Free workspace ranked before it (their first workspace, otherwise the oldest), and only one Free workspace per owner stays editable. Editing resumes when this workspace moves to Pro or Scale, or when its owner no longer owns any Free workspace ranked before it. Every change to leads, scoring rules and the status list is refused, from an API key, the dashboard or an assistant connection. Reading, export, members, API keys, webhooks and assistant connections still work. | application/json: Error403 |
X-RateLimit-Limit: {"type":"integer"} Request budget of the binding limit named by X-RateLimit-Scope. Window: 10 minutes. Per credential: Free 250, Pro 2500, Scale 5000. Per account: Free 2500, Pro 62500, Scale 250000, or more when the account keeps more keys and assistant connections than its plan allows.; X-RateLimit-Remaining: {"type":"integer"} Remaining requests in the current window.; X-RateLimit-Reset: {"type":"integer"} Window reset, Unix seconds.; X-RateLimit-Scope: {"type":"string","enum":["credential","account"]} Which limit the other X-RateLimit-* headers describe: credential (the API key, assistant connection or dashboard session) or account. Present with the other X-RateLimit-* headers.; WWW-Authenticate: {"type":"string"} Present for MCP insufficient_scope. |
| 405 | Request rejected. | application/json: Error405 |
X-RateLimit-Limit: {"type":"integer"} Request budget of the binding limit named by X-RateLimit-Scope. Window: 10 minutes. Per credential: Free 250, Pro 2500, Scale 5000. Per account: Free 2500, Pro 62500, Scale 250000, or more when the account keeps more keys and assistant connections than its plan allows.; X-RateLimit-Remaining: {"type":"integer"} Remaining requests in the current window.; X-RateLimit-Reset: {"type":"integer"} Window reset, Unix seconds.; X-RateLimit-Scope: {"type":"string","enum":["credential","account"]} Which limit the other X-RateLimit-* headers describe: credential (the API key, assistant connection or dashboard session) or account. Present with the other X-RateLimit-* headers. |
| 413 | Body exceeds 1 MiB (10 MiB for /leads/batch). | application/json: Error413 |
X-RateLimit-Limit: {"type":"integer"} Request budget of the binding limit named by X-RateLimit-Scope. Window: 10 minutes. Per credential: Free 250, Pro 2500, Scale 5000. Per account: Free 2500, Pro 62500, Scale 250000, or more when the account keeps more keys and assistant connections than its plan allows.; X-RateLimit-Remaining: {"type":"integer"} Remaining requests in the current window.; X-RateLimit-Reset: {"type":"integer"} Window reset, Unix seconds.; X-RateLimit-Scope: {"type":"string","enum":["credential","account"]} Which limit the other X-RateLimit-* headers describe: credential (the API key, assistant connection or dashboard session) or account. Present with the other X-RateLimit-* headers. |
| 429 | Rate limit exceeded. Retry-After is always present. Quota exhaustion (computed or cached) includes all four X-RateLimit-* headers. The earlier per-key admission-work refusal can omit those quota headers. | application/json: Error429 |
X-RateLimit-Limit: {"type":"integer"} Request budget of the binding limit named by X-RateLimit-Scope. Window: 10 minutes. Per credential: Free 250, Pro 2500, Scale 5000. Per account: Free 2500, Pro 62500, Scale 250000, or more when the account keeps more keys and assistant connections than its plan allows. Present on computed/cached quota exhaustion; may be absent on earlier admission-work refusal.; X-RateLimit-Remaining: {"type":"integer"} Remaining requests in the current window. Present on computed/cached quota exhaustion; may be absent on earlier admission-work refusal.; X-RateLimit-Reset: {"type":"integer"} Window reset, Unix seconds. Present on computed/cached quota exhaustion; may be absent on earlier admission-work refusal.; X-RateLimit-Scope: {"type":"string","enum":["credential","account"]} Which limit the other X-RateLimit-* headers describe: credential (the API key, assistant connection or dashboard session) or account. Present with the other X-RateLimit-* headers.; Retry-After: {"type":"integer"} Seconds until retry. Early admission refusals may omit the quota headers. |
| 500 | Internal error. | application/json: Error500 |
X-RateLimit-Limit: {"type":"integer"} Request budget of the binding limit named by X-RateLimit-Scope. Window: 10 minutes. Per credential: Free 250, Pro 2500, Scale 5000. Per account: Free 2500, Pro 62500, Scale 250000, or more when the account keeps more keys and assistant connections than its plan allows.; X-RateLimit-Remaining: {"type":"integer"} Remaining requests in the current window.; X-RateLimit-Reset: {"type":"integer"} Window reset, Unix seconds.; X-RateLimit-Scope: {"type":"string","enum":["credential","account"]} Which limit the other X-RateLimit-* headers describe: credential (the API key, assistant connection or dashboard session) or account. Present with the other X-RateLimit-* headers. |
| 503 | Authentication unavailable. | application/json: Error503 |
X-RateLimit-Limit: {"type":"integer"} Request budget of the binding limit named by X-RateLimit-Scope. Window: 10 minutes. Per credential: Free 250, Pro 2500, Scale 5000. Per account: Free 2500, Pro 62500, Scale 250000, or more when the account keeps more keys and assistant connections than its plan allows.; X-RateLimit-Remaining: {"type":"integer"} Remaining requests in the current window.; X-RateLimit-Reset: {"type":"integer"} Window reset, Unix seconds.; X-RateLimit-Scope: {"type":"string","enum":["credential","account"]} Which limit the other X-RateLimit-* headers describe: credential (the API key, assistant connection or dashboard session) or account. Present with the other X-RateLimit-* headers. |
DELETE /api/v1/api-keys/{id}
Section titled “DELETE /api/v1/api-keys/{id}”Delete API key
Accepted authentication: ApiKey or BearerKey.
| Parameter | In | Required | Schema | Description |
|---|---|---|---|---|
id |
path | yes | {"type":"string"} |
| Status | Description | Content type / schema | Headers |
|---|---|---|---|
| 200 | Success | application/json: Message |
X-RateLimit-Limit: {"type":"integer"} Request budget of the binding limit named by X-RateLimit-Scope. Window: 10 minutes. Per credential: Free 250, Pro 2500, Scale 5000. Per account: Free 2500, Pro 62500, Scale 250000, or more when the account keeps more keys and assistant connections than its plan allows.; X-RateLimit-Remaining: {"type":"integer"} Remaining requests in the current window.; X-RateLimit-Reset: {"type":"integer"} Window reset, Unix seconds.; X-RateLimit-Scope: {"type":"string","enum":["credential","account"]} Which limit the other X-RateLimit-* headers describe: credential (the API key, assistant connection or dashboard session) or account. Present with the other X-RateLimit-* headers. |
| 400 | Request rejected. | application/json: Error400 |
X-RateLimit-Limit: {"type":"integer"} Request budget of the binding limit named by X-RateLimit-Scope. Window: 10 minutes. Per credential: Free 250, Pro 2500, Scale 5000. Per account: Free 2500, Pro 62500, Scale 250000, or more when the account keeps more keys and assistant connections than its plan allows.; X-RateLimit-Remaining: {"type":"integer"} Remaining requests in the current window.; X-RateLimit-Reset: {"type":"integer"} Window reset, Unix seconds.; X-RateLimit-Scope: {"type":"string","enum":["credential","account"]} Which limit the other X-RateLimit-* headers describe: credential (the API key, assistant connection or dashboard session) or account. Present with the other X-RateLimit-* headers. |
| 401 | Invalid or missing credentials. | application/json: Error401 |
X-RateLimit-Limit: {"type":"integer"} Request budget of the binding limit named by X-RateLimit-Scope. Window: 10 minutes. Per credential: Free 250, Pro 2500, Scale 5000. Per account: Free 2500, Pro 62500, Scale 250000, or more when the account keeps more keys and assistant connections than its plan allows.; X-RateLimit-Remaining: {"type":"integer"} Remaining requests in the current window.; X-RateLimit-Reset: {"type":"integer"} Window reset, Unix seconds.; X-RateLimit-Scope: {"type":"string","enum":["credential","account"]} Which limit the other X-RateLimit-* headers describe: credential (the API key, assistant connection or dashboard session) or account. Present with the other X-RateLimit-* headers. |
| 403 | Permission denied. Create lead also returns leads_limit_reached when the storage quota is reached. lead_access_required: an admin without lead access from the workspace owner, on the dashboard or an assistant connection. That admin can still manage API keys, webhooks and scoring rules. API keys never get it. workspace_read_only: the workspace is read-only because its owner owns another Free workspace ranked before it (their first workspace, otherwise the oldest), and only one Free workspace per owner stays editable. Editing resumes when this workspace moves to Pro or Scale, or when its owner no longer owns any Free workspace ranked before it. Every change to leads, scoring rules and the status list is refused, from an API key, the dashboard or an assistant connection. Reading, export, members, API keys, webhooks and assistant connections still work. | application/json: Error403 |
X-RateLimit-Limit: {"type":"integer"} Request budget of the binding limit named by X-RateLimit-Scope. Window: 10 minutes. Per credential: Free 250, Pro 2500, Scale 5000. Per account: Free 2500, Pro 62500, Scale 250000, or more when the account keeps more keys and assistant connections than its plan allows.; X-RateLimit-Remaining: {"type":"integer"} Remaining requests in the current window.; X-RateLimit-Reset: {"type":"integer"} Window reset, Unix seconds.; X-RateLimit-Scope: {"type":"string","enum":["credential","account"]} Which limit the other X-RateLimit-* headers describe: credential (the API key, assistant connection or dashboard session) or account. Present with the other X-RateLimit-* headers.; WWW-Authenticate: {"type":"string"} Present for MCP insufficient_scope. |
| 404 | Request rejected. | application/json: Error404 |
X-RateLimit-Limit: {"type":"integer"} Request budget of the binding limit named by X-RateLimit-Scope. Window: 10 minutes. Per credential: Free 250, Pro 2500, Scale 5000. Per account: Free 2500, Pro 62500, Scale 250000, or more when the account keeps more keys and assistant connections than its plan allows.; X-RateLimit-Remaining: {"type":"integer"} Remaining requests in the current window.; X-RateLimit-Reset: {"type":"integer"} Window reset, Unix seconds.; X-RateLimit-Scope: {"type":"string","enum":["credential","account"]} Which limit the other X-RateLimit-* headers describe: credential (the API key, assistant connection or dashboard session) or account. Present with the other X-RateLimit-* headers. |
| 413 | Body exceeds 1 MiB (10 MiB for /leads/batch). | application/json: Error413 |
X-RateLimit-Limit: {"type":"integer"} Request budget of the binding limit named by X-RateLimit-Scope. Window: 10 minutes. Per credential: Free 250, Pro 2500, Scale 5000. Per account: Free 2500, Pro 62500, Scale 250000, or more when the account keeps more keys and assistant connections than its plan allows.; X-RateLimit-Remaining: {"type":"integer"} Remaining requests in the current window.; X-RateLimit-Reset: {"type":"integer"} Window reset, Unix seconds.; X-RateLimit-Scope: {"type":"string","enum":["credential","account"]} Which limit the other X-RateLimit-* headers describe: credential (the API key, assistant connection or dashboard session) or account. Present with the other X-RateLimit-* headers. |
| 429 | Rate limit exceeded. Retry-After is always present. Quota exhaustion (computed or cached) includes all four X-RateLimit-* headers. The earlier per-key admission-work refusal can omit those quota headers. | application/json: Error429 |
X-RateLimit-Limit: {"type":"integer"} Request budget of the binding limit named by X-RateLimit-Scope. Window: 10 minutes. Per credential: Free 250, Pro 2500, Scale 5000. Per account: Free 2500, Pro 62500, Scale 250000, or more when the account keeps more keys and assistant connections than its plan allows. Present on computed/cached quota exhaustion; may be absent on earlier admission-work refusal.; X-RateLimit-Remaining: {"type":"integer"} Remaining requests in the current window. Present on computed/cached quota exhaustion; may be absent on earlier admission-work refusal.; X-RateLimit-Reset: {"type":"integer"} Window reset, Unix seconds. Present on computed/cached quota exhaustion; may be absent on earlier admission-work refusal.; X-RateLimit-Scope: {"type":"string","enum":["credential","account"]} Which limit the other X-RateLimit-* headers describe: credential (the API key, assistant connection or dashboard session) or account. Present with the other X-RateLimit-* headers.; Retry-After: {"type":"integer"} Seconds until retry. Early admission refusals may omit the quota headers. |
| 500 | Internal error. | application/json: Error500 |
X-RateLimit-Limit: {"type":"integer"} Request budget of the binding limit named by X-RateLimit-Scope. Window: 10 minutes. Per credential: Free 250, Pro 2500, Scale 5000. Per account: Free 2500, Pro 62500, Scale 250000, or more when the account keeps more keys and assistant connections than its plan allows.; X-RateLimit-Remaining: {"type":"integer"} Remaining requests in the current window.; X-RateLimit-Reset: {"type":"integer"} Window reset, Unix seconds.; X-RateLimit-Scope: {"type":"string","enum":["credential","account"]} Which limit the other X-RateLimit-* headers describe: credential (the API key, assistant connection or dashboard session) or account. Present with the other X-RateLimit-* headers. |
| 503 | Authentication unavailable. | application/json: Error503 |
X-RateLimit-Limit: {"type":"integer"} Request budget of the binding limit named by X-RateLimit-Scope. Window: 10 minutes. Per credential: Free 250, Pro 2500, Scale 5000. Per account: Free 2500, Pro 62500, Scale 250000, or more when the account keeps more keys and assistant connections than its plan allows.; X-RateLimit-Remaining: {"type":"integer"} Remaining requests in the current window.; X-RateLimit-Reset: {"type":"integer"} Window reset, Unix seconds.; X-RateLimit-Scope: {"type":"string","enum":["credential","account"]} Which limit the other X-RateLimit-* headers describe: credential (the API key, assistant connection or dashboard session) or account. Present with the other X-RateLimit-* headers. |
GET /api/v1/stats
Section titled “GET /api/v1/stats”Get stats
Accepted authentication: ApiKey or BearerKey.
| Status | Description | Content type / schema | Headers |
|---|---|---|---|
| 200 | Success | application/json: LeadStats |
X-RateLimit-Limit: {"type":"integer"} Request budget of the binding limit named by X-RateLimit-Scope. Window: 10 minutes. Per credential: Free 250, Pro 2500, Scale 5000. Per account: Free 2500, Pro 62500, Scale 250000, or more when the account keeps more keys and assistant connections than its plan allows.; X-RateLimit-Remaining: {"type":"integer"} Remaining requests in the current window.; X-RateLimit-Reset: {"type":"integer"} Window reset, Unix seconds.; X-RateLimit-Scope: {"type":"string","enum":["credential","account"]} Which limit the other X-RateLimit-* headers describe: credential (the API key, assistant connection or dashboard session) or account. Present with the other X-RateLimit-* headers. |
| 400 | Request rejected. | application/json: Error400 |
X-RateLimit-Limit: {"type":"integer"} Request budget of the binding limit named by X-RateLimit-Scope. Window: 10 minutes. Per credential: Free 250, Pro 2500, Scale 5000. Per account: Free 2500, Pro 62500, Scale 250000, or more when the account keeps more keys and assistant connections than its plan allows.; X-RateLimit-Remaining: {"type":"integer"} Remaining requests in the current window.; X-RateLimit-Reset: {"type":"integer"} Window reset, Unix seconds.; X-RateLimit-Scope: {"type":"string","enum":["credential","account"]} Which limit the other X-RateLimit-* headers describe: credential (the API key, assistant connection or dashboard session) or account. Present with the other X-RateLimit-* headers. |
| 401 | Invalid or missing credentials. | application/json: Error401 |
X-RateLimit-Limit: {"type":"integer"} Request budget of the binding limit named by X-RateLimit-Scope. Window: 10 minutes. Per credential: Free 250, Pro 2500, Scale 5000. Per account: Free 2500, Pro 62500, Scale 250000, or more when the account keeps more keys and assistant connections than its plan allows.; X-RateLimit-Remaining: {"type":"integer"} Remaining requests in the current window.; X-RateLimit-Reset: {"type":"integer"} Window reset, Unix seconds.; X-RateLimit-Scope: {"type":"string","enum":["credential","account"]} Which limit the other X-RateLimit-* headers describe: credential (the API key, assistant connection or dashboard session) or account. Present with the other X-RateLimit-* headers. |
| 403 | Permission denied. Create lead also returns leads_limit_reached when the storage quota is reached. lead_access_required: an admin without lead access from the workspace owner, on the dashboard or an assistant connection. That admin can still manage API keys, webhooks and scoring rules. API keys never get it. workspace_read_only: the workspace is read-only because its owner owns another Free workspace ranked before it (their first workspace, otherwise the oldest), and only one Free workspace per owner stays editable. Editing resumes when this workspace moves to Pro or Scale, or when its owner no longer owns any Free workspace ranked before it. Every change to leads, scoring rules and the status list is refused, from an API key, the dashboard or an assistant connection. Reading, export, members, API keys, webhooks and assistant connections still work. | application/json: Error403 |
X-RateLimit-Limit: {"type":"integer"} Request budget of the binding limit named by X-RateLimit-Scope. Window: 10 minutes. Per credential: Free 250, Pro 2500, Scale 5000. Per account: Free 2500, Pro 62500, Scale 250000, or more when the account keeps more keys and assistant connections than its plan allows.; X-RateLimit-Remaining: {"type":"integer"} Remaining requests in the current window.; X-RateLimit-Reset: {"type":"integer"} Window reset, Unix seconds.; X-RateLimit-Scope: {"type":"string","enum":["credential","account"]} Which limit the other X-RateLimit-* headers describe: credential (the API key, assistant connection or dashboard session) or account. Present with the other X-RateLimit-* headers.; WWW-Authenticate: {"type":"string"} Present for MCP insufficient_scope. |
| 413 | Body exceeds 1 MiB (10 MiB for /leads/batch). | application/json: Error413 |
X-RateLimit-Limit: {"type":"integer"} Request budget of the binding limit named by X-RateLimit-Scope. Window: 10 minutes. Per credential: Free 250, Pro 2500, Scale 5000. Per account: Free 2500, Pro 62500, Scale 250000, or more when the account keeps more keys and assistant connections than its plan allows.; X-RateLimit-Remaining: {"type":"integer"} Remaining requests in the current window.; X-RateLimit-Reset: {"type":"integer"} Window reset, Unix seconds.; X-RateLimit-Scope: {"type":"string","enum":["credential","account"]} Which limit the other X-RateLimit-* headers describe: credential (the API key, assistant connection or dashboard session) or account. Present with the other X-RateLimit-* headers. |
| 429 | Rate limit exceeded. Retry-After is always present. Quota exhaustion (computed or cached) includes all four X-RateLimit-* headers. The earlier per-key admission-work refusal can omit those quota headers. | application/json: Error429 |
X-RateLimit-Limit: {"type":"integer"} Request budget of the binding limit named by X-RateLimit-Scope. Window: 10 minutes. Per credential: Free 250, Pro 2500, Scale 5000. Per account: Free 2500, Pro 62500, Scale 250000, or more when the account keeps more keys and assistant connections than its plan allows. Present on computed/cached quota exhaustion; may be absent on earlier admission-work refusal.; X-RateLimit-Remaining: {"type":"integer"} Remaining requests in the current window. Present on computed/cached quota exhaustion; may be absent on earlier admission-work refusal.; X-RateLimit-Reset: {"type":"integer"} Window reset, Unix seconds. Present on computed/cached quota exhaustion; may be absent on earlier admission-work refusal.; X-RateLimit-Scope: {"type":"string","enum":["credential","account"]} Which limit the other X-RateLimit-* headers describe: credential (the API key, assistant connection or dashboard session) or account. Present with the other X-RateLimit-* headers.; Retry-After: {"type":"integer"} Seconds until retry. Early admission refusals may omit the quota headers. |
| 500 | Internal error. | application/json: Error500 |
X-RateLimit-Limit: {"type":"integer"} Request budget of the binding limit named by X-RateLimit-Scope. Window: 10 minutes. Per credential: Free 250, Pro 2500, Scale 5000. Per account: Free 2500, Pro 62500, Scale 250000, or more when the account keeps more keys and assistant connections than its plan allows.; X-RateLimit-Remaining: {"type":"integer"} Remaining requests in the current window.; X-RateLimit-Reset: {"type":"integer"} Window reset, Unix seconds.; X-RateLimit-Scope: {"type":"string","enum":["credential","account"]} Which limit the other X-RateLimit-* headers describe: credential (the API key, assistant connection or dashboard session) or account. Present with the other X-RateLimit-* headers. |
| 503 | Authentication unavailable. | application/json: Error503 |
X-RateLimit-Limit: {"type":"integer"} Request budget of the binding limit named by X-RateLimit-Scope. Window: 10 minutes. Per credential: Free 250, Pro 2500, Scale 5000. Per account: Free 2500, Pro 62500, Scale 250000, or more when the account keeps more keys and assistant connections than its plan allows.; X-RateLimit-Remaining: {"type":"integer"} Remaining requests in the current window.; X-RateLimit-Reset: {"type":"integer"} Window reset, Unix seconds.; X-RateLimit-Scope: {"type":"string","enum":["credential","account"]} Which limit the other X-RateLimit-* headers describe: credential (the API key, assistant connection or dashboard session) or account. Present with the other X-RateLimit-* headers. |
Schemas and errors
Section titled “Schemas and errors”Schema names in the endpoint tables refer to the definitions below. oneOf means exactly one alternative; anyOf means at least one. Error alternatives list the exact error and code values.
APIKey
Section titled “APIKey”{"type":"object","additionalProperties":false}
| Field | Required | Schema |
|---|---|---|
id |
yes | {"type":"string"} |
key |
yes | {"type":"string"} |
name |
yes | {"type":"string"} |
created_at |
yes | {"type":"integer"} |
scope |
yes | {"type":"string","enum":["full","read","write"],"description":"What the key may do. full: every action of the account owner through the API. read: read only, like a viewer member. write: create and update leads (single and batch), notes and custom attribute values only; every read, list, export, delete and configuration endpoint answers 403, and each response carries the id and outcome of the write, never a stored value."} |
expires_at |
yes | {"type":["integer","null"],"description":"When the key stops working, Unix seconds; null when it never expires."} |
created_by |
yes | {"type":["string","null"],"description":"User ID of the person who created the key; null once that person's account is deleted."} |
AccountExport
Section titled “AccountExport”{"type":"object","additionalProperties":false}
| Field | Required | Schema |
|---|---|---|
exported_at |
yes | {"type":"integer"} |
scoring_rules |
yes | {"type":"array","items":{"$ref":"#/components/schemas/ScoringRule"}} |
webhooks |
yes | {"type":"array","items":{"$ref":"#/components/schemas/WebhookResponse"}} |
members |
yes | {"type":"array","items":{"$ref":"#/components/schemas/AccountMember"}} |
leads |
yes | {"type":"array","items":{"$ref":"#/components/schemas/Lead"}} |
lead_changes |
yes | {"type":"array","items":{"$ref":"#/components/schemas/LeadChange"}} |
signup_first_touch |
yes | {"anyOf":[{"$ref":"#/components/schemas/SignupFirstTouch"},{"type":"null"}]} |
statuses |
no | {"type":"array","items":{"$ref":"#/components/schemas/LeadStatus"}} |
AccountMember
Section titled “AccountMember”{"type":"object","additionalProperties":false}
| Field | Required | Schema |
|---|---|---|
email |
yes | {"type":"string"} |
role |
yes | {"type":"string","description":"The member role: admin, editor or viewer. New roles may be added.","examples":["admin","editor","viewer"]} |
status |
yes | {"type":"string","examples":["active","pending"]} |
created_at |
yes | {"type":"integer"} |
Attribute
Section titled “Attribute”{"type":"object","additionalProperties":false}
| Field | Required | Schema |
|---|---|---|
id |
no | {"type":"string"} |
name |
yes | {"type":"string"} |
type |
yes | {"type":"string"} |
value |
yes | {} |
Error400
Section titled “Error400”{"oneOf":[{"type":"object","properties":{"error":{"const":"bad_request"},"code":{"const":"bad_request"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false},{"type":"object","properties":{"error":{"const":"invalid_scoring_expression"},"code":{"const":"invalid_scoring_expression"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false},{"type":"object","properties":{"error":{"const":"scoring_rules_limit_reached"},"code":{"const":"scoring_rules_limit_reached"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false},{"type":"object","properties":{"error":{"const":"assignee_not_member"},"code":{"const":"assignee_not_member"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}]}
Error401
Section titled “Error401”{"oneOf":[{"type":"object","properties":{"error":{"const":"unauthorized"},"code":{"const":"unauthorized"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false},{"type":"object","properties":{"error":{"const":"invalid_token"},"code":{"const":"invalid_token"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}]}
Error403
Section titled “Error403”{"oneOf":[{"type":"object","properties":{"error":{"const":"forbidden"},"code":{"const":"forbidden"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false},{"type":"object","properties":{"error":{"const":"insufficient_scope"},"code":{"const":"insufficient_scope"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false},{"type":"object","properties":{"error":{"const":"leads_limit_reached"},"code":{"const":"leads_limit_reached"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false},{"type":"object","properties":{"error":{"const":"lead_access_required"},"code":{"const":"lead_access_required"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false},{"type":"object","properties":{"error":{"const":"workspace_read_only"},"code":{"const":"workspace_read_only"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}]}
Error404
Section titled “Error404”{"oneOf":[{"type":"object","properties":{"error":{"const":"not_found"},"code":{"const":"not_found"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}]}
Error405
Section titled “Error405”{"oneOf":[{"type":"object","properties":{"error":{"const":"method_not_allowed"},"code":{"const":"method_not_allowed"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}]}
Error413
Section titled “Error413”{"oneOf":[{"type":"object","properties":{"error":{"const":"payload_too_large"},"code":{"const":"payload_too_large"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}]}
Error429
Section titled “Error429”{"oneOf":[{"type":"object","properties":{"error":{"const":"rate_limit_exceeded"},"code":{"const":"rate_limit_exceeded"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}]}
Error500
Section titled “Error500”{"oneOf":[{"type":"object","properties":{"error":{"const":"internal_error"},"code":{"const":"internal_error"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}]}
Error503
Section titled “Error503”{"oneOf":[{"type":"object","properties":{"error":{"const":"internal_error"},"code":{"const":"internal_error"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}]}
{"type":"object","additionalProperties":false}
| Field | Required | Schema |
|---|---|---|
keys |
yes | {"type":["array","null"],"items":{"$ref":"#/components/schemas/APIKey"}} |
{"type":"object","additionalProperties":false}
| Field | Required | Schema |
|---|---|---|
id |
yes | {"type":"string"} |
name |
yes | {"type":"string"} |
source |
yes | {"type":"string"} |
description |
no | {"type":"string"} |
address |
no | {"type":"string"} |
city |
no | {"type":"string"} |
state |
no | {"type":"string"} |
country |
no | {"type":"string"} |
postal_code |
no | {"type":"string"} |
latitude |
no | {"type":"number"} |
longitude |
no | {"type":"number"} |
phone |
no | {"type":"string"} |
email |
no | {"type":"string"} |
website |
no | {"type":"string"} |
rating |
no | {"type":"number"} |
review_count |
no | {"type":"integer"} |
category |
no | {"type":"string"} |
tags |
no | {"type":["array","null"],"items":{"type":"string"}} |
source_id |
no | {"type":"string"} |
siren |
no | {"type":"string"} |
logo_url |
no | {"type":"string"} |
status |
no | {"type":"string","description":"The lead's status value, up to 50 characters. Exports and webhooks carry this value, not the dashboard label."} |
assignee |
no | {"type":["string","null"],"description":"Email of the workspace owner or a member the lead is assigned to, or null."} |
attributes |
no | {"type":["array","null"],"items":{"$ref":"#/components/schemas/Attribute"}} |
notes |
no | {"type":["array","null"],"items":{"$ref":"#/components/schemas/Note"}} |
score |
no | {"type":"number"} |
created_at |
no | {"type":"integer"} |
updated_at |
no | {"type":"integer"} |
last_interaction_at |
no | {"type":"integer"} |
do_not_contact |
yes | {"type":"boolean"} |
do_not_contact_at |
no | {"type":"integer"} |
do_not_contact_origin |
no | {"type":"string"} |
do_not_contact_by |
no | {"type":"string"} |
locked_fields |
yes | {"type":["array","null"],"items":{"type":"string"}} |
LeadChange
Section titled “LeadChange”{"type":"object","additionalProperties":false}
| Field | Required | Schema |
|---|---|---|
id |
yes | {"type":"string"} |
lead_id |
yes | {"type":"string"} |
actor_id |
no | {"type":["string","null"]} |
api_key_id |
no | {"type":["string","null"],"description":"The API key behind the change, for a write made with an API key (REST or classic MCP). The id stays after the key is revoked."} |
action |
yes | {"type":"string","description":"What changed. A scored entry records a stored score change; its before and after hold only score. An attribute write is an updated entry with reason attribute:<name> and the lead before and after. A note.created, note.updated or note.deleted entry holds the note before and after; deleting a lead writes one note.deleted entry per note, with reason lead:deleted. An assigned entry records a new assignee and an unassigned entry a cleared one; their before and after are empty.","examples":["created","updated","merged","deleted","scored","note.created","note.updated","note.deleted","assigned","unassigned"]} |
assignee |
no | {"type":"string","description":"Email of the new assignee, on an assigned entry. Absent once that person's account is deleted or once the history is erased."} |
changed_fields |
no | {"type":"array","items":{"type":"string"},"description":"Names of the top-level fields the entry changed, sorted, plus assignee on an assigned or unassigned entry. Present only once the history is erased: within 31 days of a lead's deletion, a daily job erases before, after and assignee, which are then absent. The action, created_at, actor_id, api_key_id, channel and reason stay. Absent on every other entry."} |
channel |
no | {"type":"string","description":"How the lead arrived, on the entries a create or a duplicate merge recorded, in GET /leads/{id}/changes: api (POST /leads with an API key), api_batch (POST /leads/batch with an API key), mcp_classic (MCP with an API key), dashboard (created in the dashboard), import (dashboard import, CSV or JSON) or save_leads (an AI assistant connected with OAuth). Klozeo sets it from the credential and the route; no request field sets it. Absent on older entries, on other entries, and in the account export.","enum":["api","api_batch","mcp_classic","dashboard","import","save_leads"]} |
before |
no | {} |
after |
no | {} |
created_at |
yes | {"type":"integer"} |
user_id |
yes | {"type":"string","description":"Alias of workspace_id, kept for existing integrations."} |
workspace_id |
yes | {"type":"string","description":"The workspace the entry belongs to."} |
reason |
no | {"type":"string"} |
LeadStats
Section titled “LeadStats”{"type":"object","additionalProperties":false}
| Field | Required | Schema |
|---|---|---|
total |
yes | {"type":"integer"} |
this_month |
yes | {"type":"integer"} |
with_email |
yes | {"type":"integer"} |
with_phone |
yes | {"type":"integer"} |
with_website |
yes | {"type":"integer"} |
avg_score |
yes | {"type":"number"} |
avg_rating |
yes | {"type":"number"} |
categories_count |
yes | {"type":"integer"} |
cities_count |
yes | {"type":"integer"} |
top_sources |
yes | {"type":["array","null"],"items":{"$ref":"#/components/schemas/SourceCount"}} |
LeadStatus
Section titled “LeadStatus”{"type":"object","description":"One entry of the workspace's status list.","additionalProperties":false}
| Field | Required | Schema |
|---|---|---|
value |
yes | {"type":"string","minLength":1,"maxLength":50,"description":"The value leads store in status. Exact and case-sensitive; surrounding spaces are removed."} |
label |
no | {"type":"string","maxLength":50,"description":"The name the dashboard shows. Empty: the built-in name of a default status, or the value itself."} |
color |
yes | {"type":"string","enum":["grey","blue","green","red","violet","amber","pink","teal"]} |
Message
Section titled “Message”{"type":"object","additionalProperties":false}
| Field | Required | Schema |
|---|---|---|
message |
yes | {"type":"string"} |
{"type":"object","additionalProperties":false}
| Field | Required | Schema |
|---|---|---|
id |
yes | {"type":"string"} |
lead_id |
yes | {"type":"string"} |
content |
yes | {"type":"string"} |
created_at |
yes | {"type":"integer"} |
updated_at |
yes | {"type":"integer"} |
author |
no | {"type":["string","null"],"description":"Email of the person who wrote the note: the member who wrote it in the dashboard or through an assistant, or the workspace owner for a note written with an API key. null when that person's account has been deleted, and for some notes written before November 2026. Editing a note does not change it."} |
api_key_id |
no | {"type":["string","null"],"description":"The API key the note was written with, through the REST API or the MCP server with a key. Editing a note does not change it. The id stays after the key is revoked."} |
ScoringRule
Section titled “ScoringRule”{"type":"object","additionalProperties":false}
| Field | Required | Schema |
|---|---|---|
id |
yes | {"type":"string"} |
name |
yes | {"type":"string"} |
expression |
yes | {"type":"string"} |
priority |
yes | {"type":"integer"} |
created_at |
yes | {"type":"integer"} |
updated_at |
yes | {"type":"integer"} |
SignupFirstTouch
Section titled “SignupFirstTouch”{"type":"object","description":"Where the account owner came from on their first visit, as recorded at sign-up, or null when nothing was recorded. Each field is present only when it was captured.","additionalProperties":false}
| Field | Required | Schema |
|---|---|---|
referrer |
no | {"type":"string","description":"External site of the first visit: host and path, without query string."} |
landing |
no | {"type":"string","description":"Path of the first page seen."} |
utm_source |
no | {"type":"string"} |
utm_medium |
no | {"type":"string"} |
utm_campaign |
no | {"type":"string"} |
utm_content |
no | {"type":"string"} |
utm_term |
no | {"type":"string"} |
SourceCount
Section titled “SourceCount”{"type":"object","additionalProperties":false}
| Field | Required | Schema |
|---|---|---|
source |
yes | {"type":"string"} |
count |
yes | {"type":"integer"} |
WebhookResponse
Section titled “WebhookResponse”{"type":"object","additionalProperties":false}
| Field | Required | Schema |
|---|---|---|
id |
yes | {"type":"string"} |
url |
yes | {"type":"string"} |
events |
yes | {"type":["array","null"],"items":{"type":"string"}} |
active |
yes | {"type":"boolean"} |
created_at |
yes | {"type":"string","format":"date-time"} |
created_by |
yes | {"type":["string","null"],"description":"User ID of the person who created the webhook; null once that person's account is deleted. A webhook created with an API key records the account owner."} |