Airgentic Help
Use the Analytics API to export raw records for AI customer service conversations from your Airgentic service.
You need:
The API key must be passed in the api-key request header.
Use the following endpoint:
GET https://admin.airgentic.com/api/insights/raw
This endpoint returns the raw analytics records for a single Airgentic service over a date range.
| Parameter | Required | Description |
|---|---|---|
account_id |
Yes | Your Airgentic account ID |
service_id |
Yes | The service ID to query |
start_date |
Yes | Start date in YYYY-MM-DD format |
end_date |
No | End date in YYYY-MM-DD format. If omitted, the API uses start_date |
Date handling:
start_date is inclusiveend_date is inclusive| Header | Required | Description |
|---|---|---|
api-key |
Yes | The Insights API key from the Security screen |
curl -H "api-key: <API Key>" \
"https://admin.airgentic.com/api/insights/raw?account_id=<account ID>&service_id=<service ID>&start_date=2026-01-01&end_date=2026-01-20"
For a single day, you can omit end_date:
curl -H "api-key: <API Key>" \
"https://admin.airgentic.com/api/insights/raw?account_id=<account ID>&service_id=<service ID>&start_date=2026-01-20"
The response is a JSON object with request metadata and a data array of raw analytics records:
{
"account_id": "bcit",
"service_id": "web",
"start_date": "2026-01-01",
"end_date": "2026-01-20",
"record_count": 2,
"data": [
{
"account_id": "bcit",
"service_id": "web",
"partition_id": "bcit_web",
"date_time": "2026-01-20T03:14:15.123456+00:00",
"browser_url": "https://www.example.com/help",
"session_id": "8b4d6c57-8b5a-4b1d-a442-6a85e7e3958c",
"user_id": "GA1.1.123456789.1234567890",
"thread_id": "9f5901d0-5da2-4b92-b587-3f83d58640d6",
"opening_question": "How do I reset my password?",
"lang": "en-AU",
"thread_concluded": true,
"thread_chat_history": "...",
"full_chat_history": null,
"city": "Vancouver",
"region": "British Columbia",
"country": "Canada",
"latitude": 49.2827,
"longitude": -123.1207,
"expert_agent": "default",
"citation_urls": [
"https://www.example.com/help/reset-password"
],
"billable": true,
"moderated_hate": "Safe",
"moderated_selfharm": "Safe",
"moderated_sexual": "Safe",
"moderated_violence": "Safe",
"completeness": "Full",
"sentiment": "Neutral",
"product": null,
"class_custom1": false,
"class_custom2": null,
"class_custom3": null,
"class_custom4": null,
"class_custom5": null,
"user_rating": "Good",
"question_type": null,
"error_code": null,
"needs_review": false
}
]
}
Records are returned in descending order by date_time (newest first).
Each record in data can include the following fields:
| Field | Description |
|---|---|
account_id |
Account ID for the record |
service_id |
Service ID for the record |
partition_id |
Internal partition key, usually <account_id>_<service_id> |
date_time |
Timestamp of the record in ISO 8601 format |
browser_url |
Page URL where the conversation originated |
session_id |
Session ID for the visitor session |
user_id |
Optional external user identifier, if configured and captured |
thread_id |
Conversation thread ID |
previous_thread_id |
Previous thread ID when a thread continues from an earlier one |
opening_question |
The first question asked in the thread |
lang |
Browser or conversation language |
thread_concluded |
Whether the thread was concluded |
thread_chat_history |
Raw chat history for the thread |
full_chat_history |
Full multi-thread chat history when available |
city |
Detected city of the user |
region |
Detected region or state |
country |
Detected country |
latitude |
Latitude of detected location |
longitude |
Longitude of detected location |
expert_agent |
Specialist agent that handled the conversation |
citation_urls |
URLs cited in the AI answer |
billable |
Whether the interaction counted as billable |
moderated_hate |
Hate-safety moderation result |
moderated_selfharm |
Self-harm moderation result |
moderated_sexual |
Sexual-content moderation result |
moderated_violence |
Violence moderation result |
completeness |
Whether the answer was complete, partial, or unanswered |
sentiment |
Detected user sentiment |
product |
Product associated with the conversation, when available |
class_custom1 to class_custom5 |
Internal custom classification fields |
user_rating |
User feedback such as thumbs up or thumbs down |
question_type |
Optional classified question type |
error_code |
Internal error code, if an error occurred |
needs_review |
Whether the interaction has been flagged for review |
| Status | Meaning |
|---|---|
400 Bad Request |
A date parameter is invalid. Use YYYY-MM-DD |
401 Unauthorized |
The api-key header is missing or invalid |
403 Forbidden |
The Insights API is not enabled for this service |
404 Not Found |
The account/service combination was not found |
500 Internal Server Error |
Airgentic could not retrieve the records |
null values for fields that were added after the conversation took place.