Agent performance
Per-agent performance: contacts first touched in the range, how many became leads, calls, spend and cost per lead. Agents with no activity are left out.
GET
https://api.centerfy.ai/webhooks/inbound/analytics/agents Headers
| Header | Required | Value | Description |
|---|---|---|---|
x-api-key | Yes | your sub-account API key (cfy_…) | Authenticates the request; or use Authorization: Bearer <key>. |
Query parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
from | string (YYYY-MM-DD) | No | — | First day of the range (inclusive, local date). Defaults to 29 days before to (a 30-day range). |
to | string (YYYY-MM-DD) | No | — | Last day of the range (inclusive, local date). Defaults to today. The range can span at most 366 days. |
timezone | string | No | — | IANA time zone for day boundaries, e.g. America/New_York (max 64 characters). Defaults to your company time zone, else UTC. |
lead_rule | string | No | — | What counts as a lead: appointment (booked a non-cancelled appointment after the first touch), tag (gained lead_rule_tag after the first touch) or lead_score (crossed lead_rule_threshold after the first touch). Defaults to your saved Insights lead rule, else appointment. |
lead_rule_tag | string | No | — | Tag to look for when lead_rule=tag (required then; case-insensitive; max 200 characters). |
lead_rule_threshold | integer | No | — | Lead score threshold when lead_rule=lead_score; 0–1000. Defaults to 70. |
Example
curl -X GET "https://api.centerfy.ai/webhooks/inbound/analytics/agents" \
-H "x-api-key: $CENTERFY_API_KEY" import { CenterfyClient } from "@centerfy/sdk";
const centerfy = new CenterfyClient({ apiKey: process.env.CENTERFY_API_KEY! });
const result = await centerfy.analytics.agents();
console.log(result); centerfy analytics agents MCP tool: centerfy_analytics_agents (see MCP server)
Response
{
"status": "success",
"tz": "America/New_York",
"from": "2026-09-06",
"to": "2026-10-05",
"lead_rule": {
"type": "appointment"
},
"capped": false,
"agents": [
{
"agent_id": "2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e",
"agent_name": "Front desk",
"is_active": true,
"contacts": 40,
"leads": 8,
"calls": 52,
"spend": 18.4,
"cpl": 2.3
}
],
"touches_since": "2026-06-01T09:00:00.000Z"
}Errors
400— if lead_rule=tag without lead_rule_tag.400— if from/to aren’t real YYYY-MM-DD dates, from is after to, the range is over 366 days, or the timezone is unknown.401— if unauthenticated.
Notes
agents is sorted by most leads, then lowest cost per lead, then most contacts. cpl (spend ÷ leads) is null when there are no leads. lead_rule echoes the rule that was applied. touches_since is when first-touch tracking began for this sub-account (null if never) — contacts touched earlier aren’t attributed. Ops-manager agents are excluded. Days run from local midnight to midnight in tz. capped is true when a data source exceeded 20,000 rows — narrow the range for exact figures.