inbound. stats
View campaign visits, visitors by channel and contact, lead conversion rates, and top pages.
0 credits. Free: reads Heelo's own records.
Example prompt
Send this to your AI app when Heelo is connected:
Show inbound stats for campaign seq_2026q4
Input fields
| Field | Type | Description |
|---|---|---|
site_idRequired | string | Site to report on |
campaignRequired | string | Campaign id, e.g. 'seq_2026q4' |
since | string | ISO start of window (alias: from) |
until | string | ISO end of window (alias: to) |
include_visits | boolean | Also return the campaign's visit rows exactly as stored (every stored column, at most 50, newest first) and the stored column names — to check what visit data is kept, e.g. that no raw IP is. |
Output fields
The fields in data when status is success.
| Field | Type |
|---|---|
visits | integer |
uniques | integer |
by_channel | object |
captures | integer |
capture_rate | number |
by_contact | array of object |
top_pages | array of object |
stored_visits | array of object |
stored_visit_columns | array of string |
Code
The call with the input fields that the tool needs. Replace each word in capitals, such as SITE_ID. Set HEELO_API_KEY to your API key.
import os
import requests
response = requests.post(
"https://toolsprimitives.uk/v1/tools/inbound.stats/invoke",
headers={"Authorization": f"Bearer {os.environ['HEELO_API_KEY']}"},
json={"input": {
"site_id": "SITE_ID",
"campaign": "CAMPAIGN",
}},
timeout=120,
)
response.raise_for_status()
print(response.json())// Node.js 18 or newer, in an ES module.
const response = await fetch("https://toolsprimitives.uk/v1/tools/inbound.stats/invoke", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.HEELO_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
input: {
"site_id": "SITE_ID",
"campaign": "CAMPAIGN"
},
}),
signal: AbortSignal.timeout(120_000),
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(await response.json());