const options = {
method: 'GET',
headers: {
'x-api-key': '<your-api-key>',
},
};
fetch(
'https://api-v2.getomni.ai/api/v0/analytics?start=2026-03-14T00:00:00Z&end=2026-04-14T00:00:00Z',
options,
)
.then((response) => response.json())
.then((response) => console.log(response))
.catch((err) => console.error(err));
import requests
url = "https://api-v2.getomni.ai/api/v0/analytics"
params = {
"start": "2026-03-14T00:00:00Z",
"end": "2026-04-14T00:00:00Z"
}
headers = {
"x-api-key": "<your-api-key>"
}
response = requests.request("GET", url, headers=headers, params=params)
print(response.json())
curl --request GET \
--url 'https://api-v2.getomni.ai/api/v0/analytics?start=2026-03-14T00:00:00Z&end=2026-04-14T00:00:00Z' \
--header 'x-api-key: <your-api-key>'
curl --request GET \
--url 'https://api-v2.getomni.ai/api/v0/analytics?format=csv&start=2026-03-14T00:00:00Z&end=2026-04-14T00:00:00Z' \
--header 'x-api-key: <your-api-key>'
curl -o analytics.csv '<downloadUrl-from-response>'
{
"start": "2026-03-14T00:00:00Z",
"end": "2026-04-14T00:00:00Z",
"totals": {
"count": 950,
"leadsCompleted": 320,
"leadsNotInterested": 28,
"leadsOptedOut": 45,
"totalMessages": 12400,
"inboundMessages": 4800,
"outboundMessages": 7600,
"channels": {
"sms": { "inbound": 3200, "outbound": 4800 },
"email": { "inbound": 1400, "outbound": 2800 }
},
"completion": {
"totalRequired": 7600,
"totalCompleted": 2060,
"bySource": {
"agent": 520,
"imported": 80,
"manual": 140,
"portal": 1320
}
},
"interventions": {
"documentOverrides": 0,
"escalations": 12,
"manualUpdates": 51,
"messageEdits": 109,
"messageRejects": 14
}
},
"breakdown": [
{
"leadId": "4ef30123-90c2-4dc0-bd28-b43eee8664ea",
"firstName": "Jane",
"lastName": "Doe",
"email": "jane@acme.com",
"phoneNumber": "+15551234567",
"createdAt": "2026-03-15T10:22:00Z",
"completedAt": "2026-03-17T04:45:00Z",
"notInterestedAt": null,
"optedOutAt": null,
"totalMessages": 18,
"inboundMessages": 7,
"outboundMessages": 11,
"lastInboundAt": "2026-03-17T04:30:00Z",
"lastOutboundAt": "2026-03-17T04:40:00Z",
"channels": {
"sms": {
"inbound": 6,
"outbound": 9,
"lastInboundAt": "2026-03-17T04:30:00Z",
"lastOutboundAt": "2026-03-17T04:40:00Z"
},
"email": {
"inbound": 1,
"outbound": 2,
"lastInboundAt": "2026-03-15T11:12:00Z",
"lastOutboundAt": "2026-03-15T10:30:00Z"
}
},
"completion": {
"totalRequired": 8,
"totalCompleted": 8,
"bySource": {
"agent": 2,
"imported": 0,
"manual": 1,
"portal": 5
}
},
"interventions": {
"documentOverrides": 0,
"escalations": 0,
"manualUpdates": 1,
"messageEdits": 1,
"messageRejects": 0
},
"checklistItems": [
{
"code": "PERSONAL_DETAILS.FIRST_NAME",
"required": true,
"status": "COMPLETED",
"value": "Jane",
"updatedAt": "2026-03-15T10:22:00Z",
"source": "portal"
},
{
"code": "DOCUMENTS.INCOME_VERIFICATION",
"required": true,
"status": "COMPLETED",
"value": "s3://...",
"updatedAt": "2026-03-15T11:02:00Z",
"source": "portal"
}
]
}
]
}
Analytics
Get Analytics
Fetch aggregate totals and per-lead analytics for your workspace
GET
/
api
/
v0
/
analytics
const options = {
method: 'GET',
headers: {
'x-api-key': '<your-api-key>',
},
};
fetch(
'https://api-v2.getomni.ai/api/v0/analytics?start=2026-03-14T00:00:00Z&end=2026-04-14T00:00:00Z',
options,
)
.then((response) => response.json())
.then((response) => console.log(response))
.catch((err) => console.error(err));
import requests
url = "https://api-v2.getomni.ai/api/v0/analytics"
params = {
"start": "2026-03-14T00:00:00Z",
"end": "2026-04-14T00:00:00Z"
}
headers = {
"x-api-key": "<your-api-key>"
}
response = requests.request("GET", url, headers=headers, params=params)
print(response.json())
curl --request GET \
--url 'https://api-v2.getomni.ai/api/v0/analytics?start=2026-03-14T00:00:00Z&end=2026-04-14T00:00:00Z' \
--header 'x-api-key: <your-api-key>'
curl --request GET \
--url 'https://api-v2.getomni.ai/api/v0/analytics?format=csv&start=2026-03-14T00:00:00Z&end=2026-04-14T00:00:00Z' \
--header 'x-api-key: <your-api-key>'
curl -o analytics.csv '<downloadUrl-from-response>'
{
"start": "2026-03-14T00:00:00Z",
"end": "2026-04-14T00:00:00Z",
"totals": {
"count": 950,
"leadsCompleted": 320,
"leadsNotInterested": 28,
"leadsOptedOut": 45,
"totalMessages": 12400,
"inboundMessages": 4800,
"outboundMessages": 7600,
"channels": {
"sms": { "inbound": 3200, "outbound": 4800 },
"email": { "inbound": 1400, "outbound": 2800 }
},
"completion": {
"totalRequired": 7600,
"totalCompleted": 2060,
"bySource": {
"agent": 520,
"imported": 80,
"manual": 140,
"portal": 1320
}
},
"interventions": {
"documentOverrides": 0,
"escalations": 12,
"manualUpdates": 51,
"messageEdits": 109,
"messageRejects": 14
}
},
"breakdown": [
{
"leadId": "4ef30123-90c2-4dc0-bd28-b43eee8664ea",
"firstName": "Jane",
"lastName": "Doe",
"email": "jane@acme.com",
"phoneNumber": "+15551234567",
"createdAt": "2026-03-15T10:22:00Z",
"completedAt": "2026-03-17T04:45:00Z",
"notInterestedAt": null,
"optedOutAt": null,
"totalMessages": 18,
"inboundMessages": 7,
"outboundMessages": 11,
"lastInboundAt": "2026-03-17T04:30:00Z",
"lastOutboundAt": "2026-03-17T04:40:00Z",
"channels": {
"sms": {
"inbound": 6,
"outbound": 9,
"lastInboundAt": "2026-03-17T04:30:00Z",
"lastOutboundAt": "2026-03-17T04:40:00Z"
},
"email": {
"inbound": 1,
"outbound": 2,
"lastInboundAt": "2026-03-15T11:12:00Z",
"lastOutboundAt": "2026-03-15T10:30:00Z"
}
},
"completion": {
"totalRequired": 8,
"totalCompleted": 8,
"bySource": {
"agent": 2,
"imported": 0,
"manual": 1,
"portal": 5
}
},
"interventions": {
"documentOverrides": 0,
"escalations": 0,
"manualUpdates": 1,
"messageEdits": 1,
"messageRejects": 0
},
"checklistItems": [
{
"code": "PERSONAL_DETAILS.FIRST_NAME",
"required": true,
"status": "COMPLETED",
"value": "Jane",
"updatedAt": "2026-03-15T10:22:00Z",
"source": "portal"
},
{
"code": "DOCUMENTS.INCOME_VERIFICATION",
"required": true,
"status": "COMPLETED",
"value": "s3://...",
"updatedAt": "2026-03-15T11:02:00Z",
"source": "portal"
}
]
}
]
}
Returns aggregate totals and a per-lead breakdown for leads in your workspace. Results are scoped to the API key’s workspace and exclude deleted and test leads.
If both
CSV file columns (in the downloaded file):
Query Parameters
string
ISO 8601 datetime (e.g.
2026-03-14T00:00:00Z). Filters leads by createdAt.string
ISO 8601 datetime. Must be on or after
start when both are provided.string
default:"json"
Response format. Either
json or csv. When csv, the response is a JSON object with a signed downloadUrl pointing to a CSV file hosted on S3.string
Pagination token returned as
nextToken on a prior request. Only used when format=json. Omit on the first request.start and end are omitted, all leads in the workspace are returned.
JSON responses are capped at 500 leads per page. Use nextToken to fetch the next page.
Response
string
Echo of the start of the date range
string
Echo of the end of the date range
string
Pagination token for the next page.
null when no more leads remain. Pass back as the token query param to fetch the next page.object
Workspace-wide aggregates over all leads matching the filter.
Show totals properties
Show totals properties
number
Number of leads in the result set
number
Leads with a submission timestamp
number
Leads marked as not interested
number
Leads who opted out
number
Total messages across all leads
number
number
object
Per-channel message counts, keyed by channel name (
sms, email, whatsapp). Each value has inbound and outbound counts.object
object
array
Array of per-lead analytics objects.
Show breakdown[] properties
Show breakdown[] properties
string
Unique identifier for the lead
string
string
string
string
string
ISO timestamp of lead creation
string
ISO timestamp of lead submission, if completed
string
ISO timestamp the lead was marked as not interested, if applicable
string
ISO timestamp of opt-out, if applicable
number
number
number
string
Most recent inbound message timestamp across all channels
string
Most recent outbound message timestamp across all channels
object
Per-channel stats for this lead. Keys are channel names (
sms, email, whatsapp). Each value contains inbound, outbound, lastInboundAt, lastOutboundAt.object
Checklist completion for this lead. Same shape as
totals.completion.object
Human intervention counts for this lead. Same shape as
totals.interventions.array
One entry per checklist item associated with this lead.
Show checklistItems[] properties
Show checklistItems[] properties
string
{GROUP_KEY}.{ITEM_CODE} — uppercase identifier for the checklist item. Group key is the group’s internal name uppercased with spaces replaced by _. Just {ITEM_CODE} if the item has no group.boolean
true when the item is required AND visible to this lead (meets its conditions).string
One of
TODO, COMPLETED, INVALID, SKIPPED, NEEDS_REVIEWany
Raw value entered for the item. Type varies by field.
null if not filled.string
ISO timestamp of the last update to this item
string
Source of the last update:
agent, imported, manual, portal, or null if untouchedSource values
| Source | Origin |
|---|---|
agent | AI agent via tool calls |
imported | Public REST API calls |
manual | Human team member direct edits |
portal | Customer self-service via portal |
CSV format
Whenformat=csv, the response is a JSON object with a signed URL to download the CSV file from S3. The URL expires after 1 hour.
Response fields:
string
Signed S3 URL to download the CSV file. Expires in 1 hour.
string
ISO timestamp when the signed URL expires.
- Base fields:
leadId,firstName,lastName,email,phoneNumber,createdAt,completedAt,notInterestedAt,optedOutAt, message counts, last-touch timestamps - Per-channel:
channels.<name>.inbound,channels.<name>.outbound,channels.<name>.lastInboundAt,channels.<name>.lastOutboundAt - Completion:
completion.totalRequired,completion.totalCompleted,completion.bySource.* - Interventions:
interventions.* - Checklist items (index-based, sorted by group order then item order, padded to the maximum count across all leads):
checklist.<i>.code,checklist.<i>.required,checklist.<i>.status,checklist.<i>.value,checklist.<i>.updatedAt,checklist.<i>.source
format=json for aggregates.
Example CSV response:
200
{
"downloadUrl": "https://s3.amazonaws.com/your-bucket/analytics-exports/...?X-Amz-Signature=...",
"expiresAt": "2026-04-14T18:00:00.000Z"
}
Errors
| Status | Cause |
|---|---|
| 400 | Missing or invalid query parameters (e.g., non-ISO date, start after end, unrecognized param) |
| 401 | Missing or invalid API key |
const options = {
method: 'GET',
headers: {
'x-api-key': '<your-api-key>',
},
};
fetch(
'https://api-v2.getomni.ai/api/v0/analytics?start=2026-03-14T00:00:00Z&end=2026-04-14T00:00:00Z',
options,
)
.then((response) => response.json())
.then((response) => console.log(response))
.catch((err) => console.error(err));
import requests
url = "https://api-v2.getomni.ai/api/v0/analytics"
params = {
"start": "2026-03-14T00:00:00Z",
"end": "2026-04-14T00:00:00Z"
}
headers = {
"x-api-key": "<your-api-key>"
}
response = requests.request("GET", url, headers=headers, params=params)
print(response.json())
curl --request GET \
--url 'https://api-v2.getomni.ai/api/v0/analytics?start=2026-03-14T00:00:00Z&end=2026-04-14T00:00:00Z' \
--header 'x-api-key: <your-api-key>'
curl --request GET \
--url 'https://api-v2.getomni.ai/api/v0/analytics?format=csv&start=2026-03-14T00:00:00Z&end=2026-04-14T00:00:00Z' \
--header 'x-api-key: <your-api-key>'
Then download the CSV from the returned
downloadUrl:curl -o analytics.csv '<downloadUrl-from-response>'
{
"start": "2026-03-14T00:00:00Z",
"end": "2026-04-14T00:00:00Z",
"totals": {
"count": 950,
"leadsCompleted": 320,
"leadsNotInterested": 28,
"leadsOptedOut": 45,
"totalMessages": 12400,
"inboundMessages": 4800,
"outboundMessages": 7600,
"channels": {
"sms": { "inbound": 3200, "outbound": 4800 },
"email": { "inbound": 1400, "outbound": 2800 }
},
"completion": {
"totalRequired": 7600,
"totalCompleted": 2060,
"bySource": {
"agent": 520,
"imported": 80,
"manual": 140,
"portal": 1320
}
},
"interventions": {
"documentOverrides": 0,
"escalations": 12,
"manualUpdates": 51,
"messageEdits": 109,
"messageRejects": 14
}
},
"breakdown": [
{
"leadId": "4ef30123-90c2-4dc0-bd28-b43eee8664ea",
"firstName": "Jane",
"lastName": "Doe",
"email": "jane@acme.com",
"phoneNumber": "+15551234567",
"createdAt": "2026-03-15T10:22:00Z",
"completedAt": "2026-03-17T04:45:00Z",
"notInterestedAt": null,
"optedOutAt": null,
"totalMessages": 18,
"inboundMessages": 7,
"outboundMessages": 11,
"lastInboundAt": "2026-03-17T04:30:00Z",
"lastOutboundAt": "2026-03-17T04:40:00Z",
"channels": {
"sms": {
"inbound": 6,
"outbound": 9,
"lastInboundAt": "2026-03-17T04:30:00Z",
"lastOutboundAt": "2026-03-17T04:40:00Z"
},
"email": {
"inbound": 1,
"outbound": 2,
"lastInboundAt": "2026-03-15T11:12:00Z",
"lastOutboundAt": "2026-03-15T10:30:00Z"
}
},
"completion": {
"totalRequired": 8,
"totalCompleted": 8,
"bySource": {
"agent": 2,
"imported": 0,
"manual": 1,
"portal": 5
}
},
"interventions": {
"documentOverrides": 0,
"escalations": 0,
"manualUpdates": 1,
"messageEdits": 1,
"messageRejects": 0
},
"checklistItems": [
{
"code": "PERSONAL_DETAILS.FIRST_NAME",
"required": true,
"status": "COMPLETED",
"value": "Jane",
"updatedAt": "2026-03-15T10:22:00Z",
"source": "portal"
},
{
"code": "DOCUMENTS.INCOME_VERIFICATION",
"required": true,
"status": "COMPLETED",
"value": "s3://...",
"updatedAt": "2026-03-15T11:02:00Z",
"source": "portal"
}
]
}
]
}
