data_query
Run a data query against a connected marketing platform.
Use discovery tools first to get valid values for ds_id, accounts, fields, and settings.
Most parameters depend on the source configuration from data_source_discovery.
Returns a schedule_id — pass to get_async_query_results immediately.
get_async_query_results
Retrieve results from a data_query using its schedule_id.
Call immediately after data_query returns. Keep polling until status is 'completed' or failed.
data_source_discovery
Discover available data sources or get a specific source's configuration.
Without ds_id: lists all sources with IDs and auth status.
With ds_id: returns full config — always call with ds_id after picking a source.
CONFIG RESPONSE (ds_id provided):
- has_account_list: whether accounts_discovery is needed
- has_fields: whether field_discovery is needed
- has_report_type_selection: whether a report type should be selected
- is_date_range_required: whether date range is needed for queries
- report_types: available report types with their specific settings
- report_types[].is_free_text_account_required: if true, a free-text identifier is needed
(e.g. page alias, URL, profile name) — pass as ds_accounts in data_query
- common_settings: settings that apply to all queries for this data source
- account_labels: how accounts are labeled for this data source
accounts_discovery
Discover connected accounts for a data source.
Only call if data_source_discovery config shows has_account_list=true.
RETURNS: account_id, account_name, group_name, ds_user, ds_user_display_name
field_discovery
Discover available fields (metrics and dimensions) for a data source.
Only call if data_source_discovery config shows has_fields=true.
If has_report_type_selection=true, each field belongs to one or more report types.
All fields in a single data query must share a common report type.
RETURNS: metrics, dimensions, monetary_fields, currency_fields.
When querying monetary fields, include a currency field to know the currency.
get_today
Get current UTC date and time. Use before data_query with custom date ranges
to resolve relative date references (e.g. "last month") into specific dates.
user_info
Retrieve authenticated user information from Supermetrics.
USE WHEN:
- Need to get user profile information
- Want to check team details and permissions
- Need to verify license information
- Validate authentication and user context
PARAMETERS:
- None required (uses authentication token)
RETURNS:
- User profile (name, email, user_id)
- Team information (team_id, company_name, etc.)
- User permissions within the team
- License information (license_id, status, dates, etc.)
- Product information (code, title, logo)
AUTHENTICATION:
- Requires valid user authentication token (starting with 'otok_')
- API keys (starting with 'api_') are NOT supported for this endpoint
contact_supermetrics
Send product feedback or create a support ticket with Supermetrics.
When creating a support ticket, include any information that is relevant for solving it,
eg. what was the user intention, which tools were used, what were the relevant trace IDs.
Only create a support ticket when explicitly authorized by the user.