curl --request POST \
--url https://api.aisa.one/apis/v1/apollo/reports/sync_report \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"date_ranges": [
{
"modality": "custom_range"
}
],
"filters": {
"smart_datetime_range": {
"max": "2024-03-31",
"min": "2024-01-01"
}
},
"group_by": [
{
"name": "smart_user_id"
}
],
"group_by_totals_selected": true,
"metrics": [
{
"smart_datetime_reference": "activity_datetime",
"smart_user_id_reference": "user_id",
"value": "num_phone_calls"
},
{
"smart_datetime_reference": "activity_datetime",
"smart_user_id_reference": "user_id",
"value": "num_phone_calls_connect"
},
{
"smart_datetime_reference": "activity_datetime",
"smart_user_id_reference": "user_id",
"value": "percent_phone_calls_connect"
}
],
"pivot_group_by_totals_selected": false,
"sorts": []
}
'{
"report": {}
}Query Analytics Report
Run an analytics report and get its rows back.
curl --request POST \
--url https://api.aisa.one/apis/v1/apollo/reports/sync_report \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"date_ranges": [
{
"modality": "custom_range"
}
],
"filters": {
"smart_datetime_range": {
"max": "2024-03-31",
"min": "2024-01-01"
}
},
"group_by": [
{
"name": "smart_user_id"
}
],
"group_by_totals_selected": true,
"metrics": [
{
"smart_datetime_reference": "activity_datetime",
"smart_user_id_reference": "user_id",
"value": "num_phone_calls"
},
{
"smart_datetime_reference": "activity_datetime",
"smart_user_id_reference": "user_id",
"value": "num_phone_calls_connect"
},
{
"smart_datetime_reference": "activity_datetime",
"smart_user_id_reference": "user_id",
"value": "percent_phone_calls_connect"
}
],
"pivot_group_by_totals_selected": false,
"sorts": []
}
'{
"report": {}
}https://mcp.aisa.one/mcp — Claude
Code, Codex, Cursor, VS Code and the rest. Authorization is OAuth: the client
opens a browser, you click Allow once, and there is no key to paste. Your
agent then reaches every endpoint through a few meta tools: search,
list_categories, get_details and batch_quote are free, batch_use is
billed per call. Setup per client is in
Connect via MCP; the live tool list and what each call
costs are on aisa.one/mcp.Request contract
- Method and path: POST /apis/v1/apollo/reports/sync_report
- Availability: enabled
- Request URL template: https://api.aisa.one/apis/v1/apollo/reports/sync_report
- Runtime facts: 9ab7612cf2d53be794cbf1d65d4a257f986ac6783e53c7c3a5d868e4593061c3
{
"operationId": "post_apollo_reports_sync_report",
"method": "POST",
"path": "/apis/v1/apollo/reports/sync_report",
"servers": [
{
"url": "https://api.aisa.one"
}
],
"parameters": [],
"security": [
{
"bearerAuth": []
}
],
"requestBody": {
"content": {
"application/json": {
"examples": {
"Custom date range — call activity for Q1": {
"value": {
"date_ranges": [
{
"modality": "custom_range"
}
],
"filters": {
"smart_datetime_range": {
"max": "2024-03-31",
"min": "2024-01-01"
}
},
"group_by": [
{
"name": "smart_user_id"
}
],
"group_by_totals_selected": true,
"metrics": [
{
"smart_datetime_reference": "activity_datetime",
"smart_user_id_reference": "user_id",
"value": "num_phone_calls"
},
{
"smart_datetime_reference": "activity_datetime",
"smart_user_id_reference": "user_id",
"value": "num_phone_calls_connect"
},
{
"smart_datetime_reference": "activity_datetime",
"smart_user_id_reference": "user_id",
"value": "percent_phone_calls_connect"
}
],
"pivot_group_by": [],
"pivot_group_by_totals_selected": false,
"sorts": []
}
},
"Flat totals — email performance": {
"value": {
"date_ranges": [
{
"modality": "last_30_days"
}
],
"filters": {},
"group_by": [],
"group_by_totals_selected": false,
"metrics": [
{
"smart_datetime_reference": "activity_datetime",
"smart_user_id_reference": "user_id",
"value": "num_emails_sent"
},
{
"smart_datetime_reference": "activity_datetime",
"smart_user_id_reference": "user_id",
"value": "num_emails_opened"
},
{
"smart_datetime_reference": "activity_datetime",
"smart_user_id_reference": "user_id",
"value": "percent_emails_opened_tracked"
}
],
"pivot_group_by": [],
"pivot_group_by_totals_selected": false,
"sorts": []
}
},
"Grouped — email activity by user": {
"value": {
"date_ranges": [
{
"modality": "current_month"
}
],
"filters": {},
"group_by": [
{
"name": "smart_user_id"
}
],
"group_by_totals_selected": true,
"metrics": [
{
"smart_datetime_reference": "activity_datetime",
"smart_user_id_reference": "user_id",
"value": "num_emails_sent"
},
{
"smart_datetime_reference": "activity_datetime",
"smart_user_id_reference": "user_id",
"value": "num_emails_replied"
},
{
"smart_datetime_reference": "activity_datetime",
"smart_user_id_reference": "user_id",
"value": "percent_emails_replied"
}
],
"pivot_group_by": [],
"pivot_group_by_totals_selected": false,
"sorts": [
{
"asc": false,
"metric": {
"smart_datetime_reference": "activity_datetime",
"smart_user_id_reference": "user_id",
"value": "num_emails_sent"
}
}
]
}
},
"Grouped — email volume by month": {
"value": {
"date_ranges": [
{
"modality": "last_12_months"
}
],
"filters": {},
"group_by": [
{
"name": "smart_datetime_month"
}
],
"group_by_totals_selected": false,
"metrics": [
{
"smart_datetime_reference": "activity_datetime",
"smart_user_id_reference": "user_id",
"value": "num_emails_sent"
}
],
"pivot_group_by": [],
"pivot_group_by_totals_selected": false,
"sorts": []
}
},
"Pivot — emails sent by user x contact stage": {
"value": {
"date_ranges": [
{
"modality": "last_30_days"
}
],
"filters": {},
"group_by": [
{
"name": "smart_user_id"
}
],
"group_by_totals_selected": true,
"metrics": [
{
"smart_datetime_reference": "activity_datetime",
"smart_user_id_reference": "user_id",
"value": "num_emails_sent"
}
],
"pivot_group_by": [
{
"name": "contact_stage_id"
}
],
"pivot_group_by_totals_selected": true,
"sorts": []
}
},
"Sorted — top 5 reps by reply rate": {
"value": {
"date_ranges": [
{
"modality": "current_quarter"
}
],
"filters": {},
"group_by": [
{
"limit": 5,
"name": "smart_user_id"
}
],
"group_by_totals_selected": false,
"metrics": [
{
"smart_datetime_reference": "activity_datetime",
"smart_user_id_reference": "user_id",
"value": "num_emails_sent"
},
{
"smart_datetime_reference": "activity_datetime",
"smart_user_id_reference": "user_id",
"value": "num_emails_replied"
},
{
"smart_datetime_reference": "activity_datetime",
"smart_user_id_reference": "user_id",
"value": "percent_emails_replied"
}
],
"pivot_group_by": [],
"pivot_group_by_totals_selected": false,
"sorts": [
{
"asc": false,
"metric": {
"smart_datetime_reference": "activity_datetime",
"smart_user_id_reference": "user_id",
"value": "percent_emails_replied"
}
}
]
}
}
},
"schema": {
"properties": {
"date_ranges": {
"description": "The time window for the query. Provide one object with a <code>modality</code> preset. For a custom date range, set <code>modality</code> to <code>custom_range</code> and add a <code>smart_datetime_range</code> key in <code>filters</code> with <code>{\"min\": \"YYYY-MM-DD\", \"max\": \"YYYY-MM-DD\"}</code>.",
"items": {
"properties": {
"modality": {
"description": "Date range preset. Valid values: <code>today</code>, <code>yesterday</code>, <code>current_week</code>, <code>current_month</code>, <code>current_quarter</code>, <code>current_year</code>, <code>last_7_days</code>, <code>last_2_weeks</code>, <code>last_30_days</code>, <code>last_3_months</code>, <code>last_6_months</code>, <code>last_12_months</code>, <code>last_4_quarters</code>, <code>last_2_years</code>, <code>previous_week</code>, <code>previous_month</code>, <code>previous_quarter</code>, <code>previous_year</code>, <code>all_time</code>, <code>custom_range</code> (requires <code>smart_datetime_range</code> in <code>filters</code>).",
"type": "string"
}
},
"required": [
"modality"
],
"type": "object"
},
"maxItems": 1,
"type": "array"
},
"filters": {
"additionalProperties": true,
"description": "Key/value filter map to narrow the result set. Pass an empty object <code>{}</code> for no filters. Common filter keys are documented in the <code>properties</code> below; additional dimension-based filters may also be passed using the same key names as <code>group_by[].name</code> values. Refer to the <a href=\"https://docs.apollo.io/reference/sync-report-metrics\" target=\"_blank\">Metrics and Dimensions Reference</a> for a complete list.",
"properties": {
"account_stage_ids": {
"description": "Filter to specific account stage IDs.",
"items": {
"type": "string"
},
"type": "array"
},
"contact_stage_ids": {
"description": "Filter to specific contact stage IDs.",
"items": {
"type": "string"
},
"type": "array"
},
"email_account_ids": {
"description": "Filter to specific sender mailbox IDs.",
"items": {
"type": "string"
},
"type": "array"
},
"emailer_campaign_ids": {
"description": "Filter to specific sequence IDs.",
"items": {
"type": "string"
},
"type": "array"
},
"opportunity_stage_ids": {
"description": "Filter to specific opportunity stage IDs.",
"items": {
"type": "string"
},
"type": "array"
},
"smart_datetime_range": {
"description": "Required when <code>date_ranges[].modality</code> is <code>custom_range</code>. Specifies the exact date window as ISO 8601 date strings.",
"properties": {
"max": {
"description": "End date (inclusive). Format: <code>YYYY-MM-DD</code>. <br><br>Example: <code>2024-03-31</code>",
"type": "string"
},
"min": {
"description": "Start date (inclusive). Format: <code>YYYY-MM-DD</code>. <br><br>Example: <code>2024-01-01</code>",
"type": "string"
}
},
"required": [
"min",
"max"
],
"type": "object"
},
"smart_subteam_id": {
"description": "Filter to specific sub-team IDs.",
"items": {
"type": "string"
},
"type": "array"
},
"smart_user_id": {
"description": "Filter to specific team member IDs. Use <code>\"current\"</code> for the authenticated user. <br><br>Example: <code>[\"current\"]</code>",
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
},
"group_by": {
"description": "The dimension to group results by (row dimension). Pass one object to break results down by that dimension. Pass an empty array <code>[]</code> for flat totals with no grouping. <br><br>Only one entry is supported. Refer to the <a href=\"https://docs.apollo.io/reference/sync-report-metrics\" target=\"_blank\">Metrics and Dimensions Reference</a> for valid dimension names.",
"items": {
"properties": {
"limit": {
"description": "Maximum number of dimension values to return.",
"type": "integer"
},
"name": {
"description": "The dimension name. <br><br>Example: <code>smart_user_id</code>",
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
},
"maxItems": 1,
"type": "array"
},
"group_by_totals_selected": {
"description": "When <code>true</code>, the response includes an aggregated totals row in addition to the per-dimension-value rows.",
"type": "boolean"
},
"metrics": {
"description": "The metrics to query. Each object specifies which metric to measure and which date and user columns the engine should use for that metric. The <code>smart_datetime_reference</code> and <code>smart_user_id_reference</code> values are metric-specific — using the wrong values will return no data. Refer to the <a href=\"https://docs.apollo.io/reference/sync-report-metrics\" target=\"_blank\">Metrics and Dimensions Reference</a> for valid metric names and the correct reference fields for each. <br><br>Pass an empty array <code>[]</code> to return a response with no metric columns.",
"items": {
"properties": {
"display_name": {
"description": "Optional label override for this metric's column in the response.",
"type": "string"
},
"smart_datetime_reference": {
"description": "The date column name to use for this metric time range. Valid values depend on the metric. See the smart reference field values table for supported values by metric type. Unsupported values may cause the related date or user filter not to apply. <br><br>Example: <code>activity_datetime</code>",
"type": "string"
},
"smart_user_id_reference": {
"description": "The user column name that filters per user. Many metrics use <code>user_id</code>. See the smart reference field values table for supported values by metric family. Unsupported values may cause the related date or user filter not to apply. <br><br>Example: <code>user_id</code>",
"type": "string"
},
"value": {
"description": "The metric identifier. For built-in metrics, use the metric name (e.g. <code>num_emails_sent</code>). For team-defined custom metrics, use the format <code>custom_metric_{id}</code> where <code>{id}</code> is the custom metric's id.",
"type": "string"
}
},
"required": [
"value",
"smart_datetime_reference",
"smart_user_id_reference"
],
"type": "object"
},
"type": "array"
},
"min_ratio_denominator": {
"default": 0,
"description": "Minimum denominator threshold for ratio metrics. Rows where the denominator falls below this value are excluded from ratio calculations.",
"type": "integer"
},
"pivot_group_by": {
"description": "The dimension to pivot on (column dimension). Used together with <code>group_by</code> to produce a two-dimensional cross-tab table: <code>group_by</code> defines the row dimension and <code>pivot_group_by</code> defines the column dimension. Pass an empty array <code>[]</code> for non-pivot queries. <br><br>Only one entry is supported.",
"items": {
"properties": {
"limit": {
"description": "Maximum number of pivot column values to return.",
"type": "integer"
},
"name": {
"description": "The dimension name to pivot on. <br><br>Example: <code>emailer_campaign_id</code>",
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
},
"maxItems": 1,
"type": "array"
},
"pivot_group_by_totals_selected": {
"description": "When <code>true</code>, the pivot response includes an aggregated totals column in addition to the per-pivot-value columns.",
"type": "boolean"
},
"skip_group_by_values": {
"description": "Exclude specific dimension values from the result rows. Values must match the raw <code>key</code> field returned in bucket responses for the active <code>group_by</code> dimension (e.g. a contact stage ID string, a user ID string, or a date string for datetime dimensions). Maximum 500 entries.",
"items": {
"type": "string"
},
"maxItems": 500,
"type": "array"
},
"sorts": {
"description": "Sort order for the result rows. Only the first entry is applied. Pass an empty array <code>[]</code> to use the default order. <br><br>Sorting is supported by metric value — provide the <code>metric</code> field with the same structure as an entry in the <code>metrics</code> array. The <code>asc</code> field controls direction (<code>true</code> = ascending, <code>false</code> = descending). <br><br>Sorting by dimension value (e.g. alphabetically by user name) is not supported via the API.",
"items": {
"properties": {
"asc": {
"description": "Sort ascending (<code>true</code>) or descending (<code>false</code>).",
"type": "boolean"
},
"metric": {
"description": "Sort by a metric column. Provide the same structure as a metric entry in the <code>metrics</code> array.",
"properties": {
"smart_datetime_reference": {
"type": "string"
},
"smart_user_id_reference": {
"type": "string"
},
"value": {
"type": "string"
}
},
"type": "object"
}
},
"required": [
"asc"
],
"type": "object"
},
"type": "array"
}
},
"required": [
"metrics",
"group_by",
"sorts",
"filters",
"group_by_totals_selected",
"pivot_group_by_totals_selected",
"date_ranges"
],
"type": "object"
}
}
},
"required": true
},
"x-aisa-status": "enabled",
"x-aisa-pricing": {
"cost_contract": "fixed_success",
"customer_pricing": "fixed_success",
"default_request_estimate_usd": 0.012,
"estimate_source": "profile_seed",
"evidence_source": "request_snapshot"
},
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}
Cost and request rules
Published reference price: $0.012 USD per successful request. Account-specific pricing and final settlement may differ. Published reference values are not an account-specific quote or a settled charge. For endpoints supporting X-AISA-Cost-Mode: quote, obtain a free quote for your exact request before execution; reconcile the settled cost with response metadata and Usage Logs. USD amounts use 1,000,000 integer micro-USD per dollar.- Default request reference estimate (USD): 0.012
- Cost contract: fixed_success
- Settlement evidence source: request_snapshot
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
The time window for the query. Provide one object with a modality preset. For a custom date range, set modality to custom_range and add a smart_datetime_range key in filters with {"min": "YYYY-MM-DD", "max": "YYYY-MM-DD"}.
1Show child attributes
Show child attributes
Key/value filter map to narrow the result set. Pass an empty object {} for no filters. Common filter keys are documented in the properties below; additional dimension-based filters may also be passed using the same key names as group_by[].name values. Refer to the Metrics and Dimensions Reference for a complete list.
Show child attributes
Show child attributes
The dimension to group results by (row dimension). Pass one object to break results down by that dimension. Pass an empty array [] for flat totals with no grouping.
Only one entry is supported. Refer to the Metrics and Dimensions Reference for valid dimension names.
1Show child attributes
Show child attributes
When true, the response includes an aggregated totals row in addition to the per-dimension-value rows.
The metrics to query. Each object specifies which metric to measure and which date and user columns the engine should use for that metric. The smart_datetime_reference and smart_user_id_reference values are metric-specific — using the wrong values will return no data. Refer to the Metrics and Dimensions Reference for valid metric names and the correct reference fields for each.
Pass an empty array [] to return a response with no metric columns.
Show child attributes
Show child attributes
When true, the pivot response includes an aggregated totals column in addition to the per-pivot-value columns.
Sort order for the result rows. Only the first entry is applied. Pass an empty array [] to use the default order.
Sorting is supported by metric value — provide the metric field with the same structure as an entry in the metrics array. The asc field controls direction (true = ascending, false = descending).
Sorting by dimension value (e.g. alphabetically by user name) is not supported via the API.
Show child attributes
Show child attributes
Minimum denominator threshold for ratio metrics. Rows where the denominator falls below this value are excluded from ratio calculations.
The dimension to pivot on (column dimension). Used together with group_by to produce a two-dimensional cross-tab table: group_by defines the row dimension and pivot_group_by defines the column dimension. Pass an empty array [] for non-pivot queries.
Only one entry is supported.
1Show child attributes
Show child attributes
Exclude specific dimension values from the result rows. Values must match the raw key field returned in bucket responses for the active group_by dimension (e.g. a contact stage ID string, a user ID string, or a date string for datetime dimensions). Maximum 500 entries.
500Response
Successful response
Report result (shape depends on request).