Every API here is available over the APIs.io API and to AI agents over MCP.
openapi: 3.2.0
info:
title: MikMak Insights Custom Reports API
description: '
## Introduction
An API for querying reports and report-related data. A set of API credentials is tied to one account; each request
to the API will return data specific to that account.'
version: 1.0.0
servers:
- url: https://api.mikmak.ai
description: Base URL declared by the provider in apis.yml (roadmap#122).
tags:
- name: Custom Reports
paths:
/reporting/v1/custom_report_fields:
post:
tags:
- Custom Reports
summary: Retrieve dimensions and metrics
description: Returns eligible dimensions and metrics for the current selection. Which dimensions are eligible also depends on metric compatibility rules (e.g. Commerce Loads excludes many catalog and shopper dimensions that remain available with Purchase Intent Clicks alone). Set fieldDetails to 'yes' to include tooltip and category on each dimension and metric value; omit fieldDetails for a lighter response (label, code, and startDate when configured). When fieldDetails is 'yes', pass startDate to conditionally append metric/dimension availability warnings in tooltips (only when the range starts before the field's startDate).
operationId: custom_report_fields_reporting_v1_custom_report_fields_post
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CustomReportFieldsRequestBody'
examples:
report_fields_success:
summary: Get Report Fields Success Example
description: 'Retrieve a list of eligible dimensions and metrics to run a report. '
value:
currency: USD
fieldDetails: 'yes'
metrics:
- purchaseIntentClicks
dimensions:
- country
filters:
- commerceType
- retailer
report_fields_failure:
summary: Get Report Fields Failure Example
description: 'Retrieve a list of eligible dimensions and metrics to run a report. '
value:
currency: USD
metrics:
- ctaView
- purchaseIntentClicks
dimensions:
- country
filters:
- commerceType
- retailer
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ReportFieldsResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- authorization: []
- x-api-key: []
/reporting/v1/custom_report_filters:
post:
tags:
- Custom Reports
summary: Retrieve filters
description: This endpoint retrieves filters and valid filter values based on selected date range, dimensions, metrics and filters. The same rules as custom_report apply for choosing the backend data source from row dimensions, metrics, and dimension keys in the filters map; incompatible combinations return 422. The response includes base filter dimensions only.
operationId: custom_report_filters_reporting_v1_custom_report_filters_post
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CustomReportFacetsRequestBody'
examples:
country:
summary: Get Filters Example
description: Retrieve a list of filters available for generating country-specific reports for January 2025, focusing on CTA View, Commerce Load, and Purchase Intent Click metrics. The returned filters are specifically limited to those related to Brand.com experiences, allowing for targeted and relevant report customization
value:
startDate: '2025-01-01'
endDate: '2025-01-31'
metrics:
- ctaView
- commerceLoads
- purchaseIntentClicks
dimensions:
- country
filters:
commerceType:
includes:
- ST
currency: USD
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ReportFiltersResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- authorization: []
- x-api-key: []
/reporting/v1/custom_report_advanced_filters:
post:
tags:
- Custom Reports
summary: Retrieve advanced filter metadata
description: 'This endpoint is called when the UI initializes the advanced filter component for the Custom Report Builder. It returns dimension and metric metadata (name, displayName, operators, dataType) without filter values. Each operators item has code (same keys as the custom_report filters map: includes, excludes, contains, notContains for dimensions; isHigherThan, isLowerThan for metrics) and label (UI text). It does not require a filters section in the request body. The date dimension is not returned. Coded dimensions (e.g. commerceExperience, country, commerceType, standardSource, standardMedium, utmMarketingTactic) expose only includes and excludes. Product category name, product line, and product range use equality-style filtering in the data source and also expose only includes and excludes (not contains / does not contain). utmSource, utmMedium, and other non-coded dimensions expose all four dimension operators. If any requested metric is invalid or unavailable, the metrics array in the response is empty.'
operationId: custom_report_advanced_filters_reporting_v1_custom_report_advanced_filters_post
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CustomReportAdvancedFiltersRequestBody'
examples:
advanced_filters:
summary: Get advanced filters example
description: Initialize advanced filter component with dimensions and metrics; no filters section required.
value:
metrics:
- ctaView
- commerceLoads
- purchaseIntentClicks
dimensions:
- country
currency: USD
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ReportAdvancedFiltersResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- authorization: []
- x-api-key: []
/reporting/v1/custom_report_single_filter:
post:
tags:
- Custom Reports
summary: Retrieve filter values for a single dimension
description: Returns all possible filter values for a single dimension across a date range. Uses the same response structure as the custom_report_filters endpoint (a `filters` object with one dimension). By design, this endpoint ignores other filters and does not guarantee a non-empty intersection; it is intended for the Advanced Filter component when using Is or Is Not operators. Lighter and more scalable than the full custom_report_filters endpoint.
operationId: custom_report_single_filter_reporting_v1_custom_report_single_filter_post
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CustomReportSingleFilterRequestBody'
examples:
country:
summary: Get single filter (country) example
description: Retrieve all country filter values for the account in January 2025.
value:
startDate: '2025-01-01'
endDate: '2025-01-31'
filter: country
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ReportFiltersResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- authorization: []
- x-api-key: []
/reporting/v1/custom_report:
post:
tags:
- Custom Reports
summary: Retrieve custom report
description: This endpoint retrieves a custom report based on selected date range, dimensions, metrics and filters. The report is paginated and must be passed a count and offset. The maximum number of records that can be returned on one page is 5000. The report is sorted by the provided sortBy and sortDir parameters. **Backend data source:** the backend selects a dataset that supports all row dimensions, all metrics, and every dimension key present in the filters map (including advanced filters); if no single dataset can satisfy that combination, the API returns 422. **Filters map:** most string dimensions support includes, excludes, contains, and notContains. Product category name, product line, and product range support only includes and excludes (requests with contains or notContains on those dimensions return 422). Metric keys may use isHigherThan (inclusive lower bound, SQL >=) and/or isLowerThan (inclusive upper bound, SQL <=); these apply **after aggregation** (HAVING). Numeric bounds are truncated to six decimal places; at most one metric per request may use numeric filters. Advanced-only dimensions (e.g. utmPlacement) in the filters map require useAdvancedFilters=true, same as for custom_report_fields.
operationId: custom_report_reporting_v1_custom_report_post
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CustomReportPaginatedRequestBody'
examples:
country:
summary: Get Filters Example
description: Runs a by country by date report for January 2025, focusing on CTA View, Commerce Load, and Purchase Intent Click metrics. The report is sorted by CTA View in descending order and paginated to return the first 5000 records. The report is filtered to only include data from the Brand.com (ST) commerce type.
value:
startDate: '2025-01-01'
endDate: '2025-01-31'
metrics:
- ctaView
- commerceLoads
- purchaseIntentClicks
dimensions:
- date
- country
filters:
commerceType:
includes:
- ST
currency: USD
sortBy: ctaView
sortDir: DESC
dateFreq: D
offset: 0
count: 5000
filters_join_or:
summary: Filters combined with OR
description: 'Same as country example but with filtersJoinOperator OR: top-level filter conditions are combined with OR instead of AND.'
metric_numeric_filter:
summary: Metric numeric filter (HAVING)
description: Same as country example, plus a post-aggregation lower bound on commerceLoads (>= 100).
value:
startDate: '2025-01-01'
endDate: '2025-01-31'
metrics:
- ctaView
- commerceLoads
- purchaseIntentClicks
dimensions:
- date
- country
filtersJoinOperator: OR
filters:
commerceType:
includes:
- ST
country:
includes:
- US
commerceLoads:
isHigherThan: 100
currency: USD
sortBy: ctaView
sortDir: DESC
dateFreq: D
offset: 0
count: 5000
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ReportPaginatedResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- authorization: []
- x-api-key: []
/reporting/v1/custom_report/export:
post:
tags:
- Custom Reports
summary: Export custom report
description: This endpoint exports a custom report based on selected date range, dimensions, metrics and filters. The report is sorted by the provided sortBy and sortDir parameters. Accepts the same filters map as custom_report (including optional metric isHigherThan / isLowerThan bounds) and the same backend table selection; incompatible combinations return 422.
operationId: custom_report_export_reporting_v1_custom_report_export_post
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CustomReportRequestBody'
examples:
example:
summary: Export Report Example
description: Exports a by country by date report for January 2025, focusing on CTA View, Commerce Load, and Purchase Intent Click metrics. The report is sorted by CTA View in descending order and is filtered to only include data from the Brand.com (ST) commerce type.
value:
startDate: '2025-01-01'
endDate: '2025-01-31'
metrics:
- ctaView
- commerceLoads
- purchaseIntentClicks
dimensions:
- date
- country
filters:
commerceType:
includes:
- ST
currency: USD
sortBy: ctaView
sortDir: DESC
dateFreq: D
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ExportResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- authorization: []
- x-api-key: []
components:
schemas:
ReportAdvancedFiltersResponse:
properties:
dimensions:
items:
$ref: '#/components/schemas/AdvancedFilterDimension'
type: array
title: Dimensions
metrics:
items:
$ref: '#/components/schemas/AdvancedFilterMetric'
type: array
title: Metrics
type: object
required:
- dimensions
- metrics
title: ReportAdvancedFiltersResponse
description: 'Response for advanced filter component: dimensions and metrics with operators, no filter values.'
ObjectIdFilters:
additionalProperties: false
description: Filter by MongoDB ObjectId strings (24-character hex).
properties:
includes:
description: Include rows where the dimension matches any of these 24-character hex ObjectId strings (IN).
items:
type: string
title: Includes
type: array
excludes:
description: Exclude rows where the dimension matches any of these 24-character hex ObjectId strings (NOT IN).
items:
type: string
title: Excludes
type: array
title: ObjectIdFilters
type: object
CustomReportFacetsRequestBody:
properties:
dimensions:
items:
$ref: '#/components/schemas/Dimensions'
type: array
title: Dimensions
metrics:
items:
$ref: '#/components/schemas/Metrics'
type: array
title: Metrics
filters:
properties:
alternateProductName:
anyOf:
- $ref: '#/components/schemas/StrFilters'
- type: 'null'
description: Alternate Product Name filter. Alternate product name from the Catalog.
brandEntity:
anyOf:
- $ref: '#/components/schemas/StrFilters'
- type: 'null'
description: Reporting Brand filter. The Brand Entity associated with MikMak metrics.
commerceType:
anyOf:
- $ref: '#/components/schemas/CommerceTypeFilters'
- type: 'null'
description: Commerce Type filter. Type of MikMak Commerce Experience (Brand.com, Media, etc.)
country:
anyOf:
- $ref: '#/components/schemas/CountryFilters'
- type: 'null'
description: Country filter. Geographic country associated with the Commerce Experience.
deviceType:
anyOf:
- $ref: '#/components/schemas/CodedStrFilters'
- type: 'null'
description: Device Type filter. The category of the visitor's hardware (Desktop, Mobile, Tablet, or Others), detected via the user agent associated with the metric.
domainUrl:
anyOf:
- $ref: '#/components/schemas/StrFilters'
- type: 'null'
description: Domain URL filter. The web domain associated with the metric.
experience:
anyOf:
- $ref: '#/components/schemas/ObjectIdFilters'
- type: 'null'
description: Commerce Experience filter. Name of the Commerce Experience.
isBundle:
anyOf:
- $ref: '#/components/schemas/CodedStrFilters'
- type: 'null'
description: Bundle filter. Whether the metric is tied to a bundle of products.
modelName:
anyOf:
- $ref: '#/components/schemas/StrFilters'
- type: 'null'
description: Model Name filter. Model name from the Catalog.
mpn:
anyOf:
- $ref: '#/components/schemas/StrFilters'
- type: 'null'
description: MPN filter. Manufacturer Part Number of the catalog product in the Commerce Experience.
pageUrl:
anyOf:
- $ref: '#/components/schemas/StrFilters'
- type: 'null'
description: Page URL filter. The web page associated with the metric.
productBrandName:
anyOf:
- $ref: '#/components/schemas/StrFilters'
- type: 'null'
description: Product Brand Name filter. Brand of the catalog product in the Commerce Experience.
productCategoryName:
anyOf:
- $ref: '#/components/schemas/CodedStrFilters'
- type: 'null'
description: Product Category Name filter. Category of the catalog product in the Commerce Experience.
productCustomCategory:
anyOf:
- $ref: '#/components/schemas/StrFilters'
- type: 'null'
description: Product Custom Category filter. Custom category of the catalog product in the Commerce Experience.
productCustomSubcategory1:
anyOf:
- $ref: '#/components/schemas/StrFilters'
- type: 'null'
description: Product Custom Subcategory 1 filter. Custom subcategory (level 1) of the catalog product in the Commerce Experience.
productCustomSubcategory2:
anyOf:
- $ref: '#/components/schemas/StrFilters'
- type: 'null'
description: Product Custom Subcategory 2 filter. Custom subcategory (level 2) of the catalog product in the Commerce Experience.
productCustomSubcategory3:
anyOf:
- $ref: '#/components/schemas/StrFilters'
- type: 'null'
description: Product Custom Subcategory 3 filter. Custom subcategory (level 3) of the catalog product in the Commerce Experience.
productCustomSubcategory4:
anyOf:
- $ref: '#/components/schemas/StrFilters'
- type: 'null'
description: Product Custom Subcategory 4 filter. Custom subcategory (level 4) of the catalog product in the Commerce Experience.
productLine:
anyOf:
- $ref: '#/components/schemas/CodedStrFilters'
- type: 'null'
description: Product Line filter. Line of the catalog product in the Commerce Experience.
productName:
anyOf:
- $ref: '#/components/schemas/StrFilters'
- type: 'null'
description: Product Name filter. Name of the catalog product in the Commerce Experience.
productRange:
anyOf:
- $ref: '#/components/schemas/CodedStrFilters'
- type: 'null'
description: Product Range filter. Range of the catalog product in the Commerce Experience.
retailer:
anyOf:
- $ref: '#/components/schemas/StrFilters'
- type: 'null'
description: Retailer Name filter. Name of the online or offline retailer associated with a click or transaction.
shopperCity:
anyOf:
- $ref: '#/components/schemas/StrFilters'
- type: 'null'
description: Shopper City filter. The city, town, or municipality where the shopper was located during the session.
shopperCountry:
anyOf:
- $ref: '#/components/schemas/CountryFilters'
- type: 'null'
description: Shopper Country filter. The country where the shopper was located during the session.
shopperRegion:
anyOf:
- $ref: '#/components/schemas/StrFilters'
- type: 'null'
description: Shopper Region filter. The primary administrative division (e.g., State, Province, or Region, dependent on the country) where the shopper was located during the session.
shopperZipCode:
anyOf:
- $ref: '#/components/schemas/StrFilters'
- type: 'null'
description: Shopper Zip Code filter. The local postal code or ZIP code associated with the shopper's location.
standardMedium:
anyOf:
- $ref: '#/components/schemas/CodedStrFilters'
- type: 'null'
description: Standard Medium filter. The categorized version of the utm_medium parameter, mapping various raw values into a standardized set of marketing mediums.
standardSource:
anyOf:
- $ref: '#/components/schemas/CodedStrFilters'
- type: 'null'
description: Standard Source filter. The categorized version of the utm_source parameter, mapping various raw values into a standardized set of traffic sources.
subaccountId:
anyOf:
- $ref: '#/components/schemas/ObjectIdFilters'
- type: 'null'
description: Subaccount filter. MikMak subaccount that contains the Experience associated with the metric.
utmAdId:
anyOf:
- $ref: '#/components/schemas/StrFilters'
- type: 'null'
description: Ad ID (utm) filter. Value of the utm_adid parameter, if present, in the URL associated with the metric.
utmAdvertiserId:
anyOf:
- $ref: '#/components/schemas/StrFilters'
- type: 'null'
description: Advertiser ID (utm) filter. Value of the utm_advertiserid parameter, if present, in the URL associated with the metric.
utmBu:
anyOf:
- $ref: '#/components/schemas/StrFilters'
- type: 'null'
description: Business Unit (utm) filter. Value of the utm_bu parameter, if present, in the URL associated with the metric.
utmCampaign:
anyOf:
- $ref: '#/components/schemas/StrFilters'
- type: 'null'
description: Campaign (utm) filter. Value of the utm_campaign parameter, if present, in the URL associated with the metric.
utmClicktype:
anyOf:
- $ref: '#/components/schemas/StrFilters'
- type: 'null'
description: Click Type (utm) filter. Value of the utm_clicktype parameter, if present, in the URL associated with the metric.
utmConfig:
anyOf:
- $ref: '#/components/schemas/StrFilters'
- type: 'null'
description: Config (utm) filter. Value of the utm_config parameter, if present, in the URL associated with the metric.
utmContent:
anyOf:
- $ref: '#/components/schemas/StrFilters'
- type: 'null'
description: Content (utm) filter. Value of the utm_content parameter, if present, in the URL associated with the metric.
utmCreativeFormat:
anyOf:
- $ref: '#/components/schemas/StrFilters'
- type: 'null'
description: Creative Format (utm) filter. Value of the utm_creative_format parameter, if present, in the URL associated with the metric.
utmCreativeid:
anyOf:
- $ref: '#/components/schemas/StrFilters'
- type: 'null'
description: Creative ID (utm) filter. Value of the utm_creativeid parameter, if present, in the URL associated with the metric.
utmFormat:
anyOf:
- $ref: '#/components/schemas/StrFilters'
- type: 'null'
description: Format (utm) filter. Value of the utm_format parameter, if present, in the URL associated with the metric.
utmId:
anyOf:
- $ref: '#/components/schemas/StrFilters'
- type: 'null'
description: ID (utm) filter. Value of the utm_id parameter, if present, in the URL associated with the metric.
utmMarketingTactic:
anyOf:
- $ref: '#/components/schemas/CodedStrFilters'
- type: 'null'
description: Marketing Tactic filter. This dimension can be awareness, consideration, or conversion, depending on the presence of these strings in the URL associated with the metric.
utmMedium:
anyOf:
- $ref: '#/components/schemas/StrFilters'
- type: 'null'
description: Medium (utm) filter. Value of the utm_medium parameter, if present, in the URL associated with the metric.
utmPlacement:
anyOf:
- $ref: '#/components/schemas/StrFilters'
- type: 'null'
description: Placement (utm) filter. Value of the utm_placement parameter, if present, in the URL associated with the metric.
utmPlacementId:
anyOf:
- $ref: '#/components/schemas/StrFilters'
- type: 'null'
description: Placement ID (utm) filter. Value of the utm_placementid parameter, if present, in the URL associated with the metric.
utmSource:
anyOf:
- $ref: '#/components/schemas/StrFilters'
- type: 'null'
description: Source (utm) filter. Value of the utm_source parameter, if present, in the URL associated with the metric.
utmSourcePlatform:
anyOf:
- $ref: '#/components/schemas/StrFilters'
- type: 'null'
description: Source Platform (utm) filter. Value of the utm_source_platform parameter, if present, in the URL associated with the metric.
utmTerm:
anyOf:
- $ref: '#/components/schemas/StrFilters'
- type: 'null'
description: Term (utm) filter. Value of the utm_term parameter, if present, in the URL associated with the metric.
utmVariant:
anyOf:
- $ref: '#/components/schemas/StrFilters'
- type: 'null'
description: Variant (utm) filter. Value of the utm_variant parameter, if present, in the URL associated with the metric.
auraAdSpend:
anyOf:
- $ref: '#/components/schemas/MetricNumericFilterRule'
- type: 'null'
description: Post-aggregation numeric bounds for auraAdSpend (is_higher_than / is_lower_than). At most one metric may use numeric filters per request; the metric must also be listed in 'metrics'.
auraIncrementalContribution:
anyOf:
- $ref: '#/components/schemas/MetricNumericFilterRule'
- type: 'null'
description: Post-aggregation numeric bounds for auraIncrementalContribution (is_higher_than / is_lower_than). At most one metric may use numeric filters per request; the metric must also be listed in 'metrics'.
averageClickPrice:
anyOf:
- $ref: '#/components/schemas/MetricNumericFilterRule'
- type: 'null'
description: Post-aggregation numeric bounds for averageClickPrice (is_higher_than / is_lower_than). At most one metric may use numeric filters per request; the metric must also be listed in 'metrics'.
commerceLoadSessions:
anyOf:
- $ref: '#/components/schemas/MetricNumericFilterRule'
- type: 'null'
description: Post-aggregation numeric bounds for commerceLoadSessions (is_higher_than / is_lower_than). At most one metric may use numeric filters per request; the metric must also be listed in 'metrics'.
commerceLoads:
anyOf:
- $ref: '#/components/schemas/MetricNumericFilterRule'
- type: 'null'
description: Post-aggregation numeric bounds for commerceLoads (is_higher_than / is_lower_than). At most one metric may use numeric filters per request; the metric must also be listed in 'metrics'.
ctaView:
anyOf:
- $ref: '#/components/schemas/MetricNumericFilterRule'
- type: 'null'
description: Post-aggregation numeric bounds for ctaView (is_higher_than / is_lower_than). At most one metric may use numeric filters per request; the metric must also be listed in 'metrics'.
ctaViewSessions:
anyOf:
- $ref: '#/components/schemas/MetricNumericFilterRule'
- type: 'null'
description: Post-aggregation numeric bounds for ctaViewSessions (is_higher_than / is_lower_than). At most one metric may use numeric filters per request; the metric must also be listed in 'metrics'.
maxAuraRoas:
anyOf:
- $ref: '#/components/schemas/MetricNumericFilterRule'
- type: 'null'
description: Post-aggregation numeric bounds for maxAuraRoas (is_higher_than / is_lower_than). At most one metric may
# --- truncated at 32 KB (148 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/mikmak/refs/heads/main/openapi/mikmak-custom-reports-api-openapi.yml