Line Health Report
curl --request GET \
--url https://app.tuco.ai/api/analytics/line-report \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.tuco.ai/api/analytics/line-report"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.tuco.ai/api/analytics/line-report', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.tuco.ai/api/analytics/line-report",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.tuco.ai/api/analytics/line-report"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.tuco.ai/api/analytics/line-report")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.tuco.ai/api/analytics/line-report")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyAnalytics
Line Health Report
Line health report for the Tuco AI iMessage API: people texted by country, per-line status, speed to lead, top first messages and a risk check.
GET
/
api
/
analytics
/
line-report
Line Health Report
curl --request GET \
--url https://app.tuco.ai/api/analytics/line-report \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.tuco.ai/api/analytics/line-report"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.tuco.ai/api/analytics/line-report', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.tuco.ai/api/analytics/line-report",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.tuco.ai/api/analytics/line-report"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.tuco.ai/api/analytics/line-report")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.tuco.ai/api/analytics/line-report")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyWhat each number means, with screenshots: Line health guide.
The “Line health” report for one workspace. Use it to answer two questions: where do my texts go? and why is my line at risk?It covers people texted by country and by US state (map data), per-line stats with a status and last night’s Apple lookup check, speed to lead, your most-used first messages, wording and volume signals, and a risk check against the medians of healthy Tuco lines.Scope is the single workspace behind your key or session. The report never returns another workspace’s data. Benchmarks are medians across many lines, never one customer’s numbers.
Authentication
Same as Analytics Insights. Send a Clerk session or an API key:Authorization: Bearer tuco_xxxxxxxxxxxxx
Query parameters
Start of the window. An ISO 8601 timestamp (
2026-11-03T00:00:00Z) or a calendar day (2026-11-03). Defaults to 30 days before dateTo.Limit the report to one Tuco line (24-character ObjectId hex). The line must belong to your workspace.
IANA zone used to cut days and hours, for example
America/New_York. Defaults to the workspace time zone. tz is accepted as an alias. An unknown zone is ignored and the workspace zone is used.dateTo and returns window.clamped: true.
Example
Last 30 days, all
curl "https://app.tuco.ai/api/analytics/line-report?dateFrom=2026-11-03&dateTo=2026-12-02&timezone=America/New_York" \
-H "Authorization: Bearer tuco_xxxxxxxxxxxxx"
One line
curl "https://app.tuco.ai/api/analytics/line-report?lineId=6a550c00d3c70557446422af" \
-H "Authorization: Bearer tuco_xxxxxxxxxxxxx"
Success response (200)
The numbers below are made up. In this example,states adds up to usPeople (352 + 9 unknown = 361), and usPeople matches the US row in countries.
{
"success": true,
"filter": {
"dateFrom": "2026-11-03T05:00:00.000Z",
"dateTo": "2026-12-03T04:59:59.999Z",
"timezone": "America/New_York"
},
"report": {
"window": {
"from": "2026-11-03T05:00:00.000Z",
"to": "2026-12-03T04:59:59.999Z",
"days": 30,
"timezone": "America/New_York",
"clamped": false
},
"summary": {
"people": 412,
"countries": 3,
"abroad": 15,
"abroadPct": 3.6,
"repliedPct": 31.4,
"sends": 1186,
"newPeople": 301
},
"countries": [
{ "code": "US", "people": 361, "pct": 87.6 },
{ "code": "CA", "people": 31, "pct": 7.5 },
{ "code": "MX", "people": 15, "pct": 3.6 }
],
"unknownCountry": 5,
"states": [
{ "code": "TX", "people": 112, "pct": 31 },
{ "code": "FL", "people": 86, "pct": 23.8 },
{ "code": "CA", "people": 74, "pct": 20.5 },
{ "code": "NY", "people": 51, "pct": 14.1 },
{ "code": "GA", "people": 29, "pct": 8 }
],
"usPeople": 361,
"unknownState": 9,
"idleLines": 1,
"moreLines": 0,
"lines": [
{
"lineId": "6a550c00d3c70557446422af",
"phone": "+1 555 010 0142",
"email": null,
"name": "Sales Line 1",
"country": "US",
"status": "watch",
"statusReasons": ["hostile"],
"activeDays": 21,
"sends": 842,
"msgsPerDay": 40.1,
"peakDay": 78,
"people": 290,
"newPeople": 214,
"newPerDay": 10.2,
"abroadPct": 5.2,
"countries": 3,
"notIMessagePct": 4.5,
"linkPct": 12,
"repliedPct": 33.1,
"inbound": 131,
"hostile": 5,
"hostilePct": 3.8,
"appleLookup": { "verdict": "passed", "checkedAt": "2026-12-02T06:12:41.000Z" }
},
{
"lineId": "6a550c00d3c70557446422b0",
"phone": "+1 555 010 0187",
"email": null,
"name": "Sales Line 2",
"country": "US",
"status": "healthy",
"statusReasons": [],
"activeDays": 14,
"sends": 344,
"msgsPerDay": 24.6,
"peakDay": 51,
"people": 150,
"newPeople": 87,
"newPerDay": 6.2,
"abroadPct": 0,
"countries": 1,
"notIMessagePct": 6.1,
"linkPct": 8.1,
"repliedPct": 28.7,
"inbound": 52,
"hostile": 0,
"hostilePct": 0,
"appleLookup": { "verdict": "passed", "checkedAt": "2026-12-02T06:14:03.000Z" }
}
],
"speedToLead": {
"medianMinutes": 3.4,
"under5Pct": 62.5,
"measured": 240,
"byHour": [0, 0, 0, 0, 0, 0, 2, 18, 64, 121, 138, 129, 96, 102, 110, 118, 92, 74, 48, 31, 22, 12, 6, 3]
},
"content": {
"firstTouches": 301,
"templates": [
{ "text": "Hi {name}, this is Sam from Acme Roofing. Saw your request, got a minute to chat about a quote?", "count": 118, "pct": 39.2 },
{ "text": "Hey {name}, thanks for reaching out. Here is the booking page: {link}", "count": 64, "pct": 21.3 },
{ "text": "Hi {name}, following up on your estimate for {date}. Still interested?", "count": 30, "pct": 10 }
],
"signals": {
"linkPct": 10.9,
"firstTouchLinkPct": 14,
"confirmAskPct": 1.1,
"deadlinePct": 0.6,
"urgencyPct": 0.4,
"messagesPerPerson": 2.9,
"chasedPct": 5.1,
"medianLength": 96,
"topTemplatePct": 39.2,
"maxToOnePerson": 9,
"rapidFirePct": 1.9,
"toNonRepliers": 521,
"maxToNonReplier": 6,
"nonReplierPct": 53.6,
"senderNames": ["Sam", "Jordan"],
"manualPct": 18.4
}
},
"risk": [
{ "key": "abroad", "level": "ok", "value": 3.6, "unit": "%", "benchmark": 2.1 },
{ "key": "deadline", "level": "ok", "value": 0.6, "unit": "%", "benchmark": 0.3 },
{ "key": "chasing", "level": "watch", "value": 5.1, "unit": "%", "benchmark": 3.9 },
{ "key": "hostile", "level": "ok", "value": 2.7, "unit": "%", "benchmark": 1.1 },
{ "key": "notIMessage", "level": "ok", "value": 5, "unit": "%", "benchmark": 7.8 },
{ "key": "appleLookup", "level": "ok", "value": 0, "of": 2, "unit": "lines", "benchmark": null }
],
"benchmarks": {
"linesMeasured": 34,
"computedAt": "2026-12-03T02:00:00.000Z",
"windowDays": 30,
"msgsPerDay": 31.5,
"newPerDay": 8.4,
"abroadPct": 2.1,
"notIMessagePct": 7.8,
"linkPct": 9.6,
"confirmAskPct": 1.4,
"deadlinePct": 0.3,
"urgencyPct": 0.8,
"hostilePct": 1.1,
"chasedPct": 3.9,
"messagesPerPerson": 2.6,
"maxToOnePerson": 7,
"nonReplierPct": 49.8,
"medianLength": 91,
"manualPct": 12.6
},
"truncated": false
},
"explainer": {
"people": "Distinct people a line texted in the window ...",
"abroadPct": "Share of people whose dialling code differs from the code of the line that texted them. ..."
}
}
explainer object in the real response has one sentence for each of people, countries, abroadPct, repliedPct, lines, status, appleLookup, speedToLead, templates, signals, risk, benchmarks and truncated. It is shortened above.
A report is small. Typical payloads are under 10 KB. In production measurements the largest workspace took under 2.5 seconds over 92 days.
Caching and load limits
- Responses are cached for 2 minutes per workspace, line, window and time zone. Calling again within 2 minutes returns the same report.
- When you leave out
dateTo, it is rounded up to the next minute, so repeat calls share one cache entry. - At most 3 reports are computed at once per server. A fourth request waits up to 10 seconds, then gets
429 LINE_REPORT_BUSY.
Response fields
Top level
| Field | Type | Meaning |
|---|---|---|
success | boolean | true on a 200. |
filter | object | What was applied: lineId (only when you passed it), dateFrom, dateTo, timezone. |
report | object | The report. Fields below. |
explainer | object | One plain sentence per field group. |
report.window
| Field | Type | Meaning |
|---|---|---|
from, to | string | ISO timestamps of the window actually used. |
days | number | Window length in days, at least 1. |
timezone | string | IANA zone used for days and hours. |
clamped | boolean | true when your range was longer than 92 days and was cut to the most recent 92. |
report.summary and report.countries
| Field | Type | Meaning |
|---|---|---|
summary.people | number | Distinct people a line texted in the window. A message counts when its status is sent, delivered or fallback (fallback means the person is not on iMessage). |
summary.countries | number | Number of countries with at least one person. |
summary.abroad | number | People whose dialling code differs from the code of the line that texted them. For a +1 line, that means anyone outside the US, Canada and the Caribbean. |
summary.abroadPct | number | abroad as a percent of people. A US number texting abroad is the strongest ban signal measured so far. |
summary.repliedPct | number | Percent of people texted who sent at least one message back in the window. |
summary.sends | number | Messages that left the queue. |
summary.newPeople | number | People first texted in this window (not texted by your workspace before it). |
countries[] | object[] | People by country, largest first: code (ISO 3166 alpha-2), people, pct of all people. Read from the phone number. Within +1, Canada, Puerto Rico and the Caribbean are told apart from the US by area code. |
unknownCountry | number | People with no country, such as email-only contacts. |
states[] | object[] | US people by state, largest first: code (state), people, pct. Read from the area code. pct is a share of usPeople, not of all people. |
usPeople | number | People whose country is US. This is the base for states[].pct. |
unknownState | number | US people whose area code does not map to a state. states[].people plus unknownState equals usPeople. |
idleLines | number | Lines not listed in lines[] because nothing happened on them in the window: quiet lines, and lines that are switched off, churned or not provisioned. A live line that is down or failed the Apple lookup check is always listed. |
moreLines | number | Lines that had activity but did not fit: lines[] holds at most 100, worst first. Use the lineId parameter to read any one of them. |
report.lines[]
One row per line that had texts or replies in the window, plus any live line that is down or failed last night’s Apple lookup check. Ordered at_risk, watch, offline, healthy, then by sends. At most 100 rows; the rest are counted in moreLines, and idle lines in idleLines. With lineId, that one line is always returned.
| Field | Type | Meaning |
|---|---|---|
lineId | string | Line id. |
phone, email, name | string or null | Line phone (international format), email, and owner name. |
country | string or null | Country of the line’s phone number. |
status | string | healthy, watch, at_risk, offline or quiet. The worst signal wins. |
statusReasons | string[] | Why: apple_lookup_failed, not_imessage, abroad, hostile, offline. |
activeDays | number | Days with at least one send. |
sends | number | Messages that left the queue. |
msgsPerDay | number | sends divided by activeDays. |
peakDay | number | Most sends on one day. |
people | number | Distinct people texted. |
newPeople | number | People first texted by your workspace on this line in the window. |
newPerDay | number | newPeople divided by activeDays. |
abroadPct | number | Percent of people with a different dialling code than the line. |
countries | number | Countries reached. |
notIMessagePct | number | Percent of sends to people not on iMessage. |
linkPct | number | Percent of sends that contain a link. |
repliedPct | number | Percent of people who replied. |
inbound | number | Messages received on the line. |
hostile | number | Replies that read as a complaint. |
hostilePct | number | hostile as a percent of inbound. |
appleLookup.verdict | string | passed, failed, inconclusive or not_run. |
appleLookup.checkedAt | string or null | When the last check ran. |
appleLookup is a nightly check. The line is asked, silently, whether it can see a number that another line proved is on iMessage that day. failed is an early sign of an Apple block for new contacts. A result older than 48 hours is reported as not_run.
“Hostile” covers STOP-style opt-outs and replies such as “who is this”, “wrong number” or “spam”. It is a wording match, not a judgement of intent.
report.speedToLead
| Field | Type | Meaning |
|---|---|---|
medianMinutes | number or null | Median minutes from the lead being added to Tuco to its first text, for people first texted in the window. A lead created by the send itself (for example through the API) reads as 0. null when nothing was measured. |
under5Pct | number | Percent of measured leads texted within 5 minutes. |
measured | number | Leads with a known added-to-Tuco time. |
byHour | number[24] | Texts sent per hour of day (0 to 23) in the workspace time zone. |
report.content
| Field | Type | Meaning |
|---|---|---|
firstTouches | number | First messages to new people in the window. |
templates[] | object[] | Up to 3 most-used first messages: text, count, pct of first touches. Names, links, emails, dates, times and long numbers are replaced with {name}, {link}, {email}, {date}, {time}, {number}. Only templates used at least twice are listed. |
signals.linkPct | number | Percent of all sends with a link. |
signals.firstTouchLinkPct | number | Percent of first touches with a link. |
signals.confirmAskPct | number | Percent of sends that ask for a “Reply YES / CONFIRM” style answer. |
signals.deadlinePct | number | Percent of sends with deadline wording, such as “within 60 minutes”. |
signals.urgencyPct | number | Percent of sends with urgency words. |
signals.messagesPerPerson | number | Sends divided by people. |
signals.chasedPct | number | Percent of people texted 4 or more times who have never replied. See “Chasing” below. |
signals.medianLength | number or null | Median message length in characters. |
signals.topTemplatePct | number | Percent of first touches that used the single most common template. |
signals.maxToOnePerson | number | Most texts sent to one person in the window. |
signals.rapidFirePct | number | Percent of texts sent within 60 seconds of a previous text to the same person. |
signals.toNonRepliers | number | Texts sent to people who have never replied. |
signals.maxToNonReplier | number | Most texts sent to one person who has never replied. |
signals.nonReplierPct | number | Percent of people texted who have never replied. Replies from before the window count. |
signals.senderNames | string[] | Up to 8 rep first names that texts are signed with, each used at least twice, most used first. |
signals.manualPct | number or null | Percent of texts a person sent by hand: dashboard, Telegram, email bridge, HubSpot card, Close panel, Slack or GoHighLevel. null when no text carries a source. |
report.risk[]
| Field | Type | Meaning |
|---|---|---|
key | string | abroad, deadline, chasing, hostile, notIMessage or appleLookup. |
level | string | ok, watch, risk or unknown (not enough data). |
value | number | Your number. A percent, or for appleLookup the count of lines that failed. |
unit | string | % or lines. |
of | number | Only on appleLookup: lines that were checked. |
benchmark | number or null | Median across healthy Tuco lines, or null when not available. |
report.benchmarks
Medians across healthy Tuco lines over the last 30 days. Needs at least 10 lines, refreshed daily. null until enough lines qualify. Fields: linesMeasured, computedAt, windowDays, msgsPerDay, newPerDay, abroadPct, notIMessagePct, linkPct, confirmAskPct, deadlinePct, urgencyPct, hostilePct, chasedPct, messagesPerPerson. Each value can be null. maxToOnePerson, nonReplierPct, medianLength and manualPct are optional and may be missing.
report.truncated
true when the window holds more than 150,000 messages. The counts are then empty, so every line reads as quiet or offline. Narrow the range or pass a lineId.
How status and risk levels are decided
A rate is only judged when it rests on enough events. Below that, a risk entry isunknown and a line is not marked for that signal.
| Signal | Minimum sample |
|---|---|
Rates per sends (deadline, notIMessage) | 20 sends |
Rates per replies (hostile) | 30 inbound messages |
Rates per people (abroad, chasing) | 10 people |
watch number is watch. At or above the risk number is risk.
Chasing. The follow-up rule allows 3 texts to someone who has not replied: the first text and 2 follow-ups. A person texted 4 or more times who has never replied counts as chased. chasedPct and the chasing risk use this definition. “Never” includes replies from before the window.
| Signal | Watch at | Risk at |
|---|---|---|
abroad (people texted abroad) | 10% | 30% |
deadline (deadline wording) | 2% | 15% |
chasing (4+ texts, never replied) | 5% | 15% |
hostile (complaint replies) | 3% | 6% |
notIMessage (not on iMessage) | 25% | 40% |
appleLookup in the risk list is risk if any checked line failed, ok if all passed, and unknown if no line has a passed or failed result.
Line status uses these rules, in order:
offline: the line is inactive, not fully provisioned, or its health check reports it down.quiet: no sends and no replies in the window. AfailedApple lookup still makes a quiet lineat_risk.at_risk: the Apple lookup failed, ornotIMessagePct,abroadPctorhostilePctreached its risk number.watch: one of those three reached its watch number.healthy: none of the above.
not_imessage, abroad and hostile. The deadline and chasing checks appear only in the workspace-level risk list.
These levels are rules of thumb based on Tuco’s own line data. They are not a guarantee about what Apple will do.
Error responses
| Status | Code | When |
|---|---|---|
400 | INVALID_DATE | dateFrom or dateTo is not YYYY-MM-DD or an ISO timestamp. |
400 | INVALID_RANGE | dateFrom is after dateTo. |
401 | UNAUTHORIZED | Missing or invalid API key or session. |
404 | LINE_NOT_FOUND | lineId is not valid or not in your workspace. |
429 | LINE_REPORT_BUSY | Too many reports are being built on the server. The response has a Retry-After: 5 header. Try again in a few seconds. |
500 | LINE_REPORT_FAILED | The report could not be computed. |
503 | LINE_REPORT_TIMEOUT | The report took too long. Use a shorter range or pass a lineId. |
{ "error": "...", "code": "INVALID_DATE" }.
Using it from an AI assistant
The Tuco MCP server exposes this endpoint as theget-line-report tool.