Documentation
Leads
leads.intake_health
REST
ShippingPOST /api/v1/leads/intake_healthMCP tool
Liveleads.intake_healthExposed on: REST API · Shop MCP server · Claude connector · Dash (in-app copilot) · Zapier. Part of the Leads domain.
Operating contract
THE READ TO MAKE BEFORE TELLING A SHOP OWNER THEIR LEADS ARE DOWN. It judges each automated intake rail — the website form, lead forms, online booking, the voice agent, the API — against that rail's OWN history, so a channel that normally goes quiet at weekends is not reported as broken on a Sunday.
verdict is one word for the whole intake: healthy, watch or broken. summary is the sentence to say out loud. flagged is the rails currently quiet or silent, worst first, and each carries hours_since_last_lead next to that rail's own normal_quiet_hours — the comparison is the finding, not either number alone.
misses is the BACKLOG: submissions that arrived and could not be turned into a lead. A non-zero total there means enquiries are being lost right now, and it outranks every verdict on this response.
ready: false means migration 0249 has not been applied to this shop's database and NOTHING here is a judgement — say that rather than reporting the shop is healthy.
Reading the backlog is all this does. Replaying or dismissing a missed submission re-fires a third party's webhook and stays a person at /leads/intake.
Who may call it
- Permission
leads.accessThe caller must hold Leads at the ACT level. A read-only dashboard grant on the same section is refused.- Plan
- Every planNo plan gate. Available on every Service VIN plan.
- Retries
naturalNaturally idempotent — running it twice leaves the same world as running it once. A retrying integration needs no key.- Rate class
readCounted against the read budget — the widest of the four.
Input
This capability takes no arguments.
Output
| Field | Type | Description |
|---|---|---|
| ready | boolean | — |
| verdict | string | — |
| summary | string | — |
| channels | object[] | — |
| channels[].channel | string | — |
| channels[].label | string | — |
| channels[].verdict | string | — |
| channels[].baseline_count | number | — |
| channels[].recent_count | number | — |
| channels[].last_lead_at | string | null | — |
| channels[].hours_since_last_lead | number | null | — |
| channels[].normal_quiet_hours | number | null | — |
| channels[].hint | string | — |
| flagged | string[] | — |
| misses | object | null | — |
| misses.total | number | — |
| misses.replayable | number | — |
| misses.newest_at | string | null | — |
| misses.by_source | object[] | — |
| misses.by_source[].source | string | — |
| misses.by_source[].label | string | — |
| misses.by_source[].count | number | — |
Examples
Built from this capability's own schema — required fields and the ones carrying a default, and nothing invented. Paste one and it validates.
export SERVICEVIN_API_KEY=svk_live_…
curl -X POST https://www.servicevin.com/api/v1/leads/intake_health \
-H "Authorization: Bearer $SERVICEVIN_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'const res = await fetch("https://www.servicevin.com/api/v1/leads/intake_health", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.SERVICEVIN_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({}),
});
// Success and failure are both envelopes. Switch on error.code, never
// on error.message — the codes are stable, the messages are for people.
const payload = await res.json();
if (!res.ok) throw new Error(payload.error.code);
const data = payload.data;import os, requests
res = requests.post(
"https://www.servicevin.com/api/v1/leads/intake_health",
headers={"Authorization": f"Bearer {os.environ['SERVICEVIN_API_KEY']}"},
json={},
timeout=30,
)
payload = res.json()
if not res.ok:
raise RuntimeError(payload["error"]["code"])
data = payload["data"]{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "leads.intake_health",
"arguments": {}
}
}Refusals
The four gates run in this order on every surface, and the order is not arbitrary — see Authentication.
| Status | Code | When |
|---|---|---|
| 404 | not_found | The id is unknown, or the feature is not enabled for this account. Deliberately the same answer for both. |
| 403 | forbidden | This login does not hold leads.access. |
| 422 | validation_error | An argument was wrong. The message names the field. |
| 429 | rate_limited | Too many read calls. Back off and retry. |
| 500 | internal_error | Something failed on our side. Nothing was changed. |