Skip to main content
POST
Call analytics.query_metrics

Authorizations

Authorization
string
header
required

An API key minted at Settings › API & MCP. Send it as Authorization: Bearer <key>. A key carries its holder's own permissions, resolved on every call — revoking a membership closes the key's reach immediately. Keep it in an environment variable (GOOSY_API_KEY), never in a committed file.

Headers

x-request-id
string

Your own id for this request, echoed back and recorded on the audit trail. 1–128 characters from A–Z a–z 0–9 . _ : -, starting with a letter or digit; anything else is replaced by a generated id.

Maximum string length: 128

Body

application/json
metric_keys
enum<string>[]
required

Dictionary metric keys to read. Use analytics.list_available_metrics to discover them.

Required array length: 1 - 12 elements
Available options:
rev_leads,
rev_booked_calls,
rev_calls_showed,
rev_show_rate,
rev_sales_won,
rev_revenue_won,
rev_revenue_by_source,
rev_open_pipeline_value,
email_sent,
email_delivered,
email_delivery_rate,
email_opened,
email_open_rate,
email_clicked,
email_click_rate,
email_replied,
email_complaint_rate,
email_bounce_rate,
list_size,
list_new_subscribers,
list_unsubscribe_rate,
ads_spend,
ads_impressions,
ads_clicks,
ads_ctr,
ads_cpc,
ads_cpm,
ads_reach,
ads_frequency,
ads_conversions,
ads_cost_per_lead,
ads_cost_per_booked_call,
ads_attributed_revenue,
vid_views,
vid_watch_time_minutes,
vid_avg_view_duration,
vid_impressions,
vid_impressions_ctr,
vid_subscribers_gained,
vid_net_subscribers,
vid_breakout_score,
soc_posts_published,
soc_impressions,
soc_engagements,
soc_engagement_rate,
soc_meta_impressions,
soc_meta_engagements,
soc_meta_engagement_rate,
soc_fb_impressions,
soc_fb_engagements,
soc_fb_engagement_rate,
soc_ig_impressions,
soc_ig_reach,
soc_ig_engagements,
soc_ig_engagement_rate,
soc_ig_profile_visits,
soc_ig_new_follows,
sys_produced,
hyros_attributed_revenue,
hyros_attributed_leads,
web_sessions,
web_active_users,
web_conversions,
web_revenue,
web_search_impressions,
web_search_clicks,
web_search_ctr,
web_search_position
period
enum<string>

A preset window of whole COMPLETE periods ending at the start of the current one: 7d = the last 7 complete days (today is excluded), 28d = the last 4 complete weeks, 90d = the last 3 complete calendar months (92 days on a May-Aug read, not 90). Omit when supplying from/to.

Available options:
7d,
28d,
90d
from
string

Window start, ISO-8601 date or timestamp. Inclusive. Requires to.

to
string

Window end, ISO-8601 date or timestamp. EXCLUSIVE.

grain
enum<string>

Granularity the stored rows are read at. LEAVE THIS UNSET unless you have a specific reason: day is where the analytics store is written, and asking for a coarser grain reads a different set of rows that is usually empty. A window is summed from day rows regardless of how long it is, so a month-long window does NOT need grain=month.

Available options:
hour,
day,
week,
month,
quarter,
year,
lifetime
compare
boolean

Also read the immediately preceding window of the same number of COMPLETE periods, for a like-for-like comparison. On a preset that is a calendar step, so the preceding window holds the same number of weeks or months — not necessarily the same number of days.

workspace
string

Which workspace to run in — its slug. Omit to use your default. With more than one reachable workspace and no default, the call is refused and the choices are listed.

Minimum string length: 1

Response

The call was admitted and dispatched. ok says whether the tool succeeded — a refusal the tool itself produced is still a 200, exactly as it is a successful JSON-RPC result over MCP.

The tool ran and answered.

ok
boolean
required
window
object
required
previous_window
object | null
required
grain
string
required
definition_version
integer
required
min_delta_periods
integer
required
metrics
object[]
required
all_empty
boolean
required
answer_note
string
required
workspace
string
required

The slug of the workspace this call ran in.

working_in
object
required

Which workspace this call ran in, and how that was decided. Present on every workspace-scoped result.