{"openapi":"3.1.0","info":{"title":"Privatus Analytics API","version":"1.0.0","description":"Every page in Privatus Analytics is also an API endpoint: add .json to the URL and send an API token as a Bearer token. The same operations are available as MCP tools."},"servers":[{"url":"https://privatusanalytics.com"}],"security":[{"bearer":[]}],"tags":[{"name":"API tokens"},{"name":"Account"},{"name":"Affiliate program"},{"name":"Alerts"},{"name":"Analytics"},{"name":"Assistant"},{"name":"Audit log"},{"name":"Billing"},{"name":"Campaigns"},{"name":"Channel rules"},{"name":"Collection"},{"name":"Crawlers"},{"name":"Dashboards"},{"name":"Documentation"},{"name":"Email reports"},{"name":"Events"},{"name":"Exports"},{"name":"Funnels"},{"name":"Goals"},{"name":"Help and feedback"},{"name":"Imports"},{"name":"Live"},{"name":"Members"},{"name":"Notes"},{"name":"Notification channels"},{"name":"Performance"},{"name":"Plans"},{"name":"Roles"},{"name":"SCIM"},{"name":"SSO"},{"name":"Search"},{"name":"Segments"},{"name":"Sharing"},{"name":"Sites"},{"name":"Status pages"},{"name":"Tracking"},{"name":"Traffic rules"},{"name":"Uptime"},{"name":"Warehouse sync"},{"name":"Webhooks"},{"name":"Website"},{"name":"Workspaces"}],"paths":{"/workspaces/{workspace_id}/api_tokens.json":{"post":{"operationId":"api_tokens_create","summary":"Create an API token (the token is returned once)","tags":["API tokens"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"token":{"anyOf":[{"type":"string","description":"The token itself: only returned when created"},{"type":"null"}]},"token_prefix":{"type":"string","description":"First characters, to recognize the token"},"owner":{"type":"string","description":"Email of the member who owns it"},"permissions":{"type":"array","items":{"type":"string"}},"site_ids":{"type":"array","items":{"type":"string"},"description":"Restricted to these sites (empty = all)"},"allowed_ips":{"type":"array","items":{"type":"string"}},"oauth_client":{"anyOf":[{"type":"string","description":"MCP client that received it"},{"type":"null"}]},"status":{"type":"string","description":"active, expired or revoked"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"api_tokens_create","x-token-permission":"tokens.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"A name to recognize the token by","examples":["CI deploys"]},"permissions":{"type":"array","items":{"type":"string","enum":["analytics.read","analytics.export","content.write","sites.manage","uptime.manage","members.manage","tokens.manage","billing.manage","workspace.manage"]},"description":"Permissions (omit for all of yours, an empty list is refused)"},"site_ids":{"type":"array","items":{"type":"string"},"description":"Restrict to these site ids (pa_…). Empty = all","default":[]},"expires_at":{"type":"string","format":"date-time","description":"Expiry time (ISO 8601). Empty = never"},"allowed_ips":{"type":"array","items":{"type":"string"},"description":"Only accept requests from these IPs/CIDRs","default":[]}},"required":["name"]}}}}},"get":{"operationId":"api_tokens_list","summary":"List API tokens","tags":["API tokens"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"include_revoked","in":"query","required":false,"schema":{"type":"boolean","description":"Also list revoked and expired tokens","default":false}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"token":{"anyOf":[{"type":"string","description":"The token itself: only returned when created"},{"type":"null"}]},"token_prefix":{"type":"string","description":"First characters, to recognize the token"},"owner":{"type":"string","description":"Email of the member who owns it"},"permissions":{"type":"array","items":{"type":"string"}},"site_ids":{"type":"array","items":{"type":"string"},"description":"Restricted to these sites (empty = all)"},"allowed_ips":{"type":"array","items":{"type":"string"}},"oauth_client":{"anyOf":[{"type":"string","description":"MCP client that received it"},{"type":"null"}]},"status":{"type":"string","description":"active, expired or revoked"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"api_tokens_list"}},"/workspaces/{workspace_id}/api_tokens/{id}.json":{"delete":{"operationId":"api_tokens_delete","summary":"Revoke an API token","tags":["API tokens"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"token":{"anyOf":[{"type":"string","description":"The token itself: only returned when created"},{"type":"null"}]},"token_prefix":{"type":"string","description":"First characters, to recognize the token"},"owner":{"type":"string","description":"Email of the member who owns it"},"permissions":{"type":"array","items":{"type":"string"}},"site_ids":{"type":"array","items":{"type":"string"},"description":"Restricted to these sites (empty = all)"},"allowed_ips":{"type":"array","items":{"type":"string"}},"oauth_client":{"anyOf":[{"type":"string","description":"MCP client that received it"},{"type":"null"}]},"status":{"type":"string","description":"active, expired or revoked"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"api_tokens_delete","x-token-permission":"tokens.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/account.json":{"get":{"operationId":"account_get","summary":"Get your profile and preferences","tags":["Account"],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"email":{"type":"string"},"unconfirmed_email":{"anyOf":[{"type":"string","description":"New email awaiting confirmation"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"theme":{"type":"string"},"default_landing":{"type":"string"},"locale":{"type":"string","description":"Language code of the app for this account (en by default)"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}]},"shortcuts_enabled":{"type":"boolean"},"reduce_motion":{"type":"boolean"},"product_emails":{"type":"boolean"},"marketing_emails":{"type":"boolean","description":"Whether marketing emails (drip campaigns) may be sent. false after an unsubscribe"},"newsletter":{"type":"boolean"},"two_factor":{"type":"boolean"},"passkeys":{"type":"integer"},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"account_get"},"patch":{"operationId":"account_update","summary":"Update your profile and preferences","tags":["Account"],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"email":{"type":"string"},"unconfirmed_email":{"anyOf":[{"type":"string","description":"New email awaiting confirmation"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"theme":{"type":"string"},"default_landing":{"type":"string"},"locale":{"type":"string","description":"Language code of the app for this account (en by default)"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}]},"shortcuts_enabled":{"type":"boolean"},"reduce_motion":{"type":"boolean"},"product_emails":{"type":"boolean"},"marketing_emails":{"type":"boolean","description":"Whether marketing emails (drip campaigns) may be sent. false after an unsubscribe"},"newsletter":{"type":"boolean"},"two_factor":{"type":"boolean"},"passkeys":{"type":"integer"},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"account_update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Your name"},"email":{"type":"string","description":"New email address (confirmed by email first)"},"theme":{"type":"string","description":"Color theme","enum":["system","light","dark"]},"default_landing":{"type":"string","description":"Page after login: sites or last_site","enum":["sites","last_site"]},"locale":{"type":"string","description":"Language of the app when you are signed in, as a language code (en, de, fr and so on). Public pages and the API stay as they are","enum":["en","de","es","fr","it","nl","pt","pl","sv","da","no","fi","ja","ko","zh-CN","zh-TW"]},"timezone":{"type":"string","description":"Your timezone (IANA name)"},"shortcuts_enabled":{"type":"boolean","description":"Keyboard shortcuts"},"reduce_motion":{"type":"boolean","description":"Reduce animations"},"product_emails":{"type":"boolean","description":"Product update and tips emails"},"marketing_emails":{"type":"boolean","description":"Marketing emails such as onboarding tips. Turning them back on after an unsubscribe needs a signed-in browser"},"newsletter":{"type":"boolean","description":"Monthly newsletter"}}}}}}}},"/account/affiliate/commissions.json":{"get":{"operationId":"affiliate_commissions_list","summary":"List your affiliate commissions","description":"Commissions, refund and chargeback clawbacks and reversals, newest first. Amounts are in cents.","tags":["Affiliate program"],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","description":"Only commissions with this status","enum":["pending","approved","paid","void"]}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Commission id"},"kind":{"type":"string","description":"commission, clawback (refund or chargeback) or reversal"},"status":{"type":"string","description":"pending (on hold), approved (payable), paid or void"},"amount_cents":{"type":"integer","description":"Your share in cents (negative for a clawback)"},"basis_cents":{"type":"integer","description":"The net payment (excluding tax) it was calculated from, in cents"},"currency":{"type":"string","description":"ISO currency code"},"earned_at":{"type":"string","format":"date-time","description":"When the payment (or refund) happened"},"approved_at":{"anyOf":[{"type":"string","format":"date-time","description":"When it became payable"},{"type":"null"}]},"paid_at":{"anyOf":[{"type":"string","format":"date-time","description":"When it was paid out"},{"type":"null"}]}}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"affiliate_commissions_list"}},"/account/affiliate/signup-box.json":{"get":{"operationId":"affiliate_signup_box_get","summary":"Get your affiliate signup box code and results","description":"The embed code for your signup box (a script and a plain iframe) for the chosen theme, the attributes that prefill the form, the events the script fires on your page, and the box’s numbers: signups waiting to confirm, confirmed signups and paying customers. available is false until your affiliate application is approved.","tags":["Affiliate program"],"parameters":[{"name":"theme","in":"query","required":false,"schema":{"type":"string","description":"Theme of the box: auto (match the visitor’s device), light or dark","enum":["auto","light","dark"],"examples":["auto"],"default":"auto"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"available":{"type":"boolean","description":"Whether you have a signup box (approved affiliates only)"},"theme":{"type":"string","description":"The theme the code was built for"},"frame_url":{"anyOf":[{"type":"string","description":"The address of the box, for a plain iframe"},{"type":"null"}]},"script":{"anyOf":[{"type":"string","description":"The script embed code: an element and the loader script"},{"type":"null"}]},"iframe":{"anyOf":[{"type":"string","description":"The plain iframe embed code"},{"type":"null"}]},"prefill_attributes":{"type":"array","description":"Attributes on the element that prefill the form for signed-in visitors"},"events":{"type":"array","description":"DOM events the script fires on the element"},"waiting":{"type":"integer","description":"Signups whose emailed link has not been opened yet"},"signups":{"type":"integer","description":"Confirmed signups that came through the box"},"customers":{"type":"integer","description":"Those that became paying customers"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"affiliate_signup_box_get"}},"/account/affiliate.json":{"get":{"operationId":"affiliate_get","summary":"Get your affiliate status, referral link and stats","description":"Your affiliate application status, referral link, signups and paying customers you referred, and balances per currency (on hold, payable, paid). status is none when you have not applied.","tags":["Affiliate program"],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","description":"none (not applied), pending, approved, rejected or suspended"},"code":{"anyOf":[{"type":"string","description":"Your referral code"},{"type":"null"}]},"referral_url":{"anyOf":[{"type":"string","description":"The link to share (approved affiliates only)"},{"type":"null"}]},"payout_method":{"anyOf":[{"type":"string","description":"wise or credit"},{"type":"null"}]},"rejection_reason":{"anyOf":[{"type":"string","description":"Why the last application was rejected"},{"type":"null"}]},"applied_at":{"anyOf":[{"type":"string","format":"date-time","description":"When you applied"},{"type":"null"}]},"approved_at":{"anyOf":[{"type":"string","format":"date-time","description":"When the application was approved"},{"type":"null"}]},"credit_blocked":{"anyOf":[{"type":"string","description":"Why account credit is waiting: program (the workspace is in a discount program), no_subscription or no_workspace. null when nothing blocks it"},{"type":"null"}]},"signups":{"type":"integer","description":"Accounts created through your link or code"},"customers":{"type":"integer","description":"Referred workspaces that have paid"},"balances":{"type":"array","description":"Per currency: pending_cents (on hold), approved_cents (payable) and paid_cents"},"payouts":{"type":"array","description":"Recent payouts with amount_cents, currency, payout_method, status (applied: account credit waiting for your next renewal, or paid), applied_at and paid_at"},"terms":{"type":"object","description":"Commission percent, months, hold days and the Wise payout threshold in cents"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"affiliate_get"}},"/alerts/{id}/acknowledge.json":{"post":{"operationId":"alerts_acknowledge","summary":"Acknowledge the latest incident","tags":["Alerts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Alert id, e.g. alr_7Q2K9XH3AB"},"site_id":{"anyOf":[{"type":"string","description":"Site id (null for usage alerts)"},{"type":"null"}]},"name":{"type":"string"},"kind":{"type":"string","description":"threshold, anomaly, goal, no_data, usage, uptime, ssl or vitals"},"metric":{"anyOf":[{"type":"string"},{"type":"null"}]},"operator":{"anyOf":[{"type":"string","description":"gt, gte, lt or lte"},{"type":"null"}]},"threshold":{"anyOf":[{"type":"number"},{"type":"null"}]},"window_minutes":{"type":"integer"},"sensitivity":{"type":"string","description":"anomaly sensitivity"},"goal_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"channel_ids":{"type":"array","items":{"type":"string"},"description":"Notification channel ids"},"state":{"type":"string","description":"ok or triggered"},"enabled":{"type":"boolean"},"muted_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_triggered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_evaluated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"alerts_acknowledge","x-permission":"analytics.read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/workspaces/{workspace_id}/alerts.json":{"post":{"operationId":"alerts_create","summary":"Create an alert","tags":["Alerts"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Alert id, e.g. alr_7Q2K9XH3AB"},"site_id":{"anyOf":[{"type":"string","description":"Site id (null for usage alerts)"},{"type":"null"}]},"name":{"type":"string"},"kind":{"type":"string","description":"threshold, anomaly, goal, no_data, usage, uptime, ssl or vitals"},"metric":{"anyOf":[{"type":"string"},{"type":"null"}]},"operator":{"anyOf":[{"type":"string","description":"gt, gte, lt or lte"},{"type":"null"}]},"threshold":{"anyOf":[{"type":"number"},{"type":"null"}]},"window_minutes":{"type":"integer"},"sensitivity":{"type":"string","description":"anomaly sensitivity"},"goal_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"channel_ids":{"type":"array","items":{"type":"string"},"description":"Notification channel ids"},"state":{"type":"string","description":"ok or triggered"},"enabled":{"type":"boolean"},"muted_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_triggered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_evaluated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"alerts_create","x-permission":"content.write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"site_id":{"type":"string","description":"Site id (pa_…). Required except for usage alerts"},"metric":{"type":"string","description":"threshold/anomaly: visitors, visits, pageviews, bounce_rate or conversion. vitals: lcp, inp, cls, fcp or ttfb"},"operator":{"type":"string","description":"Comparison (gt, gte, lt, lte). anomaly: lt only drops, gt only spikes, empty both","enum":["gt","gte","lt","lte"]},"threshold":{"type":"number","description":"threshold: metric value, goal: completions, no_data: hours, usage: percent, ssl: days, vitals: ms (CLS: score)"},"window_minutes":{"type":"integer","description":"Evaluation window in minutes (5 to 10080)"},"sensitivity":{"type":"string","description":"anomaly: low, medium or high","enum":["low","medium","high"]},"goal_id":{"type":"string","description":"goal and conversion alerts: goal id (goal_…)"},"uptime_check_id":{"type":"string","description":"uptime/ssl: check id (default: all the site's checks)"},"channel_ids":{"type":"array","items":{"type":"string"},"description":"Notification channel ids (nch_…)"},"enabled":{"type":"boolean","description":"Evaluate this alert"},"name":{"type":"string","description":"Alert name","examples":["Traffic dropped"]},"kind":{"type":"string","description":"threshold, anomaly, goal, no_data, usage, uptime, ssl or vitals","enum":["threshold","anomaly","goal","no_data","usage","uptime","ssl","vitals"]}},"required":["name","kind"]}}}}},"get":{"operationId":"alerts_list","summary":"List alerts","tags":["Alerts"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"site_id","in":"query","required":false,"schema":{"type":"string","description":"Only alerts for this site (pa_…)"}},{"name":"state","in":"query","required":false,"schema":{"type":"string","description":"Only ok or triggered alerts","enum":["ok","triggered"]}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","description":"Only this kind","enum":["threshold","anomaly","goal","no_data","usage","uptime","ssl","vitals"]}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Alert id, e.g. alr_7Q2K9XH3AB"},"site_id":{"anyOf":[{"type":"string","description":"Site id (null for usage alerts)"},{"type":"null"}]},"name":{"type":"string"},"kind":{"type":"string","description":"threshold, anomaly, goal, no_data, usage, uptime, ssl or vitals"},"metric":{"anyOf":[{"type":"string"},{"type":"null"}]},"operator":{"anyOf":[{"type":"string","description":"gt, gte, lt or lte"},{"type":"null"}]},"threshold":{"anyOf":[{"type":"number"},{"type":"null"}]},"window_minutes":{"type":"integer"},"sensitivity":{"type":"string","description":"anomaly sensitivity"},"goal_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"channel_ids":{"type":"array","items":{"type":"string"},"description":"Notification channel ids"},"state":{"type":"string","description":"ok or triggered"},"enabled":{"type":"boolean"},"muted_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_triggered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_evaluated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"alerts_list","x-permission":"analytics.read"}},"/alerts/{id}.json":{"delete":{"operationId":"alerts_delete","summary":"Delete an alert","tags":["Alerts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Alert id, e.g. alr_7Q2K9XH3AB"},"site_id":{"anyOf":[{"type":"string","description":"Site id (null for usage alerts)"},{"type":"null"}]},"name":{"type":"string"},"kind":{"type":"string","description":"threshold, anomaly, goal, no_data, usage, uptime, ssl or vitals"},"metric":{"anyOf":[{"type":"string"},{"type":"null"}]},"operator":{"anyOf":[{"type":"string","description":"gt, gte, lt or lte"},{"type":"null"}]},"threshold":{"anyOf":[{"type":"number"},{"type":"null"}]},"window_minutes":{"type":"integer"},"sensitivity":{"type":"string","description":"anomaly sensitivity"},"goal_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"channel_ids":{"type":"array","items":{"type":"string"},"description":"Notification channel ids"},"state":{"type":"string","description":"ok or triggered"},"enabled":{"type":"boolean"},"muted_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_triggered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_evaluated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"alerts_delete","x-permission":"content.write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}},"get":{"operationId":"alerts_get","summary":"Get an alert","tags":["Alerts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Alert id, e.g. alr_7Q2K9XH3AB"},"site_id":{"anyOf":[{"type":"string","description":"Site id (null for usage alerts)"},{"type":"null"}]},"name":{"type":"string"},"kind":{"type":"string","description":"threshold, anomaly, goal, no_data, usage, uptime, ssl or vitals"},"metric":{"anyOf":[{"type":"string"},{"type":"null"}]},"operator":{"anyOf":[{"type":"string","description":"gt, gte, lt or lte"},{"type":"null"}]},"threshold":{"anyOf":[{"type":"number"},{"type":"null"}]},"window_minutes":{"type":"integer"},"sensitivity":{"type":"string","description":"anomaly sensitivity"},"goal_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"channel_ids":{"type":"array","items":{"type":"string"},"description":"Notification channel ids"},"state":{"type":"string","description":"ok or triggered"},"enabled":{"type":"boolean"},"muted_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_triggered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_evaluated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"alerts_get","x-permission":"analytics.read"},"patch":{"operationId":"alerts_update","summary":"Update an alert","tags":["Alerts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Alert id, e.g. alr_7Q2K9XH3AB"},"site_id":{"anyOf":[{"type":"string","description":"Site id (null for usage alerts)"},{"type":"null"}]},"name":{"type":"string"},"kind":{"type":"string","description":"threshold, anomaly, goal, no_data, usage, uptime, ssl or vitals"},"metric":{"anyOf":[{"type":"string"},{"type":"null"}]},"operator":{"anyOf":[{"type":"string","description":"gt, gte, lt or lte"},{"type":"null"}]},"threshold":{"anyOf":[{"type":"number"},{"type":"null"}]},"window_minutes":{"type":"integer"},"sensitivity":{"type":"string","description":"anomaly sensitivity"},"goal_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"channel_ids":{"type":"array","items":{"type":"string"},"description":"Notification channel ids"},"state":{"type":"string","description":"ok or triggered"},"enabled":{"type":"boolean"},"muted_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_triggered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_evaluated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"alerts_update","x-permission":"content.write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"site_id":{"type":"string","description":"Site id (pa_…). Required except for usage alerts"},"metric":{"type":"string","description":"threshold/anomaly: visitors, visits, pageviews, bounce_rate or conversion. vitals: lcp, inp, cls, fcp or ttfb"},"operator":{"type":"string","description":"Comparison (gt, gte, lt, lte). anomaly: lt only drops, gt only spikes, empty both","enum":["gt","gte","lt","lte"]},"threshold":{"type":"number","description":"threshold: metric value, goal: completions, no_data: hours, usage: percent, ssl: days, vitals: ms (CLS: score)"},"window_minutes":{"type":"integer","description":"Evaluation window in minutes (5 to 10080)"},"sensitivity":{"type":"string","description":"anomaly: low, medium or high","enum":["low","medium","high"]},"goal_id":{"type":"string","description":"goal and conversion alerts: goal id (goal_…)"},"uptime_check_id":{"type":"string","description":"uptime/ssl: check id (default: all the site's checks)"},"channel_ids":{"type":"array","items":{"type":"string"},"description":"Notification channel ids (nch_…)"},"enabled":{"type":"boolean","description":"Evaluate this alert"},"name":{"type":"string","description":"Alert name"},"kind":{"type":"string","description":"Alert kind","enum":["threshold","anomaly","goal","no_data","usage","uptime","ssl","vitals"]}}}}}}}},"/alerts/{id}/history.json":{"get":{"operationId":"alerts_history","summary":"Incident history of an alert","tags":["Alerts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"open","in":"query","required":false,"schema":{"type":"boolean","description":"Only unresolved incidents","default":false}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"triggered_at":{"type":"string","format":"date-time"},"resolved_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"value":{"anyOf":[{"type":"number","description":"Measured value when triggered"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}]},"acknowledged_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"acknowledged_by":{"anyOf":[{"type":"string","description":"Name of the member who acknowledged"},{"type":"null"}]}}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"alerts_history","x-permission":"analytics.read"}},"/alerts/{id}/mute.json":{"post":{"operationId":"alerts_mute","summary":"Mute (or unmute) an alert’s notifications","tags":["Alerts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Alert id, e.g. alr_7Q2K9XH3AB"},"site_id":{"anyOf":[{"type":"string","description":"Site id (null for usage alerts)"},{"type":"null"}]},"name":{"type":"string"},"kind":{"type":"string","description":"threshold, anomaly, goal, no_data, usage, uptime, ssl or vitals"},"metric":{"anyOf":[{"type":"string"},{"type":"null"}]},"operator":{"anyOf":[{"type":"string","description":"gt, gte, lt or lte"},{"type":"null"}]},"threshold":{"anyOf":[{"type":"number"},{"type":"null"}]},"window_minutes":{"type":"integer"},"sensitivity":{"type":"string","description":"anomaly sensitivity"},"goal_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"channel_ids":{"type":"array","items":{"type":"string"},"description":"Notification channel ids"},"state":{"type":"string","description":"ok or triggered"},"enabled":{"type":"boolean"},"muted_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_triggered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_evaluated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"alerts_mute","x-permission":"content.write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"minutes":{"type":"integer","description":"Mute for this many minutes (0 unmutes, max 30 days)","default":60}}}}}}}},"/sites/{site_id}/alerts.json":{"get":{"operationId":"site_alerts_list","summary":"List alerts for a site","tags":["Alerts"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"state","in":"query","required":false,"schema":{"type":"string","description":"Only ok or triggered alerts","enum":["ok","triggered"]}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","description":"Only this kind","enum":["threshold","anomaly","goal","no_data","usage","uptime","ssl","vitals"]}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Alert id, e.g. alr_7Q2K9XH3AB"},"site_id":{"anyOf":[{"type":"string","description":"Site id (null for usage alerts)"},{"type":"null"}]},"name":{"type":"string"},"kind":{"type":"string","description":"threshold, anomaly, goal, no_data, usage, uptime, ssl or vitals"},"metric":{"anyOf":[{"type":"string"},{"type":"null"}]},"operator":{"anyOf":[{"type":"string","description":"gt, gte, lt or lte"},{"type":"null"}]},"threshold":{"anyOf":[{"type":"number"},{"type":"null"}]},"window_minutes":{"type":"integer"},"sensitivity":{"type":"string","description":"anomaly sensitivity"},"goal_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"channel_ids":{"type":"array","items":{"type":"string"},"description":"Notification channel ids"},"state":{"type":"string","description":"ok or triggered"},"enabled":{"type":"boolean"},"muted_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_triggered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_evaluated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"site_alerts_list","x-permission":"analytics.read"}},"/sites/{site_id}/overview.json":{"get":{"operationId":"stats_overview","summary":"Site overview: metrics, chart series, top panels, live visitors and notes","tags":["Analytics"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","description":"Date range preset. Use custom with from/to","enum":["today","yesterday","24h","7d","14d","28d","30d","90d","mtd","last_month","qtd","last_quarter","ytd","12mo","last_year","all","custom"],"default":"30d"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom range start (site timezone)"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom range end, inclusive"}},{"name":"compare","in":"query","required":false,"schema":{"type":"string","description":"Comparison period","enum":["none","previous_period","previous_year","custom"],"default":"none"}},{"name":"compare_from","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom comparison start"}},{"name":"compare_to","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom comparison end"}},{"name":"match_weekday","in":"query","required":false,"schema":{"type":"boolean","description":"Align comparison days of the week","default":false}},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{},"description":"Filters: [[\"dimension\",\"operator\",\"value\"], …]. Operators: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Wrap conditions in {\"any\": [...]} for OR.","default":[]}},{"name":"segment_id","in":"query","required":false,"schema":{"type":"string","description":"Apply a saved segment (seg_…)"}},{"name":"include_imported","in":"query","required":false,"schema":{"type":"boolean","description":"Add imported historical data (dates before the first native event, ignored when filters or a segment are applied)","default":false}},{"name":"interval","in":"query","required":false,"schema":{"type":"string","description":"Chart bucket size","enum":["auto","minute","hour","day","week","month","quarter","year"],"default":"auto"}},{"name":"panels","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"Dimensions to include top values for","default":["channel","referrer","page","entry_page","country","device","browser","os","utm_campaign","event","goal"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"stats_overview","x-permission":"analytics.read"}},"/sites/{site_id}/experiments.json":{"get":{"operationId":"experiments_report","summary":"Experiment report: conversion rate per variant, uplift vs control and significance (two-proportion z-test)","tags":["Analytics"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","description":"Date range preset. Use custom with from/to","enum":["today","yesterday","24h","7d","14d","28d","30d","90d","mtd","last_month","qtd","last_quarter","ytd","12mo","last_year","all","custom"],"default":"30d"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom range start (site timezone)"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom range end, inclusive"}},{"name":"compare","in":"query","required":false,"schema":{"type":"string","description":"Comparison period","enum":["none","previous_period","previous_year","custom"],"default":"none"}},{"name":"compare_from","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom comparison start"}},{"name":"compare_to","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom comparison end"}},{"name":"match_weekday","in":"query","required":false,"schema":{"type":"boolean","description":"Align comparison days of the week","default":false}},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{},"description":"Filters: [[\"dimension\",\"operator\",\"value\"], …]. Operators: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Wrap conditions in {\"any\": [...]} for OR.","default":[]}},{"name":"segment_id","in":"query","required":false,"schema":{"type":"string","description":"Apply a saved segment (seg_…)"}},{"name":"include_imported","in":"query","required":false,"schema":{"type":"boolean","description":"Add imported historical data (dates before the first native event, ignored when filters or a segment are applied)","default":false}},{"name":"property","in":"query","required":false,"schema":{"type":"string","description":"Event property holding the variant, e.g. variant","examples":["variant"]}},{"name":"goal_id","in":"query","required":false,"schema":{"type":"string","description":"Goal counted as a conversion (goal_…)"}},{"name":"control","in":"query","required":false,"schema":{"type":"string","description":"Control variant (defaults to \"control\" if present, else the variant with most visits)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"experiments_report","x-permission":"analytics.read"}},"/sites/{site_id}/insights.json":{"get":{"operationId":"insights_get","summary":"Notable changes vs the previous period, in plain English (biggest movers, goal conversion changes)","tags":["Analytics"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","description":"Complete days up to yesterday, compared with the same number of days before","enum":["7d","14d","28d","30d"],"default":"7d"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Maximum number of insights (1 to 20)","default":8}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"insights_get","x-permission":"analytics.read"}},"/sites/{site_id}/journeys.json":{"get":{"operationId":"journeys_explore","summary":"Journeys: top 3-step paths after a page (or any entrance), or before a page or goal","tags":["Analytics"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","description":"Date range preset. Use custom with from/to","enum":["today","yesterday","24h","7d","14d","28d","30d","90d","mtd","last_month","qtd","last_quarter","ytd","12mo","last_year","all","custom"],"default":"30d"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom range start (site timezone)"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom range end, inclusive"}},{"name":"compare","in":"query","required":false,"schema":{"type":"string","description":"Comparison period","enum":["none","previous_period","previous_year","custom"],"default":"none"}},{"name":"compare_from","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom comparison start"}},{"name":"compare_to","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom comparison end"}},{"name":"match_weekday","in":"query","required":false,"schema":{"type":"boolean","description":"Align comparison days of the week","default":false}},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{},"description":"Filters: [[\"dimension\",\"operator\",\"value\"], …]. Operators: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Wrap conditions in {\"any\": [...]} for OR.","default":[]}},{"name":"segment_id","in":"query","required":false,"schema":{"type":"string","description":"Apply a saved segment (seg_…)"}},{"name":"include_imported","in":"query","required":false,"schema":{"type":"boolean","description":"Add imported historical data (dates before the first native event, ignored when filters or a segment are applied)","default":false}},{"name":"mode","in":"query","required":false,"schema":{"type":"string","description":"forward: pages after the start page, reverse: pages leading to the end page or goal","enum":["forward","reverse"],"default":"forward"}},{"name":"path","in":"query","required":false,"schema":{"type":"string","description":"Start page (forward) or end page (reverse). Blank means any entrance (forward only)"}},{"name":"goal_id","in":"query","required":false,"schema":{"type":"string","description":"Reverse mode: end at this goal (goal_…) instead of a page"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Pages shown per step (max 12)","default":6}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"journeys_explore","x-permission":"analytics.read"}},"/sites/{site_id}/pages/detail.json":{"get":{"operationId":"pages_detail","summary":"Page detail: metrics, previous and next pages, sources, Web Vitals, events and click map for one path","tags":["Analytics"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","description":"Date range preset. Use custom with from/to","enum":["today","yesterday","24h","7d","14d","28d","30d","90d","mtd","last_month","qtd","last_quarter","ytd","12mo","last_year","all","custom"],"default":"30d"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom range start (site timezone)"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom range end, inclusive"}},{"name":"compare","in":"query","required":false,"schema":{"type":"string","description":"Comparison period","enum":["none","previous_period","previous_year","custom"],"default":"none"}},{"name":"compare_from","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom comparison start"}},{"name":"compare_to","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom comparison end"}},{"name":"match_weekday","in":"query","required":false,"schema":{"type":"boolean","description":"Align comparison days of the week","default":false}},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{},"description":"Filters: [[\"dimension\",\"operator\",\"value\"], …]. Operators: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Wrap conditions in {\"any\": [...]} for OR.","default":[]}},{"name":"segment_id","in":"query","required":false,"schema":{"type":"string","description":"Apply a saved segment (seg_…)"}},{"name":"include_imported","in":"query","required":false,"schema":{"type":"boolean","description":"Add imported historical data (dates before the first native event, ignored when filters or a segment are applied)","default":false}},{"name":"path","in":"query","required":false,"schema":{"type":"string","description":"Page path, e.g. /pricing","examples":["/pricing"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"pages_detail","x-permission":"analytics.read"}},"/sites/{site_id}/stats/aggregate.json":{"get":{"operationId":"stats_aggregate","summary":"Headline metrics for a period (with comparison)","tags":["Analytics"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","description":"Date range preset. Use custom with from/to","enum":["today","yesterday","24h","7d","14d","28d","30d","90d","mtd","last_month","qtd","last_quarter","ytd","12mo","last_year","all","custom"],"default":"30d"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom range start (site timezone)"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom range end, inclusive"}},{"name":"compare","in":"query","required":false,"schema":{"type":"string","description":"Comparison period","enum":["none","previous_period","previous_year","custom"],"default":"none"}},{"name":"compare_from","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom comparison start"}},{"name":"compare_to","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom comparison end"}},{"name":"match_weekday","in":"query","required":false,"schema":{"type":"boolean","description":"Align comparison days of the week","default":false}},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{},"description":"Filters: [[\"dimension\",\"operator\",\"value\"], …]. Operators: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Wrap conditions in {\"any\": [...]} for OR.","default":[]}},{"name":"segment_id","in":"query","required":false,"schema":{"type":"string","description":"Apply a saved segment (seg_…)"}},{"name":"include_imported","in":"query","required":false,"schema":{"type":"boolean","description":"Add imported historical data (dates before the first native event, ignored when filters or a segment are applied)","default":false}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"stats_aggregate","x-permission":"analytics.read"}},"/sites/{site_id}/breakdown/{dimension}.json":{"get":{"operationId":"stats_breakdown","summary":"Top values of a dimension (pages, sources, countries…)","tags":["Analytics"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"dimension","in":"path","required":true,"schema":{"type":"string"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","description":"Date range preset. Use custom with from/to","enum":["today","yesterday","24h","7d","14d","28d","30d","90d","mtd","last_month","qtd","last_quarter","ytd","12mo","last_year","all","custom"],"default":"30d"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom range start (site timezone)"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom range end, inclusive"}},{"name":"compare","in":"query","required":false,"schema":{"type":"string","description":"Comparison period","enum":["none","previous_period","previous_year","custom"],"default":"none"}},{"name":"compare_from","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom comparison start"}},{"name":"compare_to","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom comparison end"}},{"name":"match_weekday","in":"query","required":false,"schema":{"type":"boolean","description":"Align comparison days of the week","default":false}},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{},"description":"Filters: [[\"dimension\",\"operator\",\"value\"], …]. Operators: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Wrap conditions in {\"any\": [...]} for OR.","default":[]}},{"name":"segment_id","in":"query","required":false,"schema":{"type":"string","description":"Apply a saved segment (seg_…)"}},{"name":"include_imported","in":"query","required":false,"schema":{"type":"boolean","description":"Add imported historical data (dates before the first native event, ignored when filters or a segment are applied)","default":false}},{"name":"dimension","in":"query","required":false,"schema":{"type":"string","description":"channel, referrer, referrer_url, utm_source, utm_medium, utm_campaign, utm_content, utm_term, ref, hostname, country, language, device, browser, browser_version, os, os_version, screen, entry_page, exit_page, interaction (seen, none or unknown), page, event, goal, or prop:<key>"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Rows per page (max 1000)","default":10}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","description":"Page number","default":1}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","description":"Sort metric","enum":["visitors","visits","pageviews","revenue"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"stats_breakdown","x-permission":"analytics.read"}},"/sites/{site_id}/stats/timeseries.json":{"get":{"operationId":"stats_timeseries","summary":"Metrics per time bucket for charts","tags":["Analytics"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","description":"Date range preset. Use custom with from/to","enum":["today","yesterday","24h","7d","14d","28d","30d","90d","mtd","last_month","qtd","last_quarter","ytd","12mo","last_year","all","custom"],"default":"30d"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom range start (site timezone)"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom range end, inclusive"}},{"name":"compare","in":"query","required":false,"schema":{"type":"string","description":"Comparison period","enum":["none","previous_period","previous_year","custom"],"default":"none"}},{"name":"compare_from","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom comparison start"}},{"name":"compare_to","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom comparison end"}},{"name":"match_weekday","in":"query","required":false,"schema":{"type":"boolean","description":"Align comparison days of the week","default":false}},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{},"description":"Filters: [[\"dimension\",\"operator\",\"value\"], …]. Operators: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Wrap conditions in {\"any\": [...]} for OR.","default":[]}},{"name":"segment_id","in":"query","required":false,"schema":{"type":"string","description":"Apply a saved segment (seg_…)"}},{"name":"include_imported","in":"query","required":false,"schema":{"type":"boolean","description":"Add imported historical data (dates before the first native event, ignored when filters or a segment are applied)","default":false}},{"name":"interval","in":"query","required":false,"schema":{"type":"string","description":"Bucket size. auto picks one for the range","enum":["auto","minute","hour","day","week","month","quarter","year"],"default":"auto"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"stats_timeseries","x-permission":"analytics.read"}},"/sites/{site_id}/ask.json":{"post":{"operationId":"assistant_ask","summary":"Ask a question in a new conversation (counts toward the monthly AI questions limit)","tags":["Assistant"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Conversation id, e.g. ask_7Q2K9XH3AB"},"site_id":{"anyOf":[{"type":"string","description":"Site id"},{"type":"null"}]},"title":{"anyOf":[{"type":"string","description":"The first question, shortened"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time","description":"Time of the last message"},"expires_at":{"type":"string","format":"date-time","description":"Deleted automatically after this time (30 days after the last message)"},"messages":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Message id within the conversation"},"role":{"type":"string","description":"user (the question) or assistant (the answer)"},"content":{"type":"string","description":"Question, or the answer in Markdown"},"queries":{"type":"array","items":{"type":"object"},"description":"How I got this: the exact API queries behind the answer, as [{tool, input, status, error}]"},"chart":{"anyOf":[{"type":"object","description":"Chart of the answer: {type: line, labels, series, comparison, metric, format} or {type: table, columns, rows}"},{"type":"null"}]},"goal_draft":{"anyOf":[{"type":"object","description":"A goal proposed by the assistant, to confirm with goals_create"},{"type":"null"}]},"input_tokens":{"anyOf":[{"type":"integer","description":"Model input tokens used"},{"type":"null"}]},"output_tokens":{"anyOf":[{"type":"integer","description":"Model output tokens used"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}},"description":"Questions and answers, oldest first"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"assistant_ask","x-permission":"analytics.read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"question":{"type":"string","description":"Your first question in plain English","examples":["How many visitors did we have last week?"]}},"required":["question"]}}}}},"get":{"operationId":"assistant_conversations_list","summary":"List your Ask conversations for a site","tags":["Assistant"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Conversation id, e.g. ask_7Q2K9XH3AB"},"site_id":{"anyOf":[{"type":"string","description":"Site id"},{"type":"null"}]},"title":{"anyOf":[{"type":"string","description":"The first question, shortened"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time","description":"Time of the last message"},"expires_at":{"type":"string","format":"date-time","description":"Deleted automatically after this time (30 days after the last message)"}}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"assistant_conversations_list","x-permission":"analytics.read"}},"/sites/{site_id}/ask/{id}.json":{"delete":{"operationId":"assistant_conversations_delete","summary":"Delete an Ask conversation and its messages","tags":["Assistant"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Conversation id, e.g. ask_7Q2K9XH3AB"},"site_id":{"anyOf":[{"type":"string","description":"Site id"},{"type":"null"}]},"title":{"anyOf":[{"type":"string","description":"The first question, shortened"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time","description":"Time of the last message"},"expires_at":{"type":"string","format":"date-time","description":"Deleted automatically after this time (30 days after the last message)"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"assistant_conversations_delete","x-permission":"analytics.read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}},"get":{"operationId":"assistant_conversations_get","summary":"An Ask conversation: questions, answers, the queries behind them and charts","tags":["Assistant"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Conversation id, e.g. ask_7Q2K9XH3AB"},"site_id":{"anyOf":[{"type":"string","description":"Site id"},{"type":"null"}]},"title":{"anyOf":[{"type":"string","description":"The first question, shortened"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time","description":"Time of the last message"},"expires_at":{"type":"string","format":"date-time","description":"Deleted automatically after this time (30 days after the last message)"},"messages":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Message id within the conversation"},"role":{"type":"string","description":"user (the question) or assistant (the answer)"},"content":{"type":"string","description":"Question, or the answer in Markdown"},"queries":{"type":"array","items":{"type":"object"},"description":"How I got this: the exact API queries behind the answer, as [{tool, input, status, error}]"},"chart":{"anyOf":[{"type":"object","description":"Chart of the answer: {type: line, labels, series, comparison, metric, format} or {type: table, columns, rows}"},{"type":"null"}]},"goal_draft":{"anyOf":[{"type":"object","description":"A goal proposed by the assistant, to confirm with goals_create"},{"type":"null"}]},"input_tokens":{"anyOf":[{"type":"integer","description":"Model input tokens used"},{"type":"null"}]},"output_tokens":{"anyOf":[{"type":"integer","description":"Model output tokens used"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}},"description":"Questions and answers, oldest first"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"assistant_conversations_get","x-permission":"analytics.read"}},"/sites/{site_id}/ask/{ask_conversation_id}/messages.json":{"post":{"operationId":"assistant_ask_followup","summary":"Ask a follow-up question in a conversation (counts toward the monthly AI questions limit). Returns the answer.","tags":["Assistant"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"ask_conversation_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Message id within the conversation"},"role":{"type":"string","description":"user (the question) or assistant (the answer)"},"content":{"type":"string","description":"Question, or the answer in Markdown"},"queries":{"type":"array","items":{"type":"object"},"description":"How I got this: the exact API queries behind the answer, as [{tool, input, status, error}]"},"chart":{"anyOf":[{"type":"object","description":"Chart of the answer: {type: line, labels, series, comparison, metric, format} or {type: table, columns, rows}"},{"type":"null"}]},"goal_draft":{"anyOf":[{"type":"object","description":"A goal proposed by the assistant, to confirm with goals_create"},{"type":"null"}]},"input_tokens":{"anyOf":[{"type":"integer","description":"Model input tokens used"},{"type":"null"}]},"output_tokens":{"anyOf":[{"type":"integer","description":"Model output tokens used"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"assistant_ask_followup","x-permission":"analytics.read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"question":{"type":"string","description":"Your question in plain English","examples":["Which pages had the most visitors last week?"]}},"required":["question"]}}}}}},"/workspaces/{workspace_id}/audit_log.json":{"get":{"operationId":"audit_logs_get","summary":"List audit log entries (add .csv to export)","tags":["Audit log"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"actor","in":"query","required":false,"schema":{"type":"string","description":"Only changes by this member (email)"}},{"name":"item_type","in":"query","required":false,"schema":{"type":"string","description":"Only this kind of record, e.g. Site"}},{"name":"event","in":"query","required":false,"schema":{"type":"string","description":"Only this action","enum":["create","update","destroy"]}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date","description":"From date (inclusive)"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date","description":"To date (inclusive)"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time","description":"When"},"event":{"type":"string","description":"create, update or destroy"},"item_type":{"type":"string","description":"Kind of record, e.g. Site"},"item_id":{"type":"string","format":"uuid"},"target":{"type":"string","description":"The record, by name where known"},"actor_email":{"anyOf":[{"type":"string","description":"Member who made the change"},{"type":"null"}]},"actor_name":{"type":"string"},"token_name":{"anyOf":[{"type":"string","description":"API token used, if any"},{"type":"null"}]},"changes":{"type":"object","description":"Changed fields: { field: [before, after] }"},"ip":{"anyOf":[{"type":"string","description":"The member's IP address"},{"type":"null"}]}}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"audit_logs_get","x-permission":"workspace.manage"}},"/workspaces/{workspace_id}/billing/badge.json":{"post":{"operationId":"billing_badge","summary":"Opt in or out of the badge bonus (free plan)","tags":["Billing"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"workspace_id":{"type":"string"},"plan":{"type":"string","description":"free, pro, business or enterprise"},"plan_events":{"type":"integer","description":"Events a month in the paid tier"},"allowance":{"type":"integer","description":"Events a month including any badge bonus"},"billing_interval":{"anyOf":[{"type":"string","description":"month or year"},{"type":"null"}]},"price":{"anyOf":[{"type":"integer","description":"USD per billing interval"},{"type":"null"}]},"subscription_status":{"type":"string","description":"none, trialing, active, past_due, paused or canceled"},"current_period_ends_at":{"anyOf":[{"type":"string","format":"date-time","description":"Renews or ends at"},{"type":"null"}]},"cancel_at_period_end":{"type":"boolean"},"canceled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"auto_upgrade":{"type":"boolean"},"discount":{"anyOf":[{"type":"object","properties":{"program":{"type":"string","description":"nonprofit, education, open_source, open_source_free or agency"},"status":{"type":"string","description":"pending, approved (not yet on the subscription), active, rejected or revoked"},"percent":{"anyOf":[{"type":"integer","description":"Percent off Pro and Business (null for the free open-source program)"},{"type":"null"}]},"comp_events":{"anyOf":[{"type":"integer","description":"Free events a month (free open-source program only)"},{"type":"null"}]},"organization_name":{"type":"string","description":"Organization, school, project or agency name"},"website":{"anyOf":[{"type":"string","description":"Website"},{"type":"null"}]},"proof_url":{"anyOf":[{"type":"string","description":"Proof link or repository URL"},{"type":"null"}]},"license":{"anyOf":[{"type":"string","description":"OSI license (open source)"},{"type":"null"}]},"note":{"anyOf":[{"type":"string","description":"Note for the review"},{"type":"null"}]},"rejection_reason":{"anyOf":[{"type":"string","description":"Why the application was not approved"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","description":"Applied at"},"reviewed_at":{"anyOf":[{"type":"string","format":"date-time","description":"Reviewed at"},{"type":"null"}]},"applied_at":{"anyOf":[{"type":"string","format":"date-time","description":"Discount active since"},{"type":"null"}]},"revoked_at":{"anyOf":[{"type":"string","format":"date-time","description":"Program ended at"},{"type":"null"}]}},"description":"The latest discount program application, or null"},{"type":"null"}]},"discount_percent":{"anyOf":[{"type":"integer","description":"Percent off Pro and Business from an approved program, or null"},{"type":"null"}]},"billing_emails":{"type":"array","items":{"type":"string"}},"tax_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"badge":{"type":"object","description":"Badge bonus (free plan)"},"usage":{"type":"object","properties":{"month":{"type":"string","format":"date","description":"First day of the month reported"},"events":{"type":"integer","description":"Billable events (pageviews and custom events)"},"bots":{"type":"integer","description":"Bot hits filtered out (not billed)"},"allowance":{"type":"integer","description":"Events included, with any badge bonus"},"percent":{"type":"number","description":"Events as a percent of the allowance"},"forecast":{"anyOf":[{"type":"integer","description":"Projected events at month end"},{"type":"null"}]},"forecast_percent":{"anyOf":[{"type":"number"},{"type":"null"}]},"days_left":{"type":"integer","description":"Days left in the month"},"status":{"type":"string","description":"ok, warning (80%+), over (a past month at or over the allowance), locked or paused"},"sites":{"type":"array","items":{"type":"object","properties":{"site_id":{"type":"string"},"domain":{"type":"string"},"name":{"type":"string"},"events":{"type":"integer","description":"Pageviews and custom events this month"},"share":{"type":"number","description":"Percent of the workspace total"}}},"description":"Events by site"},"history":{"type":"array","description":"Previous months, newest first"},"access_locked_at":{"anyOf":[{"type":"string","format":"date-time","description":"Dashboards locked by Privatus Analytics staff since"},{"type":"null"}]},"collection_paused":{"type":"boolean","description":"True while new events are dropped (the monthly limit is reached, or staff paused collection)"},"pause_reason":{"anyOf":[{"type":"string","description":"Why collection is paused: limit (the monthly allowance is reached) or staff. null when collecting"},{"type":"null"}]},"collection_paused_at":{"anyOf":[{"type":"string","format":"date-time","description":"When staff paused collection"},{"type":"null"}]},"resumes_at":{"anyOf":[{"type":"string","format":"date-time","description":"When a limit pause lifts: the start of next month (UTC), or earlier on an upgrade. null otherwise"},{"type":"null"}]}},"description":"This month so far"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"billing_badge","x-permission":"billing.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean","description":"true to verify the badge and earn the bonus"}},"required":["enabled"]}}}}}},"/workspaces/{workspace_id}/billing/cancel.json":{"post":{"operationId":"billing_cancel","summary":"Cancel at the end of the billing period","tags":["Billing"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"workspace_id":{"type":"string"},"plan":{"type":"string","description":"free, pro, business or enterprise"},"plan_events":{"type":"integer","description":"Events a month in the paid tier"},"allowance":{"type":"integer","description":"Events a month including any badge bonus"},"billing_interval":{"anyOf":[{"type":"string","description":"month or year"},{"type":"null"}]},"price":{"anyOf":[{"type":"integer","description":"USD per billing interval"},{"type":"null"}]},"subscription_status":{"type":"string","description":"none, trialing, active, past_due, paused or canceled"},"current_period_ends_at":{"anyOf":[{"type":"string","format":"date-time","description":"Renews or ends at"},{"type":"null"}]},"cancel_at_period_end":{"type":"boolean"},"canceled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"auto_upgrade":{"type":"boolean"},"discount":{"anyOf":[{"type":"object","properties":{"program":{"type":"string","description":"nonprofit, education, open_source, open_source_free or agency"},"status":{"type":"string","description":"pending, approved (not yet on the subscription), active, rejected or revoked"},"percent":{"anyOf":[{"type":"integer","description":"Percent off Pro and Business (null for the free open-source program)"},{"type":"null"}]},"comp_events":{"anyOf":[{"type":"integer","description":"Free events a month (free open-source program only)"},{"type":"null"}]},"organization_name":{"type":"string","description":"Organization, school, project or agency name"},"website":{"anyOf":[{"type":"string","description":"Website"},{"type":"null"}]},"proof_url":{"anyOf":[{"type":"string","description":"Proof link or repository URL"},{"type":"null"}]},"license":{"anyOf":[{"type":"string","description":"OSI license (open source)"},{"type":"null"}]},"note":{"anyOf":[{"type":"string","description":"Note for the review"},{"type":"null"}]},"rejection_reason":{"anyOf":[{"type":"string","description":"Why the application was not approved"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","description":"Applied at"},"reviewed_at":{"anyOf":[{"type":"string","format":"date-time","description":"Reviewed at"},{"type":"null"}]},"applied_at":{"anyOf":[{"type":"string","format":"date-time","description":"Discount active since"},{"type":"null"}]},"revoked_at":{"anyOf":[{"type":"string","format":"date-time","description":"Program ended at"},{"type":"null"}]}},"description":"The latest discount program application, or null"},{"type":"null"}]},"discount_percent":{"anyOf":[{"type":"integer","description":"Percent off Pro and Business from an approved program, or null"},{"type":"null"}]},"billing_emails":{"type":"array","items":{"type":"string"}},"tax_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"badge":{"type":"object","description":"Badge bonus (free plan)"},"usage":{"type":"object","properties":{"month":{"type":"string","format":"date","description":"First day of the month reported"},"events":{"type":"integer","description":"Billable events (pageviews and custom events)"},"bots":{"type":"integer","description":"Bot hits filtered out (not billed)"},"allowance":{"type":"integer","description":"Events included, with any badge bonus"},"percent":{"type":"number","description":"Events as a percent of the allowance"},"forecast":{"anyOf":[{"type":"integer","description":"Projected events at month end"},{"type":"null"}]},"forecast_percent":{"anyOf":[{"type":"number"},{"type":"null"}]},"days_left":{"type":"integer","description":"Days left in the month"},"status":{"type":"string","description":"ok, warning (80%+), over (a past month at or over the allowance), locked or paused"},"sites":{"type":"array","items":{"type":"object","properties":{"site_id":{"type":"string"},"domain":{"type":"string"},"name":{"type":"string"},"events":{"type":"integer","description":"Pageviews and custom events this month"},"share":{"type":"number","description":"Percent of the workspace total"}}},"description":"Events by site"},"history":{"type":"array","description":"Previous months, newest first"},"access_locked_at":{"anyOf":[{"type":"string","format":"date-time","description":"Dashboards locked by Privatus Analytics staff since"},{"type":"null"}]},"collection_paused":{"type":"boolean","description":"True while new events are dropped (the monthly limit is reached, or staff paused collection)"},"pause_reason":{"anyOf":[{"type":"string","description":"Why collection is paused: limit (the monthly allowance is reached) or staff. null when collecting"},{"type":"null"}]},"collection_paused_at":{"anyOf":[{"type":"string","format":"date-time","description":"When staff paused collection"},{"type":"null"}]},"resumes_at":{"anyOf":[{"type":"string","format":"date-time","description":"When a limit pause lifts: the start of next month (UTC), or earlier on an upgrade. null otherwise"},{"type":"null"}]}},"description":"This month so far"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"billing_cancel","x-permission":"billing.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","description":"Main reason for canceling (optional survey)","enum":["too_expensive","missing_features","switching_tool","not_using","temporary","other"]},"comment":{"type":"string","description":"Anything we could do better"}}}}}}}},"/workspaces/{workspace_id}/billing/change_plan.json":{"post":{"operationId":"billing_change_plan","summary":"Change plan, tier or interval (prorated)","tags":["Billing"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"workspace_id":{"type":"string"},"plan":{"type":"string","description":"free, pro, business or enterprise"},"plan_events":{"type":"integer","description":"Events a month in the paid tier"},"allowance":{"type":"integer","description":"Events a month including any badge bonus"},"billing_interval":{"anyOf":[{"type":"string","description":"month or year"},{"type":"null"}]},"price":{"anyOf":[{"type":"integer","description":"USD per billing interval"},{"type":"null"}]},"subscription_status":{"type":"string","description":"none, trialing, active, past_due, paused or canceled"},"current_period_ends_at":{"anyOf":[{"type":"string","format":"date-time","description":"Renews or ends at"},{"type":"null"}]},"cancel_at_period_end":{"type":"boolean"},"canceled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"auto_upgrade":{"type":"boolean"},"discount":{"anyOf":[{"type":"object","properties":{"program":{"type":"string","description":"nonprofit, education, open_source, open_source_free or agency"},"status":{"type":"string","description":"pending, approved (not yet on the subscription), active, rejected or revoked"},"percent":{"anyOf":[{"type":"integer","description":"Percent off Pro and Business (null for the free open-source program)"},{"type":"null"}]},"comp_events":{"anyOf":[{"type":"integer","description":"Free events a month (free open-source program only)"},{"type":"null"}]},"organization_name":{"type":"string","description":"Organization, school, project or agency name"},"website":{"anyOf":[{"type":"string","description":"Website"},{"type":"null"}]},"proof_url":{"anyOf":[{"type":"string","description":"Proof link or repository URL"},{"type":"null"}]},"license":{"anyOf":[{"type":"string","description":"OSI license (open source)"},{"type":"null"}]},"note":{"anyOf":[{"type":"string","description":"Note for the review"},{"type":"null"}]},"rejection_reason":{"anyOf":[{"type":"string","description":"Why the application was not approved"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","description":"Applied at"},"reviewed_at":{"anyOf":[{"type":"string","format":"date-time","description":"Reviewed at"},{"type":"null"}]},"applied_at":{"anyOf":[{"type":"string","format":"date-time","description":"Discount active since"},{"type":"null"}]},"revoked_at":{"anyOf":[{"type":"string","format":"date-time","description":"Program ended at"},{"type":"null"}]}},"description":"The latest discount program application, or null"},{"type":"null"}]},"discount_percent":{"anyOf":[{"type":"integer","description":"Percent off Pro and Business from an approved program, or null"},{"type":"null"}]},"billing_emails":{"type":"array","items":{"type":"string"}},"tax_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"badge":{"type":"object","description":"Badge bonus (free plan)"},"usage":{"type":"object","properties":{"month":{"type":"string","format":"date","description":"First day of the month reported"},"events":{"type":"integer","description":"Billable events (pageviews and custom events)"},"bots":{"type":"integer","description":"Bot hits filtered out (not billed)"},"allowance":{"type":"integer","description":"Events included, with any badge bonus"},"percent":{"type":"number","description":"Events as a percent of the allowance"},"forecast":{"anyOf":[{"type":"integer","description":"Projected events at month end"},{"type":"null"}]},"forecast_percent":{"anyOf":[{"type":"number"},{"type":"null"}]},"days_left":{"type":"integer","description":"Days left in the month"},"status":{"type":"string","description":"ok, warning (80%+), over (a past month at or over the allowance), locked or paused"},"sites":{"type":"array","items":{"type":"object","properties":{"site_id":{"type":"string"},"domain":{"type":"string"},"name":{"type":"string"},"events":{"type":"integer","description":"Pageviews and custom events this month"},"share":{"type":"number","description":"Percent of the workspace total"}}},"description":"Events by site"},"history":{"type":"array","description":"Previous months, newest first"},"access_locked_at":{"anyOf":[{"type":"string","format":"date-time","description":"Dashboards locked by Privatus Analytics staff since"},{"type":"null"}]},"collection_paused":{"type":"boolean","description":"True while new events are dropped (the monthly limit is reached, or staff paused collection)"},"pause_reason":{"anyOf":[{"type":"string","description":"Why collection is paused: limit (the monthly allowance is reached) or staff. null when collecting"},{"type":"null"}]},"collection_paused_at":{"anyOf":[{"type":"string","format":"date-time","description":"When staff paused collection"},{"type":"null"}]},"resumes_at":{"anyOf":[{"type":"string","format":"date-time","description":"When a limit pause lifts: the start of next month (UTC), or earlier on an upgrade. null otherwise"},{"type":"null"}]}},"description":"This month so far"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"billing_change_plan","x-permission":"billing.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"plan":{"type":"string","description":"Plan to switch to: pro or business","enum":["pro","business"]},"events":{"type":"integer","description":"Events a month of the tier, from GET /plans","examples":[1000000]},"interval":{"type":"string","description":"Billing interval. Yearly is 2 months free","enum":["month","year"],"default":"month"}},"required":["plan","events"]}}}}}},"/workspaces/{workspace_id}/billing/checkout.json":{"post":{"operationId":"billing_checkout","summary":"Start a Paddle checkout for a paid plan","tags":["Billing"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"transaction_id":{"type":"string","description":"Paddle transaction id (txn_...)"},"url":{"anyOf":[{"type":"string","description":"Hosted checkout URL"},{"type":"null"}]},"price_id":{"type":"string"},"plan":{"type":"string"},"events":{"type":"integer"},"interval":{"type":"string"},"amount":{"type":"integer","description":"USD per interval"},"client_token":{"anyOf":[{"type":"string","description":"Paddle.js client-side token"},{"type":"null"}]},"environment":{"type":"string","description":"sandbox or production"},"custom_data":{"type":"object","description":"Passed to Paddle to link the subscription"},"discount_id":{"anyOf":[{"type":"string","description":"Paddle discount id of an approved program, applied to this checkout"},{"type":"null"}]}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"billing_checkout","x-permission":"billing.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"plan":{"type":"string","description":"Plan to switch to: pro or business","enum":["pro","business"]},"events":{"type":"integer","description":"Events a month of the tier, from GET /plans","examples":[1000000]},"interval":{"type":"string","description":"Billing interval. Yearly is 2 months free","enum":["month","year"],"default":"month"}},"required":["plan","events"]}}}}}},"/workspaces/{workspace_id}/billing/discount.json":{"post":{"operationId":"billing_discount","summary":"Apply for a discount program (nonprofit, education, open source or agency)","tags":["Billing"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"program":{"type":"string","description":"nonprofit, education, open_source, open_source_free or agency"},"status":{"type":"string","description":"pending, approved (not yet on the subscription), active, rejected or revoked"},"percent":{"anyOf":[{"type":"integer","description":"Percent off Pro and Business (null for the free open-source program)"},{"type":"null"}]},"comp_events":{"anyOf":[{"type":"integer","description":"Free events a month (free open-source program only)"},{"type":"null"}]},"organization_name":{"type":"string","description":"Organization, school, project or agency name"},"website":{"anyOf":[{"type":"string","description":"Website"},{"type":"null"}]},"proof_url":{"anyOf":[{"type":"string","description":"Proof link or repository URL"},{"type":"null"}]},"license":{"anyOf":[{"type":"string","description":"OSI license (open source)"},{"type":"null"}]},"note":{"anyOf":[{"type":"string","description":"Note for the review"},{"type":"null"}]},"rejection_reason":{"anyOf":[{"type":"string","description":"Why the application was not approved"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","description":"Applied at"},"reviewed_at":{"anyOf":[{"type":"string","format":"date-time","description":"Reviewed at"},{"type":"null"}]},"applied_at":{"anyOf":[{"type":"string","format":"date-time","description":"Discount active since"},{"type":"null"}]},"revoked_at":{"anyOf":[{"type":"string","format":"date-time","description":"Program ended at"},{"type":"null"}]}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"billing_discount","x-permission":"billing.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"program":{"type":"string","description":"nonprofit, education, open_source (50% off), open_source_free (free Pro up to 1M events a month) or agency (20% off every workspace you own)","enum":["nonprofit","education","open_source","open_source_free","agency"]},"organization_name":{"type":"string","description":"Name of the organization, school, project or agency"},"website":{"type":"string","description":"Its website"},"proof_url":{"type":"string","description":"Proof link. For open source, the repository URL"},"license":{"type":"string","description":"OSI license of the project (open source only)"},"note":{"type":"string","description":"Anything that helps the review, up to 1,000 characters"}},"required":["program","organization_name"]}}}}}},"/workspaces/{workspace_id}/billing/payment_method.json":{"post":{"operationId":"billing_payment_method","summary":"Get a link to update the payment method","tags":["Billing"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"kind":{"type":"string","description":"portal, payment_method or invoice"},"url":{"anyOf":[{"type":"string","description":"Short-lived Paddle URL"},{"type":"null"}]}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"billing_payment_method","x-permission":"billing.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/workspaces/{workspace_id}/billing/portal.json":{"post":{"operationId":"billing_portal","summary":"Get a Paddle customer portal link","tags":["Billing"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"kind":{"type":"string","description":"portal, payment_method or invoice"},"url":{"anyOf":[{"type":"string","description":"Short-lived Paddle URL"},{"type":"null"}]}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"billing_portal","x-permission":"billing.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/workspaces/{workspace_id}/billing/preview.json":{"get":{"operationId":"billing_preview","summary":"Preview a plan change with proration","tags":["Billing"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"plan","in":"query","required":false,"schema":{"type":"string","description":"Plan to switch to: pro or business","enum":["pro","business"]}},{"name":"events","in":"query","required":false,"schema":{"type":"integer","description":"Events a month of the tier, from GET /plans","examples":[1000000]}},{"name":"interval","in":"query","required":false,"schema":{"type":"string","description":"Billing interval. Yearly is 2 months free","enum":["month","year"],"default":"month"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"plan":{"type":"string"},"events":{"type":"integer"},"interval":{"type":"string"},"price_id":{"type":"string"},"amount":{"type":"integer","description":"New price in USD per interval"},"currency":{"type":"string"},"charge_minor":{"type":"integer","description":"Charged now, in minor units"},"credit_minor":{"type":"integer","description":"Credit for unused time, minor units"},"result_action":{"anyOf":[{"type":"string","description":"charge or credit"},{"type":"null"}]},"result_minor":{"type":"integer","description":"Net charge or credit, minor units"},"next_billed_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"warnings":{"type":"array","items":{"type":"string"},"description":"Usage or limits the new plan would not cover"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"billing_preview","x-permission":"billing.manage"}},"/workspaces/{workspace_id}/billing/resume.json":{"post":{"operationId":"billing_resume","summary":"Undo a scheduled cancellation or resume a pause","tags":["Billing"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"workspace_id":{"type":"string"},"plan":{"type":"string","description":"free, pro, business or enterprise"},"plan_events":{"type":"integer","description":"Events a month in the paid tier"},"allowance":{"type":"integer","description":"Events a month including any badge bonus"},"billing_interval":{"anyOf":[{"type":"string","description":"month or year"},{"type":"null"}]},"price":{"anyOf":[{"type":"integer","description":"USD per billing interval"},{"type":"null"}]},"subscription_status":{"type":"string","description":"none, trialing, active, past_due, paused or canceled"},"current_period_ends_at":{"anyOf":[{"type":"string","format":"date-time","description":"Renews or ends at"},{"type":"null"}]},"cancel_at_period_end":{"type":"boolean"},"canceled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"auto_upgrade":{"type":"boolean"},"discount":{"anyOf":[{"type":"object","properties":{"program":{"type":"string","description":"nonprofit, education, open_source, open_source_free or agency"},"status":{"type":"string","description":"pending, approved (not yet on the subscription), active, rejected or revoked"},"percent":{"anyOf":[{"type":"integer","description":"Percent off Pro and Business (null for the free open-source program)"},{"type":"null"}]},"comp_events":{"anyOf":[{"type":"integer","description":"Free events a month (free open-source program only)"},{"type":"null"}]},"organization_name":{"type":"string","description":"Organization, school, project or agency name"},"website":{"anyOf":[{"type":"string","description":"Website"},{"type":"null"}]},"proof_url":{"anyOf":[{"type":"string","description":"Proof link or repository URL"},{"type":"null"}]},"license":{"anyOf":[{"type":"string","description":"OSI license (open source)"},{"type":"null"}]},"note":{"anyOf":[{"type":"string","description":"Note for the review"},{"type":"null"}]},"rejection_reason":{"anyOf":[{"type":"string","description":"Why the application was not approved"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","description":"Applied at"},"reviewed_at":{"anyOf":[{"type":"string","format":"date-time","description":"Reviewed at"},{"type":"null"}]},"applied_at":{"anyOf":[{"type":"string","format":"date-time","description":"Discount active since"},{"type":"null"}]},"revoked_at":{"anyOf":[{"type":"string","format":"date-time","description":"Program ended at"},{"type":"null"}]}},"description":"The latest discount program application, or null"},{"type":"null"}]},"discount_percent":{"anyOf":[{"type":"integer","description":"Percent off Pro and Business from an approved program, or null"},{"type":"null"}]},"billing_emails":{"type":"array","items":{"type":"string"}},"tax_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"badge":{"type":"object","description":"Badge bonus (free plan)"},"usage":{"type":"object","properties":{"month":{"type":"string","format":"date","description":"First day of the month reported"},"events":{"type":"integer","description":"Billable events (pageviews and custom events)"},"bots":{"type":"integer","description":"Bot hits filtered out (not billed)"},"allowance":{"type":"integer","description":"Events included, with any badge bonus"},"percent":{"type":"number","description":"Events as a percent of the allowance"},"forecast":{"anyOf":[{"type":"integer","description":"Projected events at month end"},{"type":"null"}]},"forecast_percent":{"anyOf":[{"type":"number"},{"type":"null"}]},"days_left":{"type":"integer","description":"Days left in the month"},"status":{"type":"string","description":"ok, warning (80%+), over (a past month at or over the allowance), locked or paused"},"sites":{"type":"array","items":{"type":"object","properties":{"site_id":{"type":"string"},"domain":{"type":"string"},"name":{"type":"string"},"events":{"type":"integer","description":"Pageviews and custom events this month"},"share":{"type":"number","description":"Percent of the workspace total"}}},"description":"Events by site"},"history":{"type":"array","description":"Previous months, newest first"},"access_locked_at":{"anyOf":[{"type":"string","format":"date-time","description":"Dashboards locked by Privatus Analytics staff since"},{"type":"null"}]},"collection_paused":{"type":"boolean","description":"True while new events are dropped (the monthly limit is reached, or staff paused collection)"},"pause_reason":{"anyOf":[{"type":"string","description":"Why collection is paused: limit (the monthly allowance is reached) or staff. null when collecting"},{"type":"null"}]},"collection_paused_at":{"anyOf":[{"type":"string","format":"date-time","description":"When staff paused collection"},{"type":"null"}]},"resumes_at":{"anyOf":[{"type":"string","format":"date-time","description":"When a limit pause lifts: the start of next month (UTC), or earlier on an upgrade. null otherwise"},{"type":"null"}]}},"description":"This month so far"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"billing_resume","x-permission":"billing.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/workspaces/{workspace_id}/billing.json":{"get":{"operationId":"billing_get","summary":"Get the plan, subscription and usage","tags":["Billing"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"workspace_id":{"type":"string"},"plan":{"type":"string","description":"free, pro, business or enterprise"},"plan_events":{"type":"integer","description":"Events a month in the paid tier"},"allowance":{"type":"integer","description":"Events a month including any badge bonus"},"billing_interval":{"anyOf":[{"type":"string","description":"month or year"},{"type":"null"}]},"price":{"anyOf":[{"type":"integer","description":"USD per billing interval"},{"type":"null"}]},"subscription_status":{"type":"string","description":"none, trialing, active, past_due, paused or canceled"},"current_period_ends_at":{"anyOf":[{"type":"string","format":"date-time","description":"Renews or ends at"},{"type":"null"}]},"cancel_at_period_end":{"type":"boolean"},"canceled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"auto_upgrade":{"type":"boolean"},"discount":{"anyOf":[{"type":"object","properties":{"program":{"type":"string","description":"nonprofit, education, open_source, open_source_free or agency"},"status":{"type":"string","description":"pending, approved (not yet on the subscription), active, rejected or revoked"},"percent":{"anyOf":[{"type":"integer","description":"Percent off Pro and Business (null for the free open-source program)"},{"type":"null"}]},"comp_events":{"anyOf":[{"type":"integer","description":"Free events a month (free open-source program only)"},{"type":"null"}]},"organization_name":{"type":"string","description":"Organization, school, project or agency name"},"website":{"anyOf":[{"type":"string","description":"Website"},{"type":"null"}]},"proof_url":{"anyOf":[{"type":"string","description":"Proof link or repository URL"},{"type":"null"}]},"license":{"anyOf":[{"type":"string","description":"OSI license (open source)"},{"type":"null"}]},"note":{"anyOf":[{"type":"string","description":"Note for the review"},{"type":"null"}]},"rejection_reason":{"anyOf":[{"type":"string","description":"Why the application was not approved"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","description":"Applied at"},"reviewed_at":{"anyOf":[{"type":"string","format":"date-time","description":"Reviewed at"},{"type":"null"}]},"applied_at":{"anyOf":[{"type":"string","format":"date-time","description":"Discount active since"},{"type":"null"}]},"revoked_at":{"anyOf":[{"type":"string","format":"date-time","description":"Program ended at"},{"type":"null"}]}},"description":"The latest discount program application, or null"},{"type":"null"}]},"discount_percent":{"anyOf":[{"type":"integer","description":"Percent off Pro and Business from an approved program, or null"},{"type":"null"}]},"billing_emails":{"type":"array","items":{"type":"string"}},"tax_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"badge":{"type":"object","description":"Badge bonus (free plan)"},"usage":{"type":"object","properties":{"month":{"type":"string","format":"date","description":"First day of the month reported"},"events":{"type":"integer","description":"Billable events (pageviews and custom events)"},"bots":{"type":"integer","description":"Bot hits filtered out (not billed)"},"allowance":{"type":"integer","description":"Events included, with any badge bonus"},"percent":{"type":"number","description":"Events as a percent of the allowance"},"forecast":{"anyOf":[{"type":"integer","description":"Projected events at month end"},{"type":"null"}]},"forecast_percent":{"anyOf":[{"type":"number"},{"type":"null"}]},"days_left":{"type":"integer","description":"Days left in the month"},"status":{"type":"string","description":"ok, warning (80%+), over (a past month at or over the allowance), locked or paused"},"sites":{"type":"array","items":{"type":"object","properties":{"site_id":{"type":"string"},"domain":{"type":"string"},"name":{"type":"string"},"events":{"type":"integer","description":"Pageviews and custom events this month"},"share":{"type":"number","description":"Percent of the workspace total"}}},"description":"Events by site"},"history":{"type":"array","description":"Previous months, newest first"},"access_locked_at":{"anyOf":[{"type":"string","format":"date-time","description":"Dashboards locked by Privatus Analytics staff since"},{"type":"null"}]},"collection_paused":{"type":"boolean","description":"True while new events are dropped (the monthly limit is reached, or staff paused collection)"},"pause_reason":{"anyOf":[{"type":"string","description":"Why collection is paused: limit (the monthly allowance is reached) or staff. null when collecting"},{"type":"null"}]},"collection_paused_at":{"anyOf":[{"type":"string","format":"date-time","description":"When staff paused collection"},{"type":"null"}]},"resumes_at":{"anyOf":[{"type":"string","format":"date-time","description":"When a limit pause lifts: the start of next month (UTC), or earlier on an upgrade. null otherwise"},{"type":"null"}]}},"description":"This month so far"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"billing_get","x-permission":"billing.manage"},"patch":{"operationId":"billing_update","summary":"Update billing emails, tax id and auto-upgrade","tags":["Billing"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"workspace_id":{"type":"string"},"plan":{"type":"string","description":"free, pro, business or enterprise"},"plan_events":{"type":"integer","description":"Events a month in the paid tier"},"allowance":{"type":"integer","description":"Events a month including any badge bonus"},"billing_interval":{"anyOf":[{"type":"string","description":"month or year"},{"type":"null"}]},"price":{"anyOf":[{"type":"integer","description":"USD per billing interval"},{"type":"null"}]},"subscription_status":{"type":"string","description":"none, trialing, active, past_due, paused or canceled"},"current_period_ends_at":{"anyOf":[{"type":"string","format":"date-time","description":"Renews or ends at"},{"type":"null"}]},"cancel_at_period_end":{"type":"boolean"},"canceled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"auto_upgrade":{"type":"boolean"},"discount":{"anyOf":[{"type":"object","properties":{"program":{"type":"string","description":"nonprofit, education, open_source, open_source_free or agency"},"status":{"type":"string","description":"pending, approved (not yet on the subscription), active, rejected or revoked"},"percent":{"anyOf":[{"type":"integer","description":"Percent off Pro and Business (null for the free open-source program)"},{"type":"null"}]},"comp_events":{"anyOf":[{"type":"integer","description":"Free events a month (free open-source program only)"},{"type":"null"}]},"organization_name":{"type":"string","description":"Organization, school, project or agency name"},"website":{"anyOf":[{"type":"string","description":"Website"},{"type":"null"}]},"proof_url":{"anyOf":[{"type":"string","description":"Proof link or repository URL"},{"type":"null"}]},"license":{"anyOf":[{"type":"string","description":"OSI license (open source)"},{"type":"null"}]},"note":{"anyOf":[{"type":"string","description":"Note for the review"},{"type":"null"}]},"rejection_reason":{"anyOf":[{"type":"string","description":"Why the application was not approved"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","description":"Applied at"},"reviewed_at":{"anyOf":[{"type":"string","format":"date-time","description":"Reviewed at"},{"type":"null"}]},"applied_at":{"anyOf":[{"type":"string","format":"date-time","description":"Discount active since"},{"type":"null"}]},"revoked_at":{"anyOf":[{"type":"string","format":"date-time","description":"Program ended at"},{"type":"null"}]}},"description":"The latest discount program application, or null"},{"type":"null"}]},"discount_percent":{"anyOf":[{"type":"integer","description":"Percent off Pro and Business from an approved program, or null"},{"type":"null"}]},"billing_emails":{"type":"array","items":{"type":"string"}},"tax_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"badge":{"type":"object","description":"Badge bonus (free plan)"},"usage":{"type":"object","properties":{"month":{"type":"string","format":"date","description":"First day of the month reported"},"events":{"type":"integer","description":"Billable events (pageviews and custom events)"},"bots":{"type":"integer","description":"Bot hits filtered out (not billed)"},"allowance":{"type":"integer","description":"Events included, with any badge bonus"},"percent":{"type":"number","description":"Events as a percent of the allowance"},"forecast":{"anyOf":[{"type":"integer","description":"Projected events at month end"},{"type":"null"}]},"forecast_percent":{"anyOf":[{"type":"number"},{"type":"null"}]},"days_left":{"type":"integer","description":"Days left in the month"},"status":{"type":"string","description":"ok, warning (80%+), over (a past month at or over the allowance), locked or paused"},"sites":{"type":"array","items":{"type":"object","properties":{"site_id":{"type":"string"},"domain":{"type":"string"},"name":{"type":"string"},"events":{"type":"integer","description":"Pageviews and custom events this month"},"share":{"type":"number","description":"Percent of the workspace total"}}},"description":"Events by site"},"history":{"type":"array","description":"Previous months, newest first"},"access_locked_at":{"anyOf":[{"type":"string","format":"date-time","description":"Dashboards locked by Privatus Analytics staff since"},{"type":"null"}]},"collection_paused":{"type":"boolean","description":"True while new events are dropped (the monthly limit is reached, or staff paused collection)"},"pause_reason":{"anyOf":[{"type":"string","description":"Why collection is paused: limit (the monthly allowance is reached) or staff. null when collecting"},{"type":"null"}]},"collection_paused_at":{"anyOf":[{"type":"string","format":"date-time","description":"When staff paused collection"},{"type":"null"}]},"resumes_at":{"anyOf":[{"type":"string","format":"date-time","description":"When a limit pause lifts: the start of next month (UTC), or earlier on an upgrade. null otherwise"},{"type":"null"}]}},"description":"This month so far"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"billing_update","x-permission":"billing.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"billing_emails":{"type":"array","items":{"type":"string"},"description":"Extra addresses for invoices and billing notices (up to 5)"},"tax_id":{"type":"string","description":"VAT/GST/tax id shown on invoices"},"auto_upgrade":{"type":"boolean","description":"true to move to the next tier and charge the difference when the monthly limit is reached, instead of pausing collection. Off by default. Turning it on while collection is paused at the limit upgrades and charges right away"}}}}}}}},"/workspaces/{workspace_id}/billing/usage.json":{"get":{"operationId":"billing_usage","summary":"Get this month's usage, forecast and per-site split","tags":["Billing"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"month","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Any day in the month to report (defaults to this month)","examples":["2026-09-01"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"month":{"type":"string","format":"date","description":"First day of the month reported"},"events":{"type":"integer","description":"Billable events (pageviews and custom events)"},"bots":{"type":"integer","description":"Bot hits filtered out (not billed)"},"allowance":{"type":"integer","description":"Events included, with any badge bonus"},"percent":{"type":"number","description":"Events as a percent of the allowance"},"forecast":{"anyOf":[{"type":"integer","description":"Projected events at month end"},{"type":"null"}]},"forecast_percent":{"anyOf":[{"type":"number"},{"type":"null"}]},"days_left":{"type":"integer","description":"Days left in the month"},"status":{"type":"string","description":"ok, warning (80%+), over (a past month at or over the allowance), locked or paused"},"sites":{"type":"array","items":{"type":"object","properties":{"site_id":{"type":"string"},"domain":{"type":"string"},"name":{"type":"string"},"events":{"type":"integer","description":"Pageviews and custom events this month"},"share":{"type":"number","description":"Percent of the workspace total"}}},"description":"Events by site"},"history":{"type":"array","description":"Previous months, newest first"},"access_locked_at":{"anyOf":[{"type":"string","format":"date-time","description":"Dashboards locked by Privatus Analytics staff since"},{"type":"null"}]},"collection_paused":{"type":"boolean","description":"True while new events are dropped (the monthly limit is reached, or staff paused collection)"},"pause_reason":{"anyOf":[{"type":"string","description":"Why collection is paused: limit (the monthly allowance is reached) or staff. null when collecting"},{"type":"null"}]},"collection_paused_at":{"anyOf":[{"type":"string","format":"date-time","description":"When staff paused collection"},{"type":"null"}]},"resumes_at":{"anyOf":[{"type":"string","format":"date-time","description":"When a limit pause lifts: the start of next month (UTC), or earlier on an upgrade. null otherwise"},{"type":"null"}]}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"billing_usage","x-permission":"billing.manage"}},"/workspaces/{workspace_id}/billing/invoices.json":{"get":{"operationId":"billing_invoices_list","summary":"List invoices","tags":["Billing"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Paddle transaction id"},"invoice_number":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","description":"paid, completed, payment_failed, ..."},"amount_minor":{"type":"integer","description":"Total in minor units (cents)"},"currency":{"type":"string"},"billed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"billing_invoices_list","x-permission":"billing.manage"}},"/workspaces/{workspace_id}/billing/invoices/{id}.json":{"get":{"operationId":"billing_invoices_get","summary":"Get the PDF link for an invoice","tags":["Billing"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"kind":{"type":"string","description":"portal, payment_method or invoice"},"url":{"anyOf":[{"type":"string","description":"Short-lived Paddle URL"},{"type":"null"}]}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"billing_invoices_get","x-permission":"billing.manage"}},"/sites/{site_id}/campaigns/costs.json":{"post":{"operationId":"campaign_costs_create","summary":"Set the spend for a campaign in a month","tags":["Campaigns"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Cost entry id"},"campaign":{"type":"string","description":"utm_campaign value"},"month":{"type":"string","description":"Month, YYYY-MM"},"amount_minor":{"type":"integer","description":"Spend in minor units"},"currency":{"type":"string","description":"ISO 4217 currency of the amount"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"campaign_costs_create","x-permission":"content.write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"campaign":{"type":"string","description":"utm_campaign value the spend belongs to","examples":["spring_sale"]},"month":{"type":"string","description":"Month, YYYY-MM","examples":["2026-09"]},"amount":{"type":"number","description":"Spend in major units, e.g. 1250.50"},"currency":{"type":"string","description":"ISO 4217 currency (defaults to the site currency)"}},"required":["campaign","month","amount"]}}}}},"get":{"operationId":"campaign_costs_list","summary":"List campaign cost entries","tags":["Campaigns"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"campaign","in":"query","required":false,"schema":{"type":"string","description":"Only this campaign"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Cost entry id"},"campaign":{"type":"string","description":"utm_campaign value"},"month":{"type":"string","description":"Month, YYYY-MM"},"amount_minor":{"type":"integer","description":"Spend in minor units"},"currency":{"type":"string","description":"ISO 4217 currency of the amount"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"campaign_costs_list","x-permission":"analytics.read"}},"/sites/{site_id}/campaigns/costs/{id}.json":{"delete":{"operationId":"campaign_costs_delete","summary":"Delete a campaign cost entry","tags":["Campaigns"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Cost entry id"},"campaign":{"type":"string","description":"utm_campaign value"},"month":{"type":"string","description":"Month, YYYY-MM"},"amount_minor":{"type":"integer","description":"Spend in minor units"},"currency":{"type":"string","description":"ISO 4217 currency of the amount"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"campaign_costs_delete","x-permission":"content.write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}},"patch":{"operationId":"campaign_costs_update","summary":"Change a campaign cost entry","tags":["Campaigns"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Cost entry id"},"campaign":{"type":"string","description":"utm_campaign value"},"month":{"type":"string","description":"Month, YYYY-MM"},"amount_minor":{"type":"integer","description":"Spend in minor units"},"currency":{"type":"string","description":"ISO 4217 currency of the amount"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"campaign_costs_update","x-permission":"content.write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"campaign":{"type":"string","description":"utm_campaign value"},"month":{"type":"string","description":"Month, YYYY-MM"},"amount":{"type":"number","description":"Spend in major units"},"currency":{"type":"string","description":"ISO 4217 currency"}}}}}}}},"/sites/{site_id}/campaigns/costs/import.json":{"post":{"operationId":"campaign_costs_import","summary":"Import campaign costs from CSV (campaign,month,amount[,currency])","tags":["Campaigns"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"imported":{"type":"integer","description":"Rows saved"},"failed":{"type":"integer","description":"Rows skipped"},"errors":{"type":"array","items":{"type":"string"},"description":"Why rows were skipped (first 50)"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"campaign_costs_import","x-permission":"content.write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary","description":"CSV file upload (multipart forms)"},"csv":{"type":"string","description":"CSV text: campaign,month,amount[,currency]"}}}}}}}},"/sites/{site_id}/campaigns/builder.json":{"get":{"operationId":"campaigns_builder","summary":"Build and validate a UTM-tagged URL","tags":["Campaigns"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"destination","in":"query","required":false,"schema":{"type":"string","description":"Landing page URL (https://…)","examples":["https://example.com/pricing"]}},{"name":"preset","in":"query","required":false,"schema":{"type":"string","description":"Fill utm_source/utm_medium for a channel when blank","enum":["newsletter","social","paid_search","paid_social","print","partner"]}},{"name":"utm_source","in":"query","required":false,"schema":{"type":"string","description":"Where the traffic comes from"}},{"name":"utm_medium","in":"query","required":false,"schema":{"type":"string","description":"Marketing medium, e.g. email, cpc"}},{"name":"utm_campaign","in":"query","required":false,"schema":{"type":"string","description":"Campaign name, e.g. spring_sale"}},{"name":"utm_content","in":"query","required":false,"schema":{"type":"string","description":"Variant, e.g. header_button"}},{"name":"utm_term","in":"query","required":false,"schema":{"type":"string","description":"Paid search keyword"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"url":{"anyOf":[{"type":"string","description":"Tagged URL (null while there are errors)"},{"type":"null"}]},"valid":{"type":"boolean","description":"True when there are no errors"},"destination":{"anyOf":[{"type":"string"},{"type":"null"}]},"preset":{"anyOf":[{"type":"string"},{"type":"null"}]},"utm_source":{"anyOf":[{"type":"string","description":"Normalized utm_source"},{"type":"null"}]},"utm_medium":{"anyOf":[{"type":"string","description":"Normalized utm_medium"},{"type":"null"}]},"utm_campaign":{"anyOf":[{"type":"string","description":"Normalized utm_campaign"},{"type":"null"}]},"utm_content":{"anyOf":[{"type":"string","description":"Normalized utm_content"},{"type":"null"}]},"utm_term":{"anyOf":[{"type":"string","description":"Normalized utm_term"},{"type":"null"}]},"issues":{"type":"array","items":{"type":"object"},"description":"field, level (error or warning) and message"},"presets":{"type":"object","description":"Channel presets: utm_source/utm_medium per preset"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"campaigns_builder","x-permission":"analytics.read"}},"/sites/{site_id}/campaigns/hygiene.json":{"get":{"operationId":"campaigns_hygiene","summary":"UTM hygiene: near-duplicate values, style issues and unknown sources","tags":["Campaigns"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","description":"Date range preset. Use custom with from/to","enum":["today","yesterday","24h","7d","14d","28d","30d","90d","mtd","last_month","qtd","last_quarter","ytd","12mo","last_year","all","custom"],"default":"30d"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom range start (site timezone)"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom range end, inclusive"}},{"name":"compare","in":"query","required":false,"schema":{"type":"string","description":"Comparison period","enum":["none","previous_period","previous_year","custom"],"default":"none"}},{"name":"compare_from","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom comparison start"}},{"name":"compare_to","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom comparison end"}},{"name":"match_weekday","in":"query","required":false,"schema":{"type":"boolean","description":"Align comparison days of the week","default":false}},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{},"description":"Filters: [[\"dimension\",\"operator\",\"value\"], …]. Operators: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Wrap conditions in {\"any\": [...]} for OR.","default":[]}},{"name":"segment_id","in":"query","required":false,"schema":{"type":"string","description":"Apply a saved segment (seg_…)"}},{"name":"include_imported","in":"query","required":false,"schema":{"type":"boolean","description":"Add imported historical data (dates before the first native event, ignored when filters or a segment are applied)","default":false}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"period":{"type":"object","description":"from/to of the period (UTC)"},"duplicates":{"type":"array","items":{"type":"object"},"description":"Near-duplicate values: field, suggestion and variants [{value, visits}]"},"style_issues":{"type":"array","items":{"type":"object"},"description":"Values that are not lowercase with underscores: field, value, visits, suggestion"},"unknown_sources":{"type":"array","items":{"type":"object"},"description":"utm_source values we do not recognize: value, visits"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"campaigns_hygiene","x-permission":"analytics.read"}},"/sites/{site_id}/campaigns.json":{"get":{"operationId":"campaigns_list","summary":"Campaign rollup with conversions, revenue, cost, CPA and ROAS","tags":["Campaigns"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","description":"Date range preset. Use custom with from/to","enum":["today","yesterday","24h","7d","14d","28d","30d","90d","mtd","last_month","qtd","last_quarter","ytd","12mo","last_year","all","custom"],"default":"30d"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom range start (site timezone)"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom range end, inclusive"}},{"name":"compare","in":"query","required":false,"schema":{"type":"string","description":"Comparison period","enum":["none","previous_period","previous_year","custom"],"default":"none"}},{"name":"compare_from","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom comparison start"}},{"name":"compare_to","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom comparison end"}},{"name":"match_weekday","in":"query","required":false,"schema":{"type":"boolean","description":"Align comparison days of the week","default":false}},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{},"description":"Filters: [[\"dimension\",\"operator\",\"value\"], …]. Operators: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Wrap conditions in {\"any\": [...]} for OR.","default":[]}},{"name":"segment_id","in":"query","required":false,"schema":{"type":"string","description":"Apply a saved segment (seg_…)"}},{"name":"include_imported","in":"query","required":false,"schema":{"type":"boolean","description":"Add imported historical data (dates before the first native event, ignored when filters or a segment are applied)","default":false}},{"name":"goal_id","in":"query","required":false,"schema":{"type":"string","description":"Goal (goal_…) whose conversions to count. Defaults to the first active goal"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"period":{"type":"object","description":"from/to of the period (UTC)"},"currency":{"type":"string","description":"Site currency for revenue and cost"},"goal_id":{"anyOf":[{"type":"string","description":"Goal counted as a conversion"},{"type":"null"}]},"goal_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"campaigns":{"type":"array","items":{"type":"object"},"description":"Per utm_campaign: visitors, visits, conversions, conversion_rate, revenue, cost, cpa (minor units), roas (revenue ÷ cost) and sources [{source, medium, visitors, visits, conversions, conversion_rate, revenue}]"},"totals":{"type":"object","description":"Sums over all listed campaigns"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"campaigns_list","x-permission":"analytics.read"}},"/sites/{site_id}/campaigns/links.json":{"post":{"operationId":"links_create","summary":"Save a UTM-tagged link to the library","tags":["Campaigns"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Link id, e.g. lnk_7Q2K9XH3AB"},"name":{"type":"string"},"destination":{"type":"string","description":"Landing page URL"},"utm_source":{"anyOf":[{"type":"string"},{"type":"null"}]},"utm_medium":{"anyOf":[{"type":"string"},{"type":"null"}]},"utm_campaign":{"anyOf":[{"type":"string"},{"type":"null"}]},"utm_content":{"anyOf":[{"type":"string"},{"type":"null"}]},"utm_term":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"type":"string","description":"Full tagged URL to share"},"tags":{"type":"array","items":{"type":"string"}},"notes":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"links_create","x-permission":"content.write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Link name","examples":["Spring newsletter"]},"destination":{"type":"string","description":"Landing page URL (https://…)","examples":["https://example.com/pricing"]},"utm_source":{"type":"string","description":"utm_source value (lowercased, spaces become underscores)"},"utm_medium":{"type":"string","description":"utm_medium value (lowercased, spaces become underscores)"},"utm_campaign":{"type":"string","description":"utm_campaign value (lowercased, spaces become underscores)"},"utm_content":{"type":"string","description":"utm_content value (lowercased, spaces become underscores)"},"utm_term":{"type":"string","description":"utm_term value (lowercased, spaces become underscores)"},"tags":{"type":"array","items":{"type":"string"},"description":"Tags. Comma-separated values are split","default":[]},"notes":{"type":"string","description":"Free-text notes"}},"required":["name","destination"]}}}}},"get":{"operationId":"links_list","summary":"List saved campaign links","tags":["Campaigns"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"query","in":"query","required":false,"schema":{"type":"string","description":"Search name, destination or campaign"}},{"name":"tag","in":"query","required":false,"schema":{"type":"string","description":"Only links with this tag"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Link id, e.g. lnk_7Q2K9XH3AB"},"name":{"type":"string"},"destination":{"type":"string","description":"Landing page URL"},"utm_source":{"anyOf":[{"type":"string"},{"type":"null"}]},"utm_medium":{"anyOf":[{"type":"string"},{"type":"null"}]},"utm_campaign":{"anyOf":[{"type":"string"},{"type":"null"}]},"utm_content":{"anyOf":[{"type":"string"},{"type":"null"}]},"utm_term":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"type":"string","description":"Full tagged URL to share"},"tags":{"type":"array","items":{"type":"string"}},"notes":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"links_list","x-permission":"analytics.read"}},"/sites/{site_id}/campaigns/links/{id}.json":{"delete":{"operationId":"links_delete","summary":"Delete a saved link","tags":["Campaigns"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Link id, e.g. lnk_7Q2K9XH3AB"},"name":{"type":"string"},"destination":{"type":"string","description":"Landing page URL"},"utm_source":{"anyOf":[{"type":"string"},{"type":"null"}]},"utm_medium":{"anyOf":[{"type":"string"},{"type":"null"}]},"utm_campaign":{"anyOf":[{"type":"string"},{"type":"null"}]},"utm_content":{"anyOf":[{"type":"string"},{"type":"null"}]},"utm_term":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"type":"string","description":"Full tagged URL to share"},"tags":{"type":"array","items":{"type":"string"}},"notes":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"links_delete","x-permission":"content.write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}},"get":{"operationId":"links_get","summary":"Get a saved campaign link","tags":["Campaigns"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Link id, e.g. lnk_7Q2K9XH3AB"},"name":{"type":"string"},"destination":{"type":"string","description":"Landing page URL"},"utm_source":{"anyOf":[{"type":"string"},{"type":"null"}]},"utm_medium":{"anyOf":[{"type":"string"},{"type":"null"}]},"utm_campaign":{"anyOf":[{"type":"string"},{"type":"null"}]},"utm_content":{"anyOf":[{"type":"string"},{"type":"null"}]},"utm_term":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"type":"string","description":"Full tagged URL to share"},"tags":{"type":"array","items":{"type":"string"}},"notes":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"links_get","x-permission":"analytics.read"},"patch":{"operationId":"links_update","summary":"Change a saved link","tags":["Campaigns"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Link id, e.g. lnk_7Q2K9XH3AB"},"name":{"type":"string"},"destination":{"type":"string","description":"Landing page URL"},"utm_source":{"anyOf":[{"type":"string"},{"type":"null"}]},"utm_medium":{"anyOf":[{"type":"string"},{"type":"null"}]},"utm_campaign":{"anyOf":[{"type":"string"},{"type":"null"}]},"utm_content":{"anyOf":[{"type":"string"},{"type":"null"}]},"utm_term":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"type":"string","description":"Full tagged URL to share"},"tags":{"type":"array","items":{"type":"string"}},"notes":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"links_update","x-permission":"content.write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Link name","examples":["Spring newsletter"]},"destination":{"type":"string","description":"Landing page URL (https://…)","examples":["https://example.com/pricing"]},"utm_source":{"type":"string","description":"utm_source value (lowercased, spaces become underscores)"},"utm_medium":{"type":"string","description":"utm_medium value (lowercased, spaces become underscores)"},"utm_campaign":{"type":"string","description":"utm_campaign value (lowercased, spaces become underscores)"},"utm_content":{"type":"string","description":"utm_content value (lowercased, spaces become underscores)"},"utm_term":{"type":"string","description":"utm_term value (lowercased, spaces become underscores)"},"tags":{"type":"array","items":{"type":"string"},"description":"Tags. Comma-separated values are split"},"notes":{"type":"string","description":"Free-text notes"}}}}}}}},"/sites/{site_id}/campaigns/links/{id}/qr.json":{"get":{"operationId":"links_qr","summary":"QR code (SVG) for a saved link","tags":["Campaigns"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","description":"Module size in pixels (2 to 20)","default":6}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"link_id":{"type":"string","description":"Link id"},"url":{"type":"string","description":"The encoded (tagged) URL"},"svg":{"type":"string","description":"Standalone SVG document of the QR code"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"links_qr","x-permission":"analytics.read"}},"/sites/{site_id}/channel_rules.json":{"post":{"operationId":"channel_rules_create","summary":"Add a channel rule","tags":["Channel rules"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Rule id"},"channel":{"type":"string","description":"Channel assigned when all conditions match"},"position":{"type":"integer","description":"Evaluation order (first match wins)"},"conditions":{"type":"array","description":"Conditions: field, operator, value"},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"channel_rules_create","x-permission":"sites.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"channel":{"type":"string","description":"Channel name to assign, e.g. Partners"},"conditions":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"operator":{"type":"string"},"value":{"type":"string"}}},"description":"Conditions that must all match: [{\"field\": \"utm_source\", \"operator\": \"is\", \"value\": \"newsletter\"}]. Fields: referrer_host, utm_source, utm_medium, utm_campaign, ref, path. Operators: is, contains, starts_with, regex."}},"required":["channel","conditions"]}}}}},"get":{"operationId":"channel_rules_list","summary":"List channel rules in order","tags":["Channel rules"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Rule id"},"channel":{"type":"string","description":"Channel assigned when all conditions match"},"position":{"type":"integer","description":"Evaluation order (first match wins)"},"conditions":{"type":"array","description":"Conditions: field, operator, value"},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"channel_rules_list","x-permission":"analytics.read"}},"/sites/{site_id}/channel_rules/{id}.json":{"delete":{"operationId":"channel_rules_delete","summary":"Delete a channel rule","tags":["Channel rules"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Rule id"},"channel":{"type":"string","description":"Channel assigned when all conditions match"},"position":{"type":"integer","description":"Evaluation order (first match wins)"},"conditions":{"type":"array","description":"Conditions: field, operator, value"},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"channel_rules_delete","x-permission":"sites.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}},"patch":{"operationId":"channel_rules_update","summary":"Change a channel rule","tags":["Channel rules"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Rule id"},"channel":{"type":"string","description":"Channel assigned when all conditions match"},"position":{"type":"integer","description":"Evaluation order (first match wins)"},"conditions":{"type":"array","description":"Conditions: field, operator, value"},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"channel_rules_update","x-permission":"sites.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"channel":{"type":"string","description":"Channel name to assign"},"conditions":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"operator":{"type":"string"},"value":{"type":"string"}}},"description":"Conditions that must all match: [{\"field\": \"utm_source\", \"operator\": \"is\", \"value\": \"newsletter\"}]. Fields: referrer_host, utm_source, utm_medium, utm_campaign, ref, path. Operators: is, contains, starts_with, regex."}}}}}}}},"/sites/{site_id}/channel_rules/{id}/move.json":{"patch":{"operationId":"channel_rules_move","summary":"Move a channel rule up or down","tags":["Channel rules"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Rule id"},"channel":{"type":"string","description":"Channel assigned when all conditions match"},"position":{"type":"integer","description":"Evaluation order (first match wins)"},"conditions":{"type":"array","description":"Conditions: field, operator, value"},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"channel_rules_move","x-permission":"sites.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"direction":{"type":"string","description":"Where to move the rule","enum":["up","down","top","bottom"]}},"required":["direction"]}}}}}},"/sites/{site_id}/channel_rules/preview.json":{"post":{"operationId":"channel_rules_preview","summary":"Preview the channel for a sample referrer and UTM tags","tags":["Channel rules"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"channel_rules_preview","x-permission":"analytics.read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"referrer":{"type":"string","description":"Referrer URL or hostname"},"utm_source":{"type":"string","description":"utm_source value"},"utm_medium":{"type":"string","description":"utm_medium value"},"utm_campaign":{"type":"string","description":"utm_campaign value"},"ref":{"type":"string","description":"ref / via / source parameter"},"path":{"type":"string","description":"Landing page path, e.g. /pricing"},"paid_click":{"type":"boolean","description":"The URL had a click id such as gclid","default":false}}}}}}}},"/api/logs.json":{"post":{"operationId":"crawler_logs_create","summary":"Send server access logs for AI crawler reporting (JSON {lines: [...]} or combined log text, with the site ingest key as Bearer token)","tags":["Collection"],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"crawler_logs_create","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"lines":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"string"},"path":{"type":"string","default":"/"},"status":{"type":"integer"},"user_agent":{"type":"string","default":""}}},"description":"Log lines: [{ts, path, status, user_agent}] (max 1000)"}},"required":["lines"]}}}},"security":[]}},"/api/event.json":{"post":{"operationId":"ingest_event","summary":"Collect a browser hit (used by /js/pa.js)","tags":["Collection"],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"ingest_event","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"site":{"type":"string","description":"Site id (pa_…)"},"type":{"type":"string","description":"Hit type","enum":["pageview","event","engagement","vital","click"]},"url":{"type":"string","description":"Full page URL"},"referrer":{"type":"string","description":"document.referrer"},"name":{"type":"string","description":"Event name (type=event) or vital name"},"props":{"type":"object","additionalProperties":true,"description":"Event properties: up to 30 string/number/boolean values","default":{}},"screen_width":{"type":"integer","description":"Screen width in pixels"},"language":{"type":"string","description":"navigator.language"},"engaged_ms":{"type":"integer","description":"Visible time on page (engagement)"},"scroll_depth":{"type":"integer","description":"Max scroll depth % (engagement)"},"value":{"type":"number","description":"Web Vital value (type=vital)"},"selector":{"type":"string","description":"Clicked element selector (type=click)"},"hash_mode":{"type":"boolean","description":"Keep the #fragment (hash-routed sites)","default":false},"dnt":{"type":"boolean","description":"Do Not Track is on","default":false},"gpc":{"type":"boolean","description":"Global Privacy Control is on","default":false},"interacted":{"type":"boolean","description":"1 once a trusted input (pointer, key, touch or wheel) was seen on the page, 0 before. No coordinates or timing"},"revenue":{"type":"number","description":"Revenue in major units, e.g. 49.99"},"currency":{"type":"string","description":"ISO 4217 currency of revenue"}},"required":["site","type","url"]}}}},"security":[]}},"/api/events.json":{"post":{"operationId":"ingest_events","summary":"Collect server-side events with a site ingest key","tags":["Collection"],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"ingest_events","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"events":{"type":"array","items":{"type":"object","additionalProperties":true},"description":"Up to 100 events"}},"required":["events"]}}}},"security":[]}},"/api/pixel.json":{"get":{"operationId":"ingest_pixel","summary":"Collect a pageview without JavaScript (1×1 GIF)","tags":["Collection"],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"ingest_pixel","security":[]}},"/sites/{site_id}/crawlers/connection.json":{"post":{"operationId":"crawlers_cloudflare_connect","summary":"Sync AI crawler hits from a Cloudflare zone (needs a Cloudflare grant from the browser)","tags":["Crawlers"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"zone_id":{"type":"string","description":"Cloudflare zone id"},"zone_name":{"type":"string","description":"Cloudflare zone name, e.g. example.com"},"status":{"type":"string","description":"active or error"},"last_synced_at":{"anyOf":[{"type":"string","format":"date-time","description":"When crawler hits were last imported, or null before the first import"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"crawlers_cloudflare_connect","x-permission":"sites.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"zone_id":{"type":"string","description":"Cloudflare zone id, from crawlers_cloudflare_zones","examples":["023e105f4ecef8ad9ca31a8372d0c353"]}},"required":["zone_id"]}}}}},"delete":{"operationId":"crawlers_cloudflare_disconnect","summary":"Disconnect Cloudflare and delete the crawler hits it imported","tags":["Crawlers"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"zone_id":{"type":"string","description":"Cloudflare zone id"},"zone_name":{"type":"string","description":"Cloudflare zone name, e.g. example.com"},"status":{"type":"string","description":"active or error"},"last_synced_at":{"anyOf":[{"type":"string","format":"date-time","description":"When crawler hits were last imported, or null before the first import"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"crawlers_cloudflare_disconnect","x-permission":"sites.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/sites/{site_id}/crawlers/sync.json":{"post":{"operationId":"crawlers_cloudflare_sync","summary":"Import crawler hits from Cloudflare now","tags":["Crawlers"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"zone_id":{"type":"string","description":"Cloudflare zone id"},"zone_name":{"type":"string","description":"Cloudflare zone name, e.g. example.com"},"status":{"type":"string","description":"active or error"},"last_synced_at":{"anyOf":[{"type":"string","format":"date-time","description":"When crawler hits were last imported, or null before the first import"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"crawlers_cloudflare_sync","x-permission":"sites.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/sites/{site_id}/crawlers/zones.json":{"get":{"operationId":"crawlers_cloudflare_zones","summary":"List the Cloudflare zones you can connect (needs a Cloudflare grant from the browser)","tags":["Crawlers"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"crawlers_cloudflare_zones","x-permission":"sites.manage"}},"/sites/{site_id}/crawlers.json":{"get":{"operationId":"crawlers_report","summary":"AI crawlers report: hits by crawler over time, top paths per crawler, by category","tags":["Crawlers"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","description":"Date range preset. Use custom with from/to","enum":["today","yesterday","24h","7d","14d","28d","30d","90d","mtd","last_month","qtd","last_quarter","ytd","12mo","last_year","all","custom"],"default":"30d"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom range start (site timezone)"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom range end, inclusive"}},{"name":"category","in":"query","required":false,"schema":{"type":"string","description":"ai, search, seo, other or all","enum":["all","ai","search","seo","other"],"default":"ai"}},{"name":"crawler","in":"query","required":false,"schema":{"type":"string","description":"Only this crawler, e.g. GPTBot"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"crawlers_report","x-permission":"analytics.read"}},"/workspaces/{workspace_id}/dashboards/{id}/cards/{index}.json":{"get":{"operationId":"dashboards_card","summary":"Data for one card of a custom dashboard","tags":["Dashboards"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"index","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"dashboards_card","x-permission":"analytics.read"}},"/workspaces/{workspace_id}/dashboards.json":{"post":{"operationId":"dashboards_create","summary":"Create a custom dashboard","tags":["Dashboards"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Dashboard id, e.g. dash_7Q2K9XH3AB"},"name":{"type":"string"},"cards":{"type":"array","items":{"type":"object"},"description":"Cards in order: [{type, site_id, title, params}]"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"dashboards_create","x-permission":"content.write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Dashboard name","examples":["Client: Acme"]},"cards":{"type":"array","items":{},"description":"Cards in order (max 40): [{\"type\": \"metric|chart|breakdown|goal|live|funnel|uptime|vitals\", \"site_id\": \"pa_…\", \"title\": \"optional\", \"params\": {\"period\": \"30d\", \"metric\": \"visitors\", \"dimension\": \"page\", \"funnel_id\": \"fun_…\"}}]. Params a type does not use are ignored","default":[]}},"required":["name"]}}}}},"get":{"operationId":"dashboards_list","summary":"List custom dashboards","tags":["Dashboards"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Dashboard id, e.g. dash_7Q2K9XH3AB"},"name":{"type":"string"},"cards":{"type":"array","items":{"type":"object"},"description":"Cards in order: [{type, site_id, title, params}]"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"dashboards_list","x-permission":"analytics.read"}},"/workspaces/{workspace_id}/dashboards/{id}.json":{"delete":{"operationId":"dashboards_delete","summary":"Delete a custom dashboard","tags":["Dashboards"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Dashboard id, e.g. dash_7Q2K9XH3AB"},"name":{"type":"string"},"cards":{"type":"array","items":{"type":"object"},"description":"Cards in order: [{type, site_id, title, params}]"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"dashboards_delete","x-permission":"content.write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}},"get":{"operationId":"dashboards_get","summary":"Get a custom dashboard and its cards","tags":["Dashboards"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Dashboard id, e.g. dash_7Q2K9XH3AB"},"name":{"type":"string"},"cards":{"type":"array","items":{"type":"object"},"description":"Cards in order: [{type, site_id, title, params}]"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"dashboards_get","x-permission":"analytics.read"},"patch":{"operationId":"dashboards_update","summary":"Rename a custom dashboard or replace its cards","tags":["Dashboards"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Dashboard id, e.g. dash_7Q2K9XH3AB"},"name":{"type":"string"},"cards":{"type":"array","items":{"type":"object"},"description":"Cards in order: [{type, site_id, title, params}]"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"dashboards_update","x-permission":"content.write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"New name (unchanged when empty)"},"cards":{"type":"array","items":{},"description":"Replaces all cards. Cards in order (max 40): [{\"type\": \"metric|chart|breakdown|goal|live|funnel|uptime|vitals\", \"site_id\": \"pa_…\", \"title\": \"optional\", \"params\": {\"period\": \"30d\", \"metric\": \"visitors\", \"dimension\": \"page\", \"funnel_id\": \"fun_…\"}}]. Params a type does not use are ignored"}}}}}}}},"/docs/api.json":{"get":{"operationId":"docs_api","summary":"List every API operation and MCP tool","tags":["Documentation"],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"tool_name":{"type":"string","description":"MCP tool name and OpenAPI operationId"},"summary":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"group":{"type":"string"},"verb":{"type":"string","description":"HTTP method"},"path":{"type":"string","description":"Path template. Add .json for JSON"},"permission":{"anyOf":[{"type":"string"},{"type":"null"}]},"input_schema":{"type":"object","description":"JSON Schema of the inputs"},"response_schema":{"type":"object","description":"JSON Schema of `data`"}}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"docs_api","security":[]}},"/docs.json":{"get":{"operationId":"docs_list","summary":"List documentation pages","tags":["Documentation"],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","description":"Page title"},"description":{"type":"string","description":"One-line summary"},"path":{"type":"string","description":"Page path. Add .md for Markdown or .json for JSON"},"section":{"type":"string","description":"Section slug, e.g. tracker"}}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"docs_list","security":[]}},"/openapi.json":{"get":{"operationId":"docs_openapi","summary":"OpenAPI 3.1 document for the whole API","tags":["Documentation"],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"docs_openapi","security":[]}},"/docs/search.json":{"get":{"operationId":"docs_search","summary":"Search the documentation","tags":["Documentation"],"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","description":"Search text. Blank returns every page.","examples":["content security policy"]}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Maximum results (default: 20 with q, all without)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"title":{"type":"string","description":"Page title"},"path":{"type":"string","description":"Page path"},"section":{"type":"string","description":"Section title"},"headings":{"type":"array","items":{"type":"object"},"description":"Headings on the page: { id, text }"},"excerpt":{"type":"string","description":"Description or first sentences"},"score":{"anyOf":[{"type":"integer","description":"Relevance (only when searching with q)"},{"type":"null"}]}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"docs_search","security":[]}},"/docs/{section}/{page}.json":{"get":{"operationId":"docs_get","summary":"Read a documentation page (Markdown and HTML)","description":"section and page come from the page path /docs/<section>/<page>. Use page \"index\" for a section overview.","tags":["Documentation"],"parameters":[{"name":"section","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"title":{"type":"string","description":"Page title"},"description":{"type":"string","description":"One-line summary"},"path":{"type":"string","description":"Page path. Add .md for Markdown or .json for JSON"},"section":{"type":"string","description":"Section slug, e.g. tracker"},"headings":{"type":"array","items":{"type":"object"},"description":"Sections on the page (id and text)"},"full_markdown":{"type":"string","description":"The page as Markdown (title included)"},"html":{"type":"string","description":"The page body rendered as HTML"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"docs_get","security":[]}},"/recipients/{id}.json":{"delete":{"operationId":"email_report_recipients_delete","summary":"Remove a recipient from an email report","tags":["Email reports"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Recipient id, e.g. rcp_7Q2K9XH3AB"},"email":{"type":"string","description":"The address"},"status":{"type":"string","description":"active, pending, declined or unsubscribed"},"invited_at":{"anyOf":[{"type":"string","format":"date-time","description":"When the last invite was sent"},{"type":"null"}]},"expires_at":{"anyOf":[{"type":"string","format":"date-time","description":"When a pending invite expires"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","format":"date-time","description":"When the address became active"},{"type":"null"}]}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"email_report_recipients_delete","x-permission":"content.write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/reports/{report_id}/recipients.json":{"get":{"operationId":"email_report_recipients_list","summary":"List the recipients of an email report with their status","description":"Statuses: active (gets reports), pending (invited, not yet accepted), declined or unsubscribed. Add or remove addresses through the report's recipients list.","tags":["Email reports"],"parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","description":"Only recipients with this status","enum":["pending","active","declined","unsubscribed"]}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Recipient id, e.g. rcp_7Q2K9XH3AB"},"email":{"type":"string","description":"The address"},"status":{"type":"string","description":"active, pending, declined or unsubscribed"},"invited_at":{"anyOf":[{"type":"string","format":"date-time","description":"When the last invite was sent"},{"type":"null"}]},"expires_at":{"anyOf":[{"type":"string","format":"date-time","description":"When a pending invite expires"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","format":"date-time","description":"When the address became active"},{"type":"null"}]}}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"email_report_recipients_list","x-permission":"analytics.read"}},"/recipients/{id}/resend.json":{"post":{"operationId":"email_report_recipients_resend","summary":"Resend a pending report invite","description":"Sends the invite again with new links. Allowed once every 7 days per address per report.","tags":["Email reports"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Recipient id, e.g. rcp_7Q2K9XH3AB"},"email":{"type":"string","description":"The address"},"status":{"type":"string","description":"active, pending, declined or unsubscribed"},"invited_at":{"anyOf":[{"type":"string","format":"date-time","description":"When the last invite was sent"},{"type":"null"}]},"expires_at":{"anyOf":[{"type":"string","format":"date-time","description":"When a pending invite expires"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","format":"date-time","description":"When the address became active"},{"type":"null"}]}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"email_report_recipients_resend","x-permission":"content.write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/workspaces/{workspace_id}/reports.json":{"post":{"operationId":"email_reports_create","summary":"Create an email report","tags":["Email reports"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Report id, e.g. rep_7Q2K9XH3AB"},"name":{"type":"string"},"site_ids":{"type":"array","items":{"type":"string"},"description":"Site ids in the report"},"frequency":{"type":"string","description":"daily, weekly or monthly"},"hour":{"type":"integer","description":"Send hour (workspace timezone)"},"weekday":{"type":"integer","description":"Weekly: 0 = Sunday … 6 = Saturday"},"recipients":{"type":"array","items":{"type":"string"},"description":"Every address on the report, whatever its status"},"recipient_details":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Recipient id, e.g. rcp_7Q2K9XH3AB"},"email":{"type":"string","description":"The address"},"status":{"type":"string","description":"active, pending, declined or unsubscribed"},"invited_at":{"anyOf":[{"type":"string","format":"date-time","description":"When the last invite was sent"},{"type":"null"}]},"expires_at":{"anyOf":[{"type":"string","format":"date-time","description":"When a pending invite expires"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","format":"date-time","description":"When the address became active"},{"type":"null"}]}}},"description":"Each recipient with its opt-in status (only active recipients get reports)"},"blocks":{"type":"array","items":{"type":"string"},"description":"Content blocks"},"attach_pdf":{"type":"boolean"},"intro":{"anyOf":[{"type":"string"},{"type":"null"}]},"enabled":{"type":"boolean"},"last_sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"next_run_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"email_reports_create","x-permission":"content.write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"site_ids":{"type":"array","items":{"type":"string"},"description":"Site ids (pa_…) included in the report"},"frequency":{"type":"string","description":"daily, weekly (on weekday) or monthly (on the 1st)","enum":["daily","weekly","monthly"]},"hour":{"type":"integer","description":"Hour of day to send (0 to 23, workspace timezone)"},"weekday":{"type":"integer","description":"Weekly reports: 0 = Sunday … 6 = Saturday"},"recipients":{"type":"array","items":{"type":"string"},"description":"Email addresses (no account needed). Entries may be comma or newline separated. Members of the workspace are added at once. Anyone else gets an invite and only receives reports after accepting it. Addresses that opted out of reports are refused"},"blocks":{"type":"array","items":{"type":"string"},"description":"Content: kpis, chart, pages, sources, goals, campaigns, vitals, uptime"},"attach_pdf":{"type":"boolean","description":"Attach a PDF version"},"intro":{"type":"string","description":"Custom intro text (max 2000 chars)"},"enabled":{"type":"boolean","description":"Send on schedule"},"name":{"type":"string","description":"Report name","examples":["Weekly traffic"]}},"required":["name"]}}}}},"get":{"operationId":"email_reports_list","summary":"List email reports","tags":["Email reports"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"frequency","in":"query","required":false,"schema":{"type":"string","description":"Only reports with this frequency","enum":["daily","weekly","monthly"]}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Report id, e.g. rep_7Q2K9XH3AB"},"name":{"type":"string"},"site_ids":{"type":"array","items":{"type":"string"},"description":"Site ids in the report"},"frequency":{"type":"string","description":"daily, weekly or monthly"},"hour":{"type":"integer","description":"Send hour (workspace timezone)"},"weekday":{"type":"integer","description":"Weekly: 0 = Sunday … 6 = Saturday"},"recipients":{"type":"array","items":{"type":"string"},"description":"Every address on the report, whatever its status"},"recipient_details":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Recipient id, e.g. rcp_7Q2K9XH3AB"},"email":{"type":"string","description":"The address"},"status":{"type":"string","description":"active, pending, declined or unsubscribed"},"invited_at":{"anyOf":[{"type":"string","format":"date-time","description":"When the last invite was sent"},{"type":"null"}]},"expires_at":{"anyOf":[{"type":"string","format":"date-time","description":"When a pending invite expires"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","format":"date-time","description":"When the address became active"},{"type":"null"}]}}},"description":"Each recipient with its opt-in status (only active recipients get reports)"},"blocks":{"type":"array","items":{"type":"string"},"description":"Content blocks"},"attach_pdf":{"type":"boolean"},"intro":{"anyOf":[{"type":"string"},{"type":"null"}]},"enabled":{"type":"boolean"},"last_sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"next_run_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"email_reports_list","x-permission":"analytics.read"}},"/reports/{id}/deliveries.json":{"get":{"operationId":"email_reports_deliveries","summary":"Delivery log of an email report","tags":["Email reports"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","description":"Only deliveries with this status","enum":["sent","test","failed","skipped"]}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","description":"sent, test, failed or skipped"},"recipients_count":{"type":"integer"},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"sent_at":{"type":"string","format":"date-time"}}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"email_reports_deliveries","x-permission":"analytics.read"}},"/reports/{id}.json":{"delete":{"operationId":"email_reports_delete","summary":"Delete an email report","tags":["Email reports"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Report id, e.g. rep_7Q2K9XH3AB"},"name":{"type":"string"},"site_ids":{"type":"array","items":{"type":"string"},"description":"Site ids in the report"},"frequency":{"type":"string","description":"daily, weekly or monthly"},"hour":{"type":"integer","description":"Send hour (workspace timezone)"},"weekday":{"type":"integer","description":"Weekly: 0 = Sunday … 6 = Saturday"},"recipients":{"type":"array","items":{"type":"string"},"description":"Every address on the report, whatever its status"},"recipient_details":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Recipient id, e.g. rcp_7Q2K9XH3AB"},"email":{"type":"string","description":"The address"},"status":{"type":"string","description":"active, pending, declined or unsubscribed"},"invited_at":{"anyOf":[{"type":"string","format":"date-time","description":"When the last invite was sent"},{"type":"null"}]},"expires_at":{"anyOf":[{"type":"string","format":"date-time","description":"When a pending invite expires"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","format":"date-time","description":"When the address became active"},{"type":"null"}]}}},"description":"Each recipient with its opt-in status (only active recipients get reports)"},"blocks":{"type":"array","items":{"type":"string"},"description":"Content blocks"},"attach_pdf":{"type":"boolean"},"intro":{"anyOf":[{"type":"string"},{"type":"null"}]},"enabled":{"type":"boolean"},"last_sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"next_run_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"email_reports_delete","x-permission":"content.write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}},"get":{"operationId":"email_reports_get","summary":"Get an email report","tags":["Email reports"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Report id, e.g. rep_7Q2K9XH3AB"},"name":{"type":"string"},"site_ids":{"type":"array","items":{"type":"string"},"description":"Site ids in the report"},"frequency":{"type":"string","description":"daily, weekly or monthly"},"hour":{"type":"integer","description":"Send hour (workspace timezone)"},"weekday":{"type":"integer","description":"Weekly: 0 = Sunday … 6 = Saturday"},"recipients":{"type":"array","items":{"type":"string"},"description":"Every address on the report, whatever its status"},"recipient_details":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Recipient id, e.g. rcp_7Q2K9XH3AB"},"email":{"type":"string","description":"The address"},"status":{"type":"string","description":"active, pending, declined or unsubscribed"},"invited_at":{"anyOf":[{"type":"string","format":"date-time","description":"When the last invite was sent"},{"type":"null"}]},"expires_at":{"anyOf":[{"type":"string","format":"date-time","description":"When a pending invite expires"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","format":"date-time","description":"When the address became active"},{"type":"null"}]}}},"description":"Each recipient with its opt-in status (only active recipients get reports)"},"blocks":{"type":"array","items":{"type":"string"},"description":"Content blocks"},"attach_pdf":{"type":"boolean"},"intro":{"anyOf":[{"type":"string"},{"type":"null"}]},"enabled":{"type":"boolean"},"last_sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"next_run_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"email_reports_get","x-permission":"analytics.read"},"patch":{"operationId":"email_reports_update","summary":"Update an email report","tags":["Email reports"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Report id, e.g. rep_7Q2K9XH3AB"},"name":{"type":"string"},"site_ids":{"type":"array","items":{"type":"string"},"description":"Site ids in the report"},"frequency":{"type":"string","description":"daily, weekly or monthly"},"hour":{"type":"integer","description":"Send hour (workspace timezone)"},"weekday":{"type":"integer","description":"Weekly: 0 = Sunday … 6 = Saturday"},"recipients":{"type":"array","items":{"type":"string"},"description":"Every address on the report, whatever its status"},"recipient_details":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Recipient id, e.g. rcp_7Q2K9XH3AB"},"email":{"type":"string","description":"The address"},"status":{"type":"string","description":"active, pending, declined or unsubscribed"},"invited_at":{"anyOf":[{"type":"string","format":"date-time","description":"When the last invite was sent"},{"type":"null"}]},"expires_at":{"anyOf":[{"type":"string","format":"date-time","description":"When a pending invite expires"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","format":"date-time","description":"When the address became active"},{"type":"null"}]}}},"description":"Each recipient with its opt-in status (only active recipients get reports)"},"blocks":{"type":"array","items":{"type":"string"},"description":"Content blocks"},"attach_pdf":{"type":"boolean"},"intro":{"anyOf":[{"type":"string"},{"type":"null"}]},"enabled":{"type":"boolean"},"last_sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"next_run_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"email_reports_update","x-permission":"content.write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"site_ids":{"type":"array","items":{"type":"string"},"description":"Site ids (pa_…) included in the report"},"frequency":{"type":"string","description":"daily, weekly (on weekday) or monthly (on the 1st)","enum":["daily","weekly","monthly"]},"hour":{"type":"integer","description":"Hour of day to send (0 to 23, workspace timezone)"},"weekday":{"type":"integer","description":"Weekly reports: 0 = Sunday … 6 = Saturday"},"recipients":{"type":"array","items":{"type":"string"},"description":"Email addresses (no account needed). Entries may be comma or newline separated. Members of the workspace are added at once. Anyone else gets an invite and only receives reports after accepting it. Addresses that opted out of reports are refused"},"blocks":{"type":"array","items":{"type":"string"},"description":"Content: kpis, chart, pages, sources, goals, campaigns, vitals, uptime"},"attach_pdf":{"type":"boolean","description":"Attach a PDF version"},"intro":{"type":"string","description":"Custom intro text (max 2000 chars)"},"enabled":{"type":"boolean","description":"Send on schedule"},"name":{"type":"string","description":"Report name"}}}}}}}},"/reports/{id}/send_test.json":{"post":{"operationId":"email_reports_send_test","summary":"Send an email report now as a test","tags":["Email reports"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","description":"sent, test, failed or skipped"},"recipients_count":{"type":"integer"},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"sent_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"email_reports_send_test","x-permission":"content.write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"recipient":{"type":"string","description":"Send the test here (default: your email)"}}}}}}}},"/reports/invites/{token}/accept.json":{"post":{"operationId":"report_invites_accept","summary":"Accept a report invite","tags":["Email reports"],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Recipient id, e.g. rcp_7Q2K9XH3AB"},"email":{"type":"string","description":"The address"},"status":{"type":"string","description":"active, pending, declined or unsubscribed"},"invited_at":{"anyOf":[{"type":"string","format":"date-time","description":"When the last invite was sent"},{"type":"null"}]},"expires_at":{"anyOf":[{"type":"string","format":"date-time","description":"When a pending invite expires"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","format":"date-time","description":"When the address became active"},{"type":"null"}]}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"report_invites_accept","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","description":"Invite token from the email"}},"required":["token"]}}}},"security":[]}},"/reports/invites/{token}/decline.json":{"post":{"operationId":"report_invites_decline","summary":"Decline a report invite","tags":["Email reports"],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Recipient id, e.g. rcp_7Q2K9XH3AB"},"email":{"type":"string","description":"The address"},"status":{"type":"string","description":"active, pending, declined or unsubscribed"},"invited_at":{"anyOf":[{"type":"string","format":"date-time","description":"When the last invite was sent"},{"type":"null"}]},"expires_at":{"anyOf":[{"type":"string","format":"date-time","description":"When a pending invite expires"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","format":"date-time","description":"When the address became active"},{"type":"null"}]}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"report_invites_decline","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","description":"Invite token from the email"}},"required":["token"]}}}},"security":[]}},"/reports/resubscribe/{token}.json":{"post":{"operationId":"report_resubscribes_confirm","summary":"Receive reports again after opting out","tags":["Email reports"],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"report_resubscribes_confirm","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","description":"Signed opt-in token from the confirmation email"}},"required":["token"]}}}},"security":[]}},"/reports/unsubscribe/{token}/resubscribe.json":{"post":{"operationId":"report_resubscribes_create","summary":"Email an address a link to receive reports again","tags":["Email reports"],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"report_resubscribes_create","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","description":"Signed unsubscribe token from the report email"}},"required":["token"]}}}},"security":[]}},"/reports/unsubscribe/{token}.json":{"post":{"operationId":"report_unsubscribes_create","summary":"Unsubscribe an address from an email report","tags":["Email reports"],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"report_unsubscribes_create","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","description":"Signed unsubscribe token from the email"}},"required":["token"]}}}},"security":[]}},"/sites/{site_id}/events/properties.json":{"get":{"operationId":"event_properties_list","summary":"List event property keys seen in the last 30 days","tags":["Events"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"event","in":"query","required":false,"schema":{"type":"string","description":"Only keys seen on this raw event name"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"event_properties_list","x-permission":"analytics.read"},"patch":{"operationId":"event_properties_update","summary":"Rename or hide an event property key","tags":["Events"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"event_properties_update","x-permission":"sites.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Property key as stored, e.g. plan"},"display_name":{"type":"string","description":"Label to show instead (blank removes it)"},"hidden":{"type":"boolean","description":"Hide this key from reports"},"export_safe":{"type":"boolean","description":"The key contains no personal data, so it is included in raw exports and warehouse syncs"}},"required":["key"]}}}}}},"/sites/{site_id}/events.json":{"delete":{"operationId":"events_delete","summary":"Delete an event and its history (runs in the background, confirm by typing the name)","tags":["Events"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"events_delete","x-permission":"sites.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Raw event name to delete"},"confirm":{"type":"string","description":"Type the event name again to confirm"}},"required":["name","confirm"]}}}}},"get":{"operationId":"events_list","summary":"List events with completions, visits, conversion rate and first/last seen","tags":["Events"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","description":"Date range preset. Use custom with from/to","enum":["today","yesterday","24h","7d","14d","28d","30d","90d","mtd","last_month","qtd","last_quarter","ytd","12mo","last_year","all","custom"],"default":"30d"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom range start (site timezone)"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom range end, inclusive"}},{"name":"compare","in":"query","required":false,"schema":{"type":"string","description":"Comparison period","enum":["none","previous_period","previous_year","custom"],"default":"none"}},{"name":"compare_from","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom comparison start"}},{"name":"compare_to","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom comparison end"}},{"name":"match_weekday","in":"query","required":false,"schema":{"type":"boolean","description":"Align comparison days of the week","default":false}},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{},"description":"Filters: [[\"dimension\",\"operator\",\"value\"], …]. Operators: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Wrap conditions in {\"any\": [...]} for OR.","default":[]}},{"name":"segment_id","in":"query","required":false,"schema":{"type":"string","description":"Apply a saved segment (seg_…)"}},{"name":"include_imported","in":"query","required":false,"schema":{"type":"boolean","description":"Add imported historical data (dates before the first native event, ignored when filters or a segment are applied)","default":false}},{"name":"search","in":"query","required":false,"schema":{"type":"string","description":"Only events whose name contains this"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"events_list","x-permission":"analytics.read"}},"/sites/{site_id}/events/merge.json":{"post":{"operationId":"events_merge","summary":"Merge several events into one display name","tags":["Events"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"name":{"type":"string","description":"Raw event name as sent by the tracker"},"display_name":{"anyOf":[{"type":"string","description":"Name shown in reports"},{"type":"null"}]},"hidden":{"type":"boolean","description":"Hidden from reports"},"currency":{"anyOf":[{"type":"string","description":"Revenue currency"},{"type":"null"}]},"updated_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"events_merge","x-permission":"sites.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"names":{"type":"array","items":{"type":"string"},"description":"Raw event names to merge"},"into":{"type":"string","description":"Display name for the merged event","examples":["Signup"]}},"required":["names","into"]}}}}}},"/sites/{site_id}/events/detail.json":{"get":{"operationId":"events_get","summary":"One event: chart, property pivot, number property aggregates, pages and sources","tags":["Events"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","description":"Date range preset. Use custom with from/to","enum":["today","yesterday","24h","7d","14d","28d","30d","90d","mtd","last_month","qtd","last_quarter","ytd","12mo","last_year","all","custom"],"default":"30d"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom range start (site timezone)"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom range end, inclusive"}},{"name":"compare","in":"query","required":false,"schema":{"type":"string","description":"Comparison period","enum":["none","previous_period","previous_year","custom"],"default":"none"}},{"name":"compare_from","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom comparison start"}},{"name":"compare_to","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom comparison end"}},{"name":"match_weekday","in":"query","required":false,"schema":{"type":"boolean","description":"Align comparison days of the week","default":false}},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{},"description":"Filters: [[\"dimension\",\"operator\",\"value\"], …]. Operators: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Wrap conditions in {\"any\": [...]} for OR.","default":[]}},{"name":"segment_id","in":"query","required":false,"schema":{"type":"string","description":"Apply a saved segment (seg_…)"}},{"name":"include_imported","in":"query","required":false,"schema":{"type":"boolean","description":"Add imported historical data (dates before the first native event, ignored when filters or a segment are applied)","default":false}},{"name":"name","in":"query","required":false,"schema":{"type":"string","description":"Event name as shown (after renames)","examples":["Signup"]}},{"name":"properties","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"Up to 3 property keys to pivot by","default":[]}},{"name":"interval","in":"query","required":false,"schema":{"type":"string","description":"Chart bucket size","enum":["auto","minute","hour","day","week","month","quarter","year"],"default":"auto"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"events_get","x-permission":"analytics.read"}},"/sites/{site_id}/events/settings.json":{"patch":{"operationId":"events_update","summary":"Rename, hide or unhide an event, or set its currency","tags":["Events"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"name":{"type":"string","description":"Raw event name as sent by the tracker"},"display_name":{"anyOf":[{"type":"string","description":"Name shown in reports"},{"type":"null"}]},"hidden":{"type":"boolean","description":"Hidden from reports"},"currency":{"anyOf":[{"type":"string","description":"Revenue currency"},{"type":"null"}]},"updated_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"events_update","x-permission":"sites.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Raw event name as sent by the tracker","examples":["signup_click"]},"display_name":{"type":"string","description":"Name to show instead (blank removes rename)"},"hidden":{"type":"boolean","description":"Hide from reports (data is kept)"},"currency":{"type":"string","description":"Currency for revenue on this event (ISO 4217)"}},"required":["name"]}}}}}},"/workspaces/{workspace_id}/exports.json":{"post":{"operationId":"exports_create","summary":"Queue an export (built in the background)","tags":["Exports"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Export id, e.g. exp_7Q2K9XH3AB"},"site_id":{"anyOf":[{"type":"string","description":"Site exported (pa_…)"},{"type":"null"}]},"kind":{"type":"string","description":"aggregated, pageviews, events, imported, raw or dashboard"},"format":{"type":"string","description":"csv, json, xlsx, ndjson or zip"},"status":{"type":"string","description":"queued, running, complete, failed or expired"},"params":{"type":"object","description":"The export definition (dates, timezone, grouping, dimensions, metrics, fields, filters)"},"row_count":{"anyOf":[{"type":"integer","description":"Rows written"},{"type":"null"}]},"error":{"anyOf":[{"type":"string","description":"Why the export failed"},{"type":"null"}]},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"expires_at":{"anyOf":[{"type":"string","format":"date-time","description":"When the file is deleted"},{"type":"null"}]},"download_url":{"anyOf":[{"type":"string","description":"Path returning a short-lived signed file link (exports_download)"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"exports_create","x-permission":"analytics.export","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"site_id":{"type":"string","description":"Site to export (pa_…)","examples":["pa_7Q2K9XH3AB"]},"kind":{"type":"string","description":"aggregated: metrics by time bucket and dimensions. pageviews/events/raw: one row per hit (Pro and above). imported: imported daily stats. dashboard: ZIP of the overview panels","enum":["aggregated","pageviews","events","imported","raw","dashboard"],"default":"aggregated"},"file_format":{"type":"string","description":"csv, json or xlsx (aggregated, pageviews, events, imported), csv or ndjson (raw), zip (dashboard)","enum":["csv","json","xlsx","ndjson","zip"],"default":"csv"},"from":{"type":"string","format":"date","description":"First day, in the export timezone","examples":["2026-09-01"]},"to":{"type":"string","format":"date","description":"Last day, inclusive (max 400 days, raw 93 days)","examples":["2026-09-28"]},"timezone":{"type":"string","description":"Timezone for dates and grouping, e.g. America/New_York (default: the site timezone)"},"grouping":{"type":"string","description":"Time bucket for aggregated exports","enum":["hour","day","week","month","quarter","year"],"default":"day"},"dimensions":{"type":"array","items":{"type":"string"},"description":"Visit dimensions to group aggregated exports by (up to 6), e.g. country, channel, entry_page. For imported exports: the imported dimensions to include","default":[]},"metrics":{"type":"array","items":{"type":"string"},"description":"Metrics for aggregated exports (default all): visitors, visits, pageviews, bounce_rate, visit_duration, views_per_visit, revenue","default":[]},"fields":{"type":"array","items":{"type":"string"},"description":"Columns for pageviews/events/raw exports (default all but visit_id, vital_value, selector): occurred_at, kind, name, visit_id, hostname, path, referrer_host, referrer_path, channel, utm_source, utm_medium, utm_campaign, utm_content, utm_term, ref, paid_click, country, language, device, browser, browser_major, os, os_major, screen_bucket, engaged_ms, scroll_depth, revenue_minor, currency, vital_value, selector, props","default":[]},"filters":{"type":"array","items":{},"description":"Filters, same format as the stats API: [[\"dimension\",\"operator\",\"value\"], …]","default":[]},"segment_id":{"type":"string","description":"Apply a saved segment (seg_…)"}},"required":["site_id","from","to"]}}}}},"get":{"operationId":"exports_list","summary":"List exports (the job queue)","tags":["Exports"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"site_id","in":"query","required":false,"schema":{"type":"string","description":"Only exports of this site (pa_…)"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","description":"Only exports with this status","enum":["queued","running","complete","failed","expired"]}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","description":"Only exports of this kind","enum":["aggregated","pageviews","events","imported","raw","dashboard"]}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Export id, e.g. exp_7Q2K9XH3AB"},"site_id":{"anyOf":[{"type":"string","description":"Site exported (pa_…)"},{"type":"null"}]},"kind":{"type":"string","description":"aggregated, pageviews, events, imported, raw or dashboard"},"format":{"type":"string","description":"csv, json, xlsx, ndjson or zip"},"status":{"type":"string","description":"queued, running, complete, failed or expired"},"params":{"type":"object","description":"The export definition (dates, timezone, grouping, dimensions, metrics, fields, filters)"},"row_count":{"anyOf":[{"type":"integer","description":"Rows written"},{"type":"null"}]},"error":{"anyOf":[{"type":"string","description":"Why the export failed"},{"type":"null"}]},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"expires_at":{"anyOf":[{"type":"string","format":"date-time","description":"When the file is deleted"},{"type":"null"}]},"download_url":{"anyOf":[{"type":"string","description":"Path returning a short-lived signed file link (exports_download)"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"exports_list","x-permission":"analytics.export"}},"/exports/{id}.json":{"delete":{"operationId":"exports_delete","summary":"Delete an export and its file","tags":["Exports"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Export id, e.g. exp_7Q2K9XH3AB"},"site_id":{"anyOf":[{"type":"string","description":"Site exported (pa_…)"},{"type":"null"}]},"kind":{"type":"string","description":"aggregated, pageviews, events, imported, raw or dashboard"},"format":{"type":"string","description":"csv, json, xlsx, ndjson or zip"},"status":{"type":"string","description":"queued, running, complete, failed or expired"},"params":{"type":"object","description":"The export definition (dates, timezone, grouping, dimensions, metrics, fields, filters)"},"row_count":{"anyOf":[{"type":"integer","description":"Rows written"},{"type":"null"}]},"error":{"anyOf":[{"type":"string","description":"Why the export failed"},{"type":"null"}]},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"expires_at":{"anyOf":[{"type":"string","format":"date-time","description":"When the file is deleted"},{"type":"null"}]},"download_url":{"anyOf":[{"type":"string","description":"Path returning a short-lived signed file link (exports_download)"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"exports_delete","x-permission":"analytics.export","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}},"get":{"operationId":"exports_get","summary":"Get an export and its status","tags":["Exports"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Export id, e.g. exp_7Q2K9XH3AB"},"site_id":{"anyOf":[{"type":"string","description":"Site exported (pa_…)"},{"type":"null"}]},"kind":{"type":"string","description":"aggregated, pageviews, events, imported, raw or dashboard"},"format":{"type":"string","description":"csv, json, xlsx, ndjson or zip"},"status":{"type":"string","description":"queued, running, complete, failed or expired"},"params":{"type":"object","description":"The export definition (dates, timezone, grouping, dimensions, metrics, fields, filters)"},"row_count":{"anyOf":[{"type":"integer","description":"Rows written"},{"type":"null"}]},"error":{"anyOf":[{"type":"string","description":"Why the export failed"},{"type":"null"}]},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"expires_at":{"anyOf":[{"type":"string","format":"date-time","description":"When the file is deleted"},{"type":"null"}]},"download_url":{"anyOf":[{"type":"string","description":"Path returning a short-lived signed file link (exports_download)"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"exports_get","x-permission":"analytics.export"}},"/exports/{id}/download.json":{"get":{"operationId":"exports_download","summary":"Get a signed link to the file (valid 10 minutes)","tags":["Exports"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"exports_download","x-permission":"analytics.export"}},"/workspaces/{workspace_id}/exports/preview.json":{"post":{"operationId":"exports_preview","summary":"Preview an export: first 20 rows and the estimated row count","tags":["Exports"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"exports_preview","x-permission":"analytics.export","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"site_id":{"type":"string","description":"Site to export (pa_…)","examples":["pa_7Q2K9XH3AB"]},"kind":{"type":"string","description":"aggregated: metrics by time bucket and dimensions. pageviews/events/raw: one row per hit (Pro and above). imported: imported daily stats. dashboard: ZIP of the overview panels","enum":["aggregated","pageviews","events","imported","raw","dashboard"],"default":"aggregated"},"file_format":{"type":"string","description":"csv, json or xlsx (aggregated, pageviews, events, imported), csv or ndjson (raw), zip (dashboard)","enum":["csv","json","xlsx","ndjson","zip"],"default":"csv"},"from":{"type":"string","format":"date","description":"First day, in the export timezone","examples":["2026-09-01"]},"to":{"type":"string","format":"date","description":"Last day, inclusive (max 400 days, raw 93 days)","examples":["2026-09-28"]},"timezone":{"type":"string","description":"Timezone for dates and grouping, e.g. America/New_York (default: the site timezone)"},"grouping":{"type":"string","description":"Time bucket for aggregated exports","enum":["hour","day","week","month","quarter","year"],"default":"day"},"dimensions":{"type":"array","items":{"type":"string"},"description":"Visit dimensions to group aggregated exports by (up to 6), e.g. country, channel, entry_page. For imported exports: the imported dimensions to include","default":[]},"metrics":{"type":"array","items":{"type":"string"},"description":"Metrics for aggregated exports (default all): visitors, visits, pageviews, bounce_rate, visit_duration, views_per_visit, revenue","default":[]},"fields":{"type":"array","items":{"type":"string"},"description":"Columns for pageviews/events/raw exports (default all but visit_id, vital_value, selector): occurred_at, kind, name, visit_id, hostname, path, referrer_host, referrer_path, channel, utm_source, utm_medium, utm_campaign, utm_content, utm_term, ref, paid_click, country, language, device, browser, browser_major, os, os_major, screen_bucket, engaged_ms, scroll_depth, revenue_minor, currency, vital_value, selector, props","default":[]},"filters":{"type":"array","items":{},"description":"Filters, same format as the stats API: [[\"dimension\",\"operator\",\"value\"], …]","default":[]},"segment_id":{"type":"string","description":"Apply a saved segment (seg_…)"}},"required":["site_id","from","to"]}}}}}},"/sites/{site_id}/funnels.json":{"post":{"operationId":"funnels_create","summary":"Create a funnel","tags":["Funnels"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Funnel id, e.g. fun_7Q2K9XH3AB"},"name":{"type":"string"},"steps":{"type":"array","items":{"type":"object"},"description":"Steps: {type: page|event|goal, value, match, name}"},"order_mode":{"type":"string","description":"strict or any"},"window":{"type":"string","description":"visit or day"},"stats":{"anyOf":[{"type":"object","properties":{"entered":{"type":"integer","description":"Visits that reached step 1"},"completed":{"type":"integer","description":"Visits that reached the last step"},"conversion_rate":{"type":"number","description":"Completed ÷ entered, %"}},"description":"Period stats (list only)"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"funnels_create","x-permission":"content.write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Funnel name","examples":["Signup flow"]},"steps":{"type":"array","items":{"type":"object","additionalProperties":true},"description":"Ordered steps (2 to your plan limit): [{\"type\": \"page|event|goal\", \"value\": \"/pricing | Signup | goal_…\", \"match\": \"exact|prefix|glob|regex\" (page steps), \"name\": \"optional label\"}]"},"order_mode":{"type":"string","description":"strict: steps in this order, any: in any order","enum":["strict","any"],"default":"strict"},"window":{"type":"string","description":"Conversion window: visit, or day (measured within a visit, which never spans a UTC day)","enum":["visit","day"],"default":"visit"}},"required":["name","steps"]}}}}},"get":{"operationId":"funnels_list","summary":"List funnels with entries, completions and rate","tags":["Funnels"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","description":"Date range preset. Use custom with from/to","enum":["today","yesterday","24h","7d","14d","28d","30d","90d","mtd","last_month","qtd","last_quarter","ytd","12mo","last_year","all","custom"],"default":"30d"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom range start (site timezone)"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom range end, inclusive"}},{"name":"compare","in":"query","required":false,"schema":{"type":"string","description":"Comparison period","enum":["none","previous_period","previous_year","custom"],"default":"none"}},{"name":"compare_from","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom comparison start"}},{"name":"compare_to","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom comparison end"}},{"name":"match_weekday","in":"query","required":false,"schema":{"type":"boolean","description":"Align comparison days of the week","default":false}},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{},"description":"Filters: [[\"dimension\",\"operator\",\"value\"], …]. Operators: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Wrap conditions in {\"any\": [...]} for OR.","default":[]}},{"name":"segment_id","in":"query","required":false,"schema":{"type":"string","description":"Apply a saved segment (seg_…)"}},{"name":"include_imported","in":"query","required":false,"schema":{"type":"boolean","description":"Add imported historical data (dates before the first native event, ignored when filters or a segment are applied)","default":false}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","description":"Page number","default":1}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","description":"Funnels per page (max 100)","default":25}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Funnel id, e.g. fun_7Q2K9XH3AB"},"name":{"type":"string"},"steps":{"type":"array","items":{"type":"object"},"description":"Steps: {type: page|event|goal, value, match, name}"},"order_mode":{"type":"string","description":"strict or any"},"window":{"type":"string","description":"visit or day"},"stats":{"anyOf":[{"type":"object","properties":{"entered":{"type":"integer","description":"Visits that reached step 1"},"completed":{"type":"integer","description":"Visits that reached the last step"},"conversion_rate":{"type":"number","description":"Completed ÷ entered, %"}},"description":"Period stats (list only)"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"funnels_list","x-permission":"analytics.read"}},"/sites/{site_id}/funnels/{id}.json":{"delete":{"operationId":"funnels_delete","summary":"Delete a funnel","tags":["Funnels"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Funnel id, e.g. fun_7Q2K9XH3AB"},"name":{"type":"string"},"steps":{"type":"array","items":{"type":"object"},"description":"Steps: {type: page|event|goal, value, match, name}"},"order_mode":{"type":"string","description":"strict or any"},"window":{"type":"string","description":"visit or day"},"stats":{"anyOf":[{"type":"object","properties":{"entered":{"type":"integer","description":"Visits that reached step 1"},"completed":{"type":"integer","description":"Visits that reached the last step"},"conversion_rate":{"type":"number","description":"Completed ÷ entered, %"}},"description":"Period stats (list only)"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"funnels_delete","x-permission":"content.write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}},"get":{"operationId":"funnels_get","summary":"Funnel report: step counts, conversion, drop-off, time between steps and where visits went instead","tags":["Funnels"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","description":"Date range preset. Use custom with from/to","enum":["today","yesterday","24h","7d","14d","28d","30d","90d","mtd","last_month","qtd","last_quarter","ytd","12mo","last_year","all","custom"],"default":"30d"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom range start (site timezone)"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom range end, inclusive"}},{"name":"compare","in":"query","required":false,"schema":{"type":"string","description":"Comparison period","enum":["none","previous_period","previous_year","custom"],"default":"none"}},{"name":"compare_from","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom comparison start"}},{"name":"compare_to","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom comparison end"}},{"name":"match_weekday","in":"query","required":false,"schema":{"type":"boolean","description":"Align comparison days of the week","default":false}},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{},"description":"Filters: [[\"dimension\",\"operator\",\"value\"], …]. Operators: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Wrap conditions in {\"any\": [...]} for OR.","default":[]}},{"name":"segment_id","in":"query","required":false,"schema":{"type":"string","description":"Apply a saved segment (seg_…)"}},{"name":"include_imported","in":"query","required":false,"schema":{"type":"boolean","description":"Add imported historical data (dates before the first native event, ignored when filters or a segment are applied)","default":false}},{"name":"breakdown","in":"query","required":false,"schema":{"type":"string","description":"Split step counts by a visit dimension","enum":["channel","device","country","utm_campaign","utm_source","browser","os"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"period":{"type":"object","description":"from/to of the period (UTC)"},"funnel":{"type":"object","properties":{"id":{"type":"string","description":"Funnel id, e.g. fun_7Q2K9XH3AB"},"name":{"type":"string"},"steps":{"type":"array","items":{"type":"object"},"description":"Steps: {type: page|event|goal, value, match, name}"},"order_mode":{"type":"string","description":"strict or any"},"window":{"type":"string","description":"visit or day"},"stats":{"anyOf":[{"type":"object","properties":{"entered":{"type":"integer","description":"Visits that reached step 1"},"completed":{"type":"integer","description":"Visits that reached the last step"},"conversion_rate":{"type":"number","description":"Completed ÷ entered, %"}},"description":"Period stats (list only)"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"description":"The funnel definition"},"order_mode":{"type":"string","description":"strict or any"},"window":{"type":"string","description":"visit or day (day is measured within a visit)"},"steps":{"type":"array","items":{"type":"object"},"description":"Per step: index, name, type, value, count, step_conversion_rate, overall_conversion_rate, dropoff, dropoff_rate, median_seconds_from_previous, next_pages [{value, count}]"},"overall_conversion_rate":{"type":"number","description":"Last step ÷ first step, %"},"breakdown":{"anyOf":[{"type":"object","description":"dimension, label and rows [{value, counts, overall_conversion_rate}]"},{"type":"null"}]},"comparison":{"anyOf":[{"type":"object","description":"period, counts per step, overall_conversion_rate and change (%)"},{"type":"null"}]}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"funnels_get","x-permission":"analytics.read"},"patch":{"operationId":"funnels_update","summary":"Update a funnel","tags":["Funnels"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Funnel id, e.g. fun_7Q2K9XH3AB"},"name":{"type":"string"},"steps":{"type":"array","items":{"type":"object"},"description":"Steps: {type: page|event|goal, value, match, name}"},"order_mode":{"type":"string","description":"strict or any"},"window":{"type":"string","description":"visit or day"},"stats":{"anyOf":[{"type":"object","properties":{"entered":{"type":"integer","description":"Visits that reached step 1"},"completed":{"type":"integer","description":"Visits that reached the last step"},"conversion_rate":{"type":"number","description":"Completed ÷ entered, %"}},"description":"Period stats (list only)"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"funnels_update","x-permission":"content.write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Funnel name","examples":["Signup flow"]},"steps":{"type":"array","items":{"type":"object","additionalProperties":true},"description":"Ordered steps (2 to your plan limit): [{\"type\": \"page|event|goal\", \"value\": \"/pricing | Signup | goal_…\", \"match\": \"exact|prefix|glob|regex\" (page steps), \"name\": \"optional label\"}]"},"order_mode":{"type":"string","description":"strict: steps in this order, any: in any order","enum":["strict","any"]},"window":{"type":"string","description":"Conversion window: visit, or day (measured within a visit, which never spans a UTC day)","enum":["visit","day"]}}}}}}}},"/sites/{site_id}/goals/{id}/archive.json":{"post":{"operationId":"goals_archive","summary":"Archive a goal (hidden from reports)","tags":["Goals"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Goal id, e.g. goal_7Q2K9XH3AB"},"name":{"type":"string"},"kind":{"type":"string","description":"page, event, engagement, outbound or download"},"match_type":{"type":"string","description":"exact, prefix, glob or regex"},"pattern":{"anyOf":[{"type":"string","description":"Path, domain or file pattern"},{"type":"null"}]},"hostname":{"anyOf":[{"type":"string","description":"Hostname restriction (page goals)"},{"type":"null"}]},"event_name":{"anyOf":[{"type":"string","description":"Custom event name (event goals)"},{"type":"null"}]},"conditions":{"type":"array","items":{"type":"object"},"description":"Event property conditions"},"scroll_threshold":{"anyOf":[{"type":"integer","description":"Engagement: scroll %"},{"type":"null"}]},"time_threshold_seconds":{"anyOf":[{"type":"integer","description":"Engagement: seconds on page"},{"type":"null"}]},"value_mode":{"type":"string","description":"none, fixed or revenue"},"fixed_value_minor":{"anyOf":[{"type":"integer","description":"Fixed value in minor units"},{"type":"null"}]},"count_mode":{"type":"string","description":"once_per_visit or every"},"archived":{"type":"boolean"},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"stats":{"anyOf":[{"type":"object","properties":{"completions":{"type":"integer","description":"Matching events, repeats included"},"conversions":{"type":"integer","description":"Visits with at least one completion"},"conversion_rate":{"type":"number","description":"Conversions ÷ visits (or ÷ visitors, per site setting), %"},"value":{"type":"integer","description":"Goal value in site currency minor units"},"change":{"anyOf":[{"type":"number","description":"Conversions change vs the previous period, %"},{"type":"null"}]}},"description":"Period stats (list only)"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"goals_archive","x-permission":"content.write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/sites/{site_id}/goals.json":{"post":{"operationId":"goals_create","summary":"Create a goal","tags":["Goals"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Goal id, e.g. goal_7Q2K9XH3AB"},"name":{"type":"string"},"kind":{"type":"string","description":"page, event, engagement, outbound or download"},"match_type":{"type":"string","description":"exact, prefix, glob or regex"},"pattern":{"anyOf":[{"type":"string","description":"Path, domain or file pattern"},{"type":"null"}]},"hostname":{"anyOf":[{"type":"string","description":"Hostname restriction (page goals)"},{"type":"null"}]},"event_name":{"anyOf":[{"type":"string","description":"Custom event name (event goals)"},{"type":"null"}]},"conditions":{"type":"array","items":{"type":"object"},"description":"Event property conditions"},"scroll_threshold":{"anyOf":[{"type":"integer","description":"Engagement: scroll %"},{"type":"null"}]},"time_threshold_seconds":{"anyOf":[{"type":"integer","description":"Engagement: seconds on page"},{"type":"null"}]},"value_mode":{"type":"string","description":"none, fixed or revenue"},"fixed_value_minor":{"anyOf":[{"type":"integer","description":"Fixed value in minor units"},{"type":"null"}]},"count_mode":{"type":"string","description":"once_per_visit or every"},"archived":{"type":"boolean"},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"stats":{"anyOf":[{"type":"object","properties":{"completions":{"type":"integer","description":"Matching events, repeats included"},"conversions":{"type":"integer","description":"Visits with at least one completion"},"conversion_rate":{"type":"number","description":"Conversions ÷ visits (or ÷ visitors, per site setting), %"},"value":{"type":"integer","description":"Goal value in site currency minor units"},"change":{"anyOf":[{"type":"number","description":"Conversions change vs the previous period, %"},{"type":"null"}]}},"description":"Period stats (list only)"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"goals_create","x-permission":"content.write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Goal name","examples":["Signed up"]},"kind":{"type":"string","description":"page (visit a page), event (custom event), engagement (scroll or time on page), outbound (outbound link click) or download (file download)","enum":["page","event","engagement","outbound","download"]},"match_type":{"type":"string","description":"How pattern matches the path (page, engagement), link domain (outbound) or file (download): exact, prefix, glob (*) or regex","enum":["exact","prefix","glob","regex"],"default":"exact"},"pattern":{"type":"string","description":"Path, domain or file pattern, e.g. /pricing, /blog/*, stripe.com or *.pdf"},"hostname":{"type":"string","description":"Only count pages on this hostname (page goals)"},"event_name":{"type":"string","description":"Custom event name (event goals)"},"conditions":{"type":"array","items":{"type":"object","additionalProperties":true},"description":"Event property conditions: [{\"key\": \"plan\", \"operator\": \"is|is_not|contains|gt|lt\", \"value\": \"pro\"}]","default":[]},"scroll_threshold":{"type":"integer","description":"Engagement: scroll depth % to reach"},"time_threshold_seconds":{"type":"integer","description":"Engagement: seconds on page"},"value_mode":{"type":"string","description":"none, fixed (fixed_value per conversion) or revenue (the event revenue)","enum":["none","fixed","revenue"],"default":"none"},"fixed_value":{"type":"number","description":"Fixed value per conversion in the site currency, e.g. 50.0"},"count_mode":{"type":"string","description":"Value counts once_per_visit or every completion","enum":["once_per_visit","every"],"default":"once_per_visit"}},"required":["name","kind"]}}}}},"get":{"operationId":"goals_list","summary":"List goals with completions, conversions, rate and value for a period","tags":["Goals"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","description":"Date range preset. Use custom with from/to","enum":["today","yesterday","24h","7d","14d","28d","30d","90d","mtd","last_month","qtd","last_quarter","ytd","12mo","last_year","all","custom"],"default":"30d"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom range start (site timezone)"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom range end, inclusive"}},{"name":"compare","in":"query","required":false,"schema":{"type":"string","description":"Comparison period","enum":["none","previous_period","previous_year","custom"],"default":"none"}},{"name":"compare_from","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom comparison start"}},{"name":"compare_to","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom comparison end"}},{"name":"match_weekday","in":"query","required":false,"schema":{"type":"boolean","description":"Align comparison days of the week","default":false}},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{},"description":"Filters: [[\"dimension\",\"operator\",\"value\"], …]. Operators: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Wrap conditions in {\"any\": [...]} for OR.","default":[]}},{"name":"segment_id","in":"query","required":false,"schema":{"type":"string","description":"Apply a saved segment (seg_…)"}},{"name":"include_imported","in":"query","required":false,"schema":{"type":"boolean","description":"Add imported historical data (dates before the first native event, ignored when filters or a segment are applied)","default":false}},{"name":"status","in":"query","required":false,"schema":{"type":"string","description":"active, archived or all goals","enum":["active","archived","all"],"default":"active"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","description":"Page number","default":1}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","description":"Goals per page (max 100)","default":25}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Goal id, e.g. goal_7Q2K9XH3AB"},"name":{"type":"string"},"kind":{"type":"string","description":"page, event, engagement, outbound or download"},"match_type":{"type":"string","description":"exact, prefix, glob or regex"},"pattern":{"anyOf":[{"type":"string","description":"Path, domain or file pattern"},{"type":"null"}]},"hostname":{"anyOf":[{"type":"string","description":"Hostname restriction (page goals)"},{"type":"null"}]},"event_name":{"anyOf":[{"type":"string","description":"Custom event name (event goals)"},{"type":"null"}]},"conditions":{"type":"array","items":{"type":"object"},"description":"Event property conditions"},"scroll_threshold":{"anyOf":[{"type":"integer","description":"Engagement: scroll %"},{"type":"null"}]},"time_threshold_seconds":{"anyOf":[{"type":"integer","description":"Engagement: seconds on page"},{"type":"null"}]},"value_mode":{"type":"string","description":"none, fixed or revenue"},"fixed_value_minor":{"anyOf":[{"type":"integer","description":"Fixed value in minor units"},{"type":"null"}]},"count_mode":{"type":"string","description":"once_per_visit or every"},"archived":{"type":"boolean"},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"stats":{"anyOf":[{"type":"object","properties":{"completions":{"type":"integer","description":"Matching events, repeats included"},"conversions":{"type":"integer","description":"Visits with at least one completion"},"conversion_rate":{"type":"number","description":"Conversions ÷ visits (or ÷ visitors, per site setting), %"},"value":{"type":"integer","description":"Goal value in site currency minor units"},"change":{"anyOf":[{"type":"number","description":"Conversions change vs the previous period, %"},{"type":"null"}]}},"description":"Period stats (list only)"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"goals_list","x-permission":"analytics.read"}},"/sites/{site_id}/goals/{id}.json":{"delete":{"operationId":"goals_delete","summary":"Delete a goal (data is kept)","tags":["Goals"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Goal id, e.g. goal_7Q2K9XH3AB"},"name":{"type":"string"},"kind":{"type":"string","description":"page, event, engagement, outbound or download"},"match_type":{"type":"string","description":"exact, prefix, glob or regex"},"pattern":{"anyOf":[{"type":"string","description":"Path, domain or file pattern"},{"type":"null"}]},"hostname":{"anyOf":[{"type":"string","description":"Hostname restriction (page goals)"},{"type":"null"}]},"event_name":{"anyOf":[{"type":"string","description":"Custom event name (event goals)"},{"type":"null"}]},"conditions":{"type":"array","items":{"type":"object"},"description":"Event property conditions"},"scroll_threshold":{"anyOf":[{"type":"integer","description":"Engagement: scroll %"},{"type":"null"}]},"time_threshold_seconds":{"anyOf":[{"type":"integer","description":"Engagement: seconds on page"},{"type":"null"}]},"value_mode":{"type":"string","description":"none, fixed or revenue"},"fixed_value_minor":{"anyOf":[{"type":"integer","description":"Fixed value in minor units"},{"type":"null"}]},"count_mode":{"type":"string","description":"once_per_visit or every"},"archived":{"type":"boolean"},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"stats":{"anyOf":[{"type":"object","properties":{"completions":{"type":"integer","description":"Matching events, repeats included"},"conversions":{"type":"integer","description":"Visits with at least one completion"},"conversion_rate":{"type":"number","description":"Conversions ÷ visits (or ÷ visitors, per site setting), %"},"value":{"type":"integer","description":"Goal value in site currency minor units"},"change":{"anyOf":[{"type":"number","description":"Conversions change vs the previous period, %"},{"type":"null"}]}},"description":"Period stats (list only)"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"goals_delete","x-permission":"content.write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}},"get":{"operationId":"goals_get","summary":"Goal report: metrics, chart, breakdowns and the journey to converting","tags":["Goals"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","description":"Date range preset. Use custom with from/to","enum":["today","yesterday","24h","7d","14d","28d","30d","90d","mtd","last_month","qtd","last_quarter","ytd","12mo","last_year","all","custom"],"default":"30d"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom range start (site timezone)"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom range end, inclusive"}},{"name":"compare","in":"query","required":false,"schema":{"type":"string","description":"Comparison period","enum":["none","previous_period","previous_year","custom"],"default":"none"}},{"name":"compare_from","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom comparison start"}},{"name":"compare_to","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom comparison end"}},{"name":"match_weekday","in":"query","required":false,"schema":{"type":"boolean","description":"Align comparison days of the week","default":false}},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{},"description":"Filters: [[\"dimension\",\"operator\",\"value\"], …]. Operators: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Wrap conditions in {\"any\": [...]} for OR.","default":[]}},{"name":"segment_id","in":"query","required":false,"schema":{"type":"string","description":"Apply a saved segment (seg_…)"}},{"name":"include_imported","in":"query","required":false,"schema":{"type":"boolean","description":"Add imported historical data (dates before the first native event, ignored when filters or a segment are applied)","default":false}},{"name":"interval","in":"query","required":false,"schema":{"type":"string","description":"Chart bucket size","enum":["auto","minute","hour","day","week","month","quarter","year"],"default":"auto"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"period":{"type":"object","description":"from/to of the period (UTC)"},"goal":{"type":"object","properties":{"id":{"type":"string","description":"Goal id, e.g. goal_7Q2K9XH3AB"},"name":{"type":"string"},"kind":{"type":"string","description":"page, event, engagement, outbound or download"},"match_type":{"type":"string","description":"exact, prefix, glob or regex"},"pattern":{"anyOf":[{"type":"string","description":"Path, domain or file pattern"},{"type":"null"}]},"hostname":{"anyOf":[{"type":"string","description":"Hostname restriction (page goals)"},{"type":"null"}]},"event_name":{"anyOf":[{"type":"string","description":"Custom event name (event goals)"},{"type":"null"}]},"conditions":{"type":"array","items":{"type":"object"},"description":"Event property conditions"},"scroll_threshold":{"anyOf":[{"type":"integer","description":"Engagement: scroll %"},{"type":"null"}]},"time_threshold_seconds":{"anyOf":[{"type":"integer","description":"Engagement: seconds on page"},{"type":"null"}]},"value_mode":{"type":"string","description":"none, fixed or revenue"},"fixed_value_minor":{"anyOf":[{"type":"integer","description":"Fixed value in minor units"},{"type":"null"}]},"count_mode":{"type":"string","description":"once_per_visit or every"},"archived":{"type":"boolean"},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"stats":{"anyOf":[{"type":"object","properties":{"completions":{"type":"integer","description":"Matching events, repeats included"},"conversions":{"type":"integer","description":"Visits with at least one completion"},"conversion_rate":{"type":"number","description":"Conversions ÷ visits (or ÷ visitors, per site setting), %"},"value":{"type":"integer","description":"Goal value in site currency minor units"},"change":{"anyOf":[{"type":"number","description":"Conversions change vs the previous period, %"},{"type":"null"}]}},"description":"Period stats (list only)"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"description":"The goal definition"},"metrics":{"type":"object","description":"completions, conversions, conversion_rate (%), value (minor units)"},"comparison_period":{"anyOf":[{"type":"object","description":"Comparison from/to"},{"type":"null"}]},"comparison":{"anyOf":[{"type":"object","description":"Metrics for the comparison period"},{"type":"null"}]},"change":{"anyOf":[{"type":"object","description":"Change vs comparison, % per metric"},{"type":"null"}]},"interval":{"type":"string","description":"Chart bucket size"},"series":{"type":"array","items":{"type":"object"},"description":"Per bucket: date, completions, conversions, conversion_rate"},"breakdowns":{"type":"object","description":"Top values by conversions for channel, utm_campaign, entry_page, country and device: value, completions, conversions, conversion_rate"},"journey":{"anyOf":[{"type":"object","description":"converting_visits, median_seconds_to_convert, median_pages_before and pages_before (pages viewed earlier in the visit, by converting visits)"},{"type":"null"}]}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"goals_get","x-permission":"analytics.read"},"patch":{"operationId":"goals_update","summary":"Update a goal","tags":["Goals"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Goal id, e.g. goal_7Q2K9XH3AB"},"name":{"type":"string"},"kind":{"type":"string","description":"page, event, engagement, outbound or download"},"match_type":{"type":"string","description":"exact, prefix, glob or regex"},"pattern":{"anyOf":[{"type":"string","description":"Path, domain or file pattern"},{"type":"null"}]},"hostname":{"anyOf":[{"type":"string","description":"Hostname restriction (page goals)"},{"type":"null"}]},"event_name":{"anyOf":[{"type":"string","description":"Custom event name (event goals)"},{"type":"null"}]},"conditions":{"type":"array","items":{"type":"object"},"description":"Event property conditions"},"scroll_threshold":{"anyOf":[{"type":"integer","description":"Engagement: scroll %"},{"type":"null"}]},"time_threshold_seconds":{"anyOf":[{"type":"integer","description":"Engagement: seconds on page"},{"type":"null"}]},"value_mode":{"type":"string","description":"none, fixed or revenue"},"fixed_value_minor":{"anyOf":[{"type":"integer","description":"Fixed value in minor units"},{"type":"null"}]},"count_mode":{"type":"string","description":"once_per_visit or every"},"archived":{"type":"boolean"},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"stats":{"anyOf":[{"type":"object","properties":{"completions":{"type":"integer","description":"Matching events, repeats included"},"conversions":{"type":"integer","description":"Visits with at least one completion"},"conversion_rate":{"type":"number","description":"Conversions ÷ visits (or ÷ visitors, per site setting), %"},"value":{"type":"integer","description":"Goal value in site currency minor units"},"change":{"anyOf":[{"type":"number","description":"Conversions change vs the previous period, %"},{"type":"null"}]}},"description":"Period stats (list only)"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"goals_update","x-permission":"content.write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Goal name","examples":["Signed up"]},"kind":{"type":"string","description":"page (visit a page), event (custom event), engagement (scroll or time on page), outbound (outbound link click) or download (file download)","enum":["page","event","engagement","outbound","download"]},"match_type":{"type":"string","description":"How pattern matches the path (page, engagement), link domain (outbound) or file (download): exact, prefix, glob (*) or regex","enum":["exact","prefix","glob","regex"]},"pattern":{"type":"string","description":"Path, domain or file pattern, e.g. /pricing, /blog/*, stripe.com or *.pdf"},"hostname":{"type":"string","description":"Only count pages on this hostname (page goals)"},"event_name":{"type":"string","description":"Custom event name (event goals)"},"conditions":{"type":"array","items":{"type":"object","additionalProperties":true},"description":"Event property conditions: [{\"key\": \"plan\", \"operator\": \"is|is_not|contains|gt|lt\", \"value\": \"pro\"}]"},"scroll_threshold":{"type":"integer","description":"Engagement: scroll depth % to reach"},"time_threshold_seconds":{"type":"integer","description":"Engagement: seconds on page"},"value_mode":{"type":"string","description":"none, fixed (fixed_value per conversion) or revenue (the event revenue)","enum":["none","fixed","revenue"]},"fixed_value":{"type":"number","description":"Fixed value per conversion in the site currency, e.g. 50.0"},"count_mode":{"type":"string","description":"Value counts once_per_visit or every completion","enum":["once_per_visit","every"]}}}}}}}},"/sites/{site_id}/goals/{id}/duplicate.json":{"post":{"operationId":"goals_duplicate","summary":"Copy a goal","tags":["Goals"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Goal id, e.g. goal_7Q2K9XH3AB"},"name":{"type":"string"},"kind":{"type":"string","description":"page, event, engagement, outbound or download"},"match_type":{"type":"string","description":"exact, prefix, glob or regex"},"pattern":{"anyOf":[{"type":"string","description":"Path, domain or file pattern"},{"type":"null"}]},"hostname":{"anyOf":[{"type":"string","description":"Hostname restriction (page goals)"},{"type":"null"}]},"event_name":{"anyOf":[{"type":"string","description":"Custom event name (event goals)"},{"type":"null"}]},"conditions":{"type":"array","items":{"type":"object"},"description":"Event property conditions"},"scroll_threshold":{"anyOf":[{"type":"integer","description":"Engagement: scroll %"},{"type":"null"}]},"time_threshold_seconds":{"anyOf":[{"type":"integer","description":"Engagement: seconds on page"},{"type":"null"}]},"value_mode":{"type":"string","description":"none, fixed or revenue"},"fixed_value_minor":{"anyOf":[{"type":"integer","description":"Fixed value in minor units"},{"type":"null"}]},"count_mode":{"type":"string","description":"once_per_visit or every"},"archived":{"type":"boolean"},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"stats":{"anyOf":[{"type":"object","properties":{"completions":{"type":"integer","description":"Matching events, repeats included"},"conversions":{"type":"integer","description":"Visits with at least one completion"},"conversion_rate":{"type":"number","description":"Conversions ÷ visits (or ÷ visitors, per site setting), %"},"value":{"type":"integer","description":"Goal value in site currency minor units"},"change":{"anyOf":[{"type":"number","description":"Conversions change vs the previous period, %"},{"type":"null"}]}},"description":"Period stats (list only)"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"goals_duplicate","x-permission":"content.write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Name for the copy"}}}}}}}},"/sites/{site_id}/goals/{id}/unarchive.json":{"post":{"operationId":"goals_unarchive","summary":"Restore an archived goal","tags":["Goals"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Goal id, e.g. goal_7Q2K9XH3AB"},"name":{"type":"string"},"kind":{"type":"string","description":"page, event, engagement, outbound or download"},"match_type":{"type":"string","description":"exact, prefix, glob or regex"},"pattern":{"anyOf":[{"type":"string","description":"Path, domain or file pattern"},{"type":"null"}]},"hostname":{"anyOf":[{"type":"string","description":"Hostname restriction (page goals)"},{"type":"null"}]},"event_name":{"anyOf":[{"type":"string","description":"Custom event name (event goals)"},{"type":"null"}]},"conditions":{"type":"array","items":{"type":"object"},"description":"Event property conditions"},"scroll_threshold":{"anyOf":[{"type":"integer","description":"Engagement: scroll %"},{"type":"null"}]},"time_threshold_seconds":{"anyOf":[{"type":"integer","description":"Engagement: seconds on page"},{"type":"null"}]},"value_mode":{"type":"string","description":"none, fixed or revenue"},"fixed_value_minor":{"anyOf":[{"type":"integer","description":"Fixed value in minor units"},{"type":"null"}]},"count_mode":{"type":"string","description":"once_per_visit or every"},"archived":{"type":"boolean"},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"stats":{"anyOf":[{"type":"object","properties":{"completions":{"type":"integer","description":"Matching events, repeats included"},"conversions":{"type":"integer","description":"Visits with at least one completion"},"conversion_rate":{"type":"number","description":"Conversions ÷ visits (or ÷ visitors, per site setting), %"},"value":{"type":"integer","description":"Goal value in site currency minor units"},"change":{"anyOf":[{"type":"number","description":"Conversions change vs the previous period, %"},{"type":"null"}]}},"description":"Period stats (list only)"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"goals_unarchive","x-permission":"content.write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/help.json":{"post":{"operationId":"support_message_send","summary":"Send a question or feedback to the Privatus Analytics team","description":"The message is emailed to the team with your account, workspace and plan details attached. The reply and a receipt go to your account email. Up to 10 messages a day.","tags":["Help and feedback"],"parameters":[],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"received":{"type":"boolean","description":"Always true when the submission was accepted"},"message":{"type":"string","description":"What happens next"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"support_message_send","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"subject":{"type":"string","description":"What the message is about (up to 150 characters)","examples":["Funnel shows no data"]},"message":{"type":"string","description":"Your question or feedback (10 to 5,000 characters)"}},"required":["subject","message"]}}}}}},"/sites/{site_id}/imports/google/properties.json":{"get":{"operationId":"imports_google_properties","summary":"List Google Analytics 4 properties to import","tags":["Imports"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"imports_google_properties","x-permission":"sites.manage"}},"/sites/{site_id}/imports.json":{"post":{"operationId":"imports_create","summary":"Start an import (GA4 property or CSV upload)","tags":["Imports"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Import id"},"site_id":{"type":"string"},"source":{"type":"string","description":"ga4, universal_analytics, fathom, simple_analytics, plausible, matomo, umami or clicky"},"status":{"type":"string","description":"queued, running, complete or failed"},"date_from":{"anyOf":[{"type":"string","format":"date","description":"First imported day"},{"type":"null"}]},"date_to":{"anyOf":[{"type":"string","format":"date","description":"Last imported day"},{"type":"null"}]},"rows_imported":{"type":"integer","description":"Daily rows stored"},"error":{"anyOf":[{"type":"string","description":"Why the import failed"},{"type":"null"}]},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"imports_create","x-permission":"sites.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"source":{"type":"string","description":"ga4 (Google Analytics 4 API) or the tool whose CSV export you upload","enum":["ga4","universal_analytics","fathom","simple_analytics","plausible","matomo","umami","clicky"]},"property_id":{"type":"string","description":"GA4 property, e.g. properties/123 (see imports_google_properties). Required for ga4","examples":["properties/123456789"]},"date_from":{"type":"string","format":"date","description":"First day to import. Required for ga4. For CSV files without a date column every row is dated this day"},"date_to":{"type":"string","format":"date","description":"Last day to import (ga4 defaults to the day before your first tracked event, or yesterday)"},"file":{"type":"string","format":"binary","description":"CSV export (multipart upload, max 50 MB). Required for CSV sources"},"dimension":{"type":"string","description":"What the CSV rows break down (overrides detection, needed for Matomo \"Label\" exports)","enum":["total","page","source","country","device","browser","os"]}},"required":["source"]}}}}},"get":{"operationId":"imports_list","summary":"List imports for a site","tags":["Imports"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","description":"Only imports with this status","enum":["queued","running","complete","failed"]}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Import id"},"site_id":{"type":"string"},"source":{"type":"string","description":"ga4, universal_analytics, fathom, simple_analytics, plausible, matomo, umami or clicky"},"status":{"type":"string","description":"queued, running, complete or failed"},"date_from":{"anyOf":[{"type":"string","format":"date","description":"First imported day"},{"type":"null"}]},"date_to":{"anyOf":[{"type":"string","format":"date","description":"Last imported day"},{"type":"null"}]},"rows_imported":{"type":"integer","description":"Daily rows stored"},"error":{"anyOf":[{"type":"string","description":"Why the import failed"},{"type":"null"}]},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"imports_list","x-permission":"analytics.read"}},"/sites/{site_id}/imports/{id}.json":{"delete":{"operationId":"imports_delete","summary":"Delete an import and all its imported data","tags":["Imports"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Import id"},"site_id":{"type":"string"},"source":{"type":"string","description":"ga4, universal_analytics, fathom, simple_analytics, plausible, matomo, umami or clicky"},"status":{"type":"string","description":"queued, running, complete or failed"},"date_from":{"anyOf":[{"type":"string","format":"date","description":"First imported day"},{"type":"null"}]},"date_to":{"anyOf":[{"type":"string","format":"date","description":"Last imported day"},{"type":"null"}]},"rows_imported":{"type":"integer","description":"Daily rows stored"},"error":{"anyOf":[{"type":"string","description":"Why the import failed"},{"type":"null"}]},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"imports_delete","x-permission":"sites.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}},"get":{"operationId":"imports_get","summary":"Get an import and its status","tags":["Imports"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Import id"},"site_id":{"type":"string"},"source":{"type":"string","description":"ga4, universal_analytics, fathom, simple_analytics, plausible, matomo, umami or clicky"},"status":{"type":"string","description":"queued, running, complete or failed"},"date_from":{"anyOf":[{"type":"string","format":"date","description":"First imported day"},{"type":"null"}]},"date_to":{"anyOf":[{"type":"string","format":"date","description":"Last imported day"},{"type":"null"}]},"rows_imported":{"type":"integer","description":"Daily rows stored"},"error":{"anyOf":[{"type":"string","description":"Why the import failed"},{"type":"null"}]},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"imports_get","x-permission":"analytics.read"}},"/sites/{site_id}/live.json":{"get":{"operationId":"live_get","summary":"Live visitors, activity stream and what is popular right now (last 30 minutes)","tags":["Live"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"feed","in":"query","required":false,"schema":{"type":"string","description":"Activity stream: all hits, pageviews or custom events","enum":["all","pageviews","events"],"default":"all"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Activity stream entries (max 100)","default":50}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"live_get","x-permission":"analytics.read"}},"/sites/{site_id}/live/wallboard.json":{"get":{"operationId":"live_wallboard","summary":"Wallboard cards (live and today) for one or more sites","tags":["Live"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"site_ids","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"Site ids to rotate between (defaults to this site)","default":[]}},{"name":"rotate_seconds","in":"query","required":false,"schema":{"type":"integer","description":"Seconds each site stays on screen (5-300)","default":20}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"live_wallboard","x-permission":"analytics.read"}},"/wallboard/{token}.json":{"get":{"operationId":"live_public_wallboard","summary":"Wallboard for a wallboard token (no login needed)","tags":["Live"],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}},{"name":"site_ids","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"Site ids to rotate between (defaults to this site)","default":[]}},{"name":"rotate_seconds","in":"query","required":false,"schema":{"type":"integer","description":"Seconds each site stays on screen (5-300)","default":20}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"live_public_wallboard","security":[]}},"/sites/{site_id}/live/wallboard/links.json":{"post":{"operationId":"wallboard_links_create","summary":"Create a wallboard link (read-only, revocable)","tags":["Live"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Link id, e.g. shr_7Q2K9XH3AB"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"type":"string","description":"Open this on a TV. No login needed"},"site_ids":{"type":"array","items":{"type":"string"},"description":"Sites shown, in rotation"},"rotate_seconds":{"type":"integer"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"wallboard_links_create","x-permission":"sites.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Label, e.g. Office TV"},"site_ids":{"type":"array","items":{"type":"string"},"description":"Extra sites to rotate through (this site is always included)","default":[]},"rotate_seconds":{"type":"integer","description":"Seconds per site when rotating (5-300)","default":20},"expires_at":{"type":"string","format":"date-time","description":"Stop working after this time"}}}}}}},"get":{"operationId":"wallboard_links_list","summary":"List wallboard links for a site","tags":["Live"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Link id, e.g. shr_7Q2K9XH3AB"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"type":"string","description":"Open this on a TV. No login needed"},"site_ids":{"type":"array","items":{"type":"string"},"description":"Sites shown, in rotation"},"rotate_seconds":{"type":"integer"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"wallboard_links_list","x-permission":"sites.manage"}},"/sites/{site_id}/live/wallboard/links/{id}.json":{"delete":{"operationId":"wallboard_links_delete","summary":"Revoke a wallboard link","tags":["Live"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Link id, e.g. shr_7Q2K9XH3AB"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"type":"string","description":"Open this on a TV. No login needed"},"site_ids":{"type":"array","items":{"type":"string"},"description":"Sites shown, in rotation"},"rotate_seconds":{"type":"integer"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"wallboard_links_delete","x-permission":"sites.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/workspaces/{workspace_id}/invitations.json":{"post":{"operationId":"invitations_create","summary":"Invite people by email","tags":["Members"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"email":{"type":"string"},"role":{"type":"string"},"custom_role":{"anyOf":[{"type":"string"},{"type":"null"}]},"all_sites":{"type":"boolean"},"site_ids":{"type":"array","items":{"type":"string"}},"invited_by":{"anyOf":[{"type":"string"},{"type":"null"}]},"expires_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"invitations_create","x-permission":"members.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"emails":{"type":"array","items":{"type":"string"},"description":"Email addresses to invite"},"role":{"type":"string","description":"Role for the new members (custom needs custom_role_id)","enum":["admin","editor","analyst","viewer","billing","custom"],"default":"viewer"},"custom_role_id":{"type":"string","description":"Custom role id (Business)"},"all_sites":{"type":"boolean","description":"Access to all sites, including future ones","default":true},"site_ids":{"type":"array","items":{"type":"string"},"description":"Site ids (pa_…) when all_sites is false","default":[]}},"required":["emails"]}}}}},"get":{"operationId":"invitations_list","summary":"List pending invitations","tags":["Members"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"email":{"type":"string"},"role":{"type":"string"},"custom_role":{"anyOf":[{"type":"string"},{"type":"null"}]},"all_sites":{"type":"boolean"},"site_ids":{"type":"array","items":{"type":"string"}},"invited_by":{"anyOf":[{"type":"string"},{"type":"null"}]},"expires_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"}}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"invitations_list","x-permission":"members.manage"}},"/workspaces/{workspace_id}/invitations/{id}.json":{"delete":{"operationId":"invitations_delete","summary":"Revoke a pending invitation","tags":["Members"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"email":{"type":"string"},"role":{"type":"string"},"custom_role":{"anyOf":[{"type":"string"},{"type":"null"}]},"all_sites":{"type":"boolean"},"site_ids":{"type":"array","items":{"type":"string"}},"invited_by":{"anyOf":[{"type":"string"},{"type":"null"}]},"expires_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"invitations_delete","x-permission":"members.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/workspaces/{workspace_id}/members/{id}.json":{"delete":{"operationId":"members_delete","summary":"Remove a member (or leave the workspace)","tags":["Members"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Member id (use it to update or remove the member)"},"email":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"role":{"type":"string","description":"owner, admin, editor, analyst, viewer, billing or custom"},"custom_role":{"anyOf":[{"type":"string","description":"Custom role name"},{"type":"null"}]},"custom_role_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"all_sites":{"type":"boolean","description":"Access to all sites"},"include_future_sites":{"type":"boolean"},"site_ids":{"type":"array","items":{"type":"string"},"description":"Site ids when all_sites is false"},"two_factor":{"type":"boolean","description":"Has 2FA or a passkey"},"last_active_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","description":"Joined at"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"members_delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}},"patch":{"operationId":"members_update","summary":"Change a member's role or site access","tags":["Members"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Member id (use it to update or remove the member)"},"email":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"role":{"type":"string","description":"owner, admin, editor, analyst, viewer, billing or custom"},"custom_role":{"anyOf":[{"type":"string","description":"Custom role name"},{"type":"null"}]},"custom_role_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"all_sites":{"type":"boolean","description":"Access to all sites"},"include_future_sites":{"type":"boolean"},"site_ids":{"type":"array","items":{"type":"string"},"description":"Site ids when all_sites is false"},"two_factor":{"type":"boolean","description":"Has 2FA or a passkey"},"last_active_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","description":"Joined at"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"members_update","x-permission":"members.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string","description":"New role (custom needs custom_role_id)","enum":["admin","editor","analyst","viewer","billing","custom"]},"custom_role_id":{"type":"string","description":"Custom role id (Business)"},"all_sites":{"type":"boolean","description":"Access to all sites, including future ones"},"site_ids":{"type":"array","items":{"type":"string"},"description":"Site ids (pa_…) when all_sites is false"},"include_future_sites":{"type":"boolean","description":"Also grant sites added later"}}}}}}}},"/workspaces/{workspace_id}/members.json":{"get":{"operationId":"members_list","summary":"List workspace members","tags":["Members"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"query","in":"query","required":false,"schema":{"type":"string","description":"Filter by name or email"}},{"name":"role","in":"query","required":false,"schema":{"type":"string","description":"Only members with this role","enum":["owner","admin","editor","analyst","viewer","billing","custom"]}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Member id (use it to update or remove the member)"},"email":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"role":{"type":"string","description":"owner, admin, editor, analyst, viewer, billing or custom"},"custom_role":{"anyOf":[{"type":"string","description":"Custom role name"},{"type":"null"}]},"custom_role_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"all_sites":{"type":"boolean","description":"Access to all sites"},"include_future_sites":{"type":"boolean"},"site_ids":{"type":"array","items":{"type":"string"},"description":"Site ids when all_sites is false"},"two_factor":{"type":"boolean","description":"Has 2FA or a passkey"},"last_active_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","description":"Joined at"}}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"members_list"}},"/workspaces/{workspace_id}/ownership_transfer.json":{"post":{"operationId":"ownership_transfers_create","summary":"Transfer workspace ownership to another member (owner only, you become an admin)","tags":["Members"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Member id (use it to update or remove the member)"},"email":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"role":{"type":"string","description":"owner, admin, editor, analyst, viewer, billing or custom"},"custom_role":{"anyOf":[{"type":"string","description":"Custom role name"},{"type":"null"}]},"custom_role_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"all_sites":{"type":"boolean","description":"Access to all sites"},"include_future_sites":{"type":"boolean"},"site_ids":{"type":"array","items":{"type":"string"},"description":"Site ids when all_sites is false"},"two_factor":{"type":"boolean","description":"Has 2FA or a passkey"},"last_active_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","description":"Joined at"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"ownership_transfers_create","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"membership_id":{"type":"string","description":"Member id of the new owner"}},"required":["membership_id"]}}}}}},"/sites/{site_id}/notes.json":{"post":{"operationId":"notes_create","summary":"Add a note to a site (use source \"deploy\" for release webhooks)","tags":["Notes"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Note id, e.g. note_7Q2K9XH3AB"},"site_id":{"anyOf":[{"type":"string","description":"Site, or null for workspace-wide notes"},{"type":"null"}]},"date":{"type":"string","format":"date"},"end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}]},"title":{"type":"string"},"body":{"anyOf":[{"type":"string","description":"Markdown"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"type":"string","description":"neutral, brand, blue, amber, red, violet"},"source":{"type":"string","description":"manual, deploy, system, import, incident"},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"notes_create","x-permission":"content.write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"date":{"type":"string","format":"date","description":"Day of the note (site timezone). Defaults to today"},"end_date":{"type":"string","format":"date","description":"Last day, for a date range"},"title":{"type":"string","description":"Short title shown on charts","examples":["Launched new pricing"]},"body":{"type":"string","description":"Details (Markdown)"},"url":{"type":"string","description":"Link, e.g. a PR or changelog"},"color":{"type":"string","description":"Pin color","enum":["neutral","brand","blue","amber","red","violet"]},"source":{"type":"string","description":"manual, or deploy for release webhooks","enum":["manual","deploy","system","import","incident"],"default":"manual"},"version":{"type":"string","description":"Deploys: release version or commit, used for the default title"}}}}}}},"get":{"operationId":"notes_list","summary":"List notes for a site (including workspace-wide notes)","tags":["Notes"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Only notes on or after this date"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Only notes on or before this date"}},{"name":"source","in":"query","required":false,"schema":{"type":"string","description":"Only notes from this source","enum":["manual","deploy","system","import","incident"]}},{"name":"query","in":"query","required":false,"schema":{"type":"string","description":"Search title, body and link"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Note id, e.g. note_7Q2K9XH3AB"},"site_id":{"anyOf":[{"type":"string","description":"Site, or null for workspace-wide notes"},{"type":"null"}]},"date":{"type":"string","format":"date"},"end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}]},"title":{"type":"string"},"body":{"anyOf":[{"type":"string","description":"Markdown"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"type":"string","description":"neutral, brand, blue, amber, red, violet"},"source":{"type":"string","description":"manual, deploy, system, import, incident"},"created_at":{"type":"string","format":"date-time"}}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"notes_list","x-permission":"analytics.read"}},"/sites/{site_id}/notes/{id}.json":{"delete":{"operationId":"notes_delete","summary":"Delete a note","tags":["Notes"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Note id, e.g. note_7Q2K9XH3AB"},"site_id":{"anyOf":[{"type":"string","description":"Site, or null for workspace-wide notes"},{"type":"null"}]},"date":{"type":"string","format":"date"},"end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}]},"title":{"type":"string"},"body":{"anyOf":[{"type":"string","description":"Markdown"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"type":"string","description":"neutral, brand, blue, amber, red, violet"},"source":{"type":"string","description":"manual, deploy, system, import, incident"},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"notes_delete","x-permission":"content.write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}},"get":{"operationId":"notes_get","summary":"Get a note","tags":["Notes"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Note id, e.g. note_7Q2K9XH3AB"},"site_id":{"anyOf":[{"type":"string","description":"Site, or null for workspace-wide notes"},{"type":"null"}]},"date":{"type":"string","format":"date"},"end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}]},"title":{"type":"string"},"body":{"anyOf":[{"type":"string","description":"Markdown"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"type":"string","description":"neutral, brand, blue, amber, red, violet"},"source":{"type":"string","description":"manual, deploy, system, import, incident"},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"notes_get","x-permission":"analytics.read"},"patch":{"operationId":"notes_update","summary":"Edit a note","tags":["Notes"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Note id, e.g. note_7Q2K9XH3AB"},"site_id":{"anyOf":[{"type":"string","description":"Site, or null for workspace-wide notes"},{"type":"null"}]},"date":{"type":"string","format":"date"},"end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}]},"title":{"type":"string"},"body":{"anyOf":[{"type":"string","description":"Markdown"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"type":"string","description":"neutral, brand, blue, amber, red, violet"},"source":{"type":"string","description":"manual, deploy, system, import, incident"},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"notes_update","x-permission":"content.write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"date":{"type":"string","format":"date","description":"Day of the note"},"end_date":{"type":"string","format":"date","description":"Last day, for a date range"},"title":{"type":"string","description":"Short title shown on charts"},"body":{"type":"string","description":"Details (Markdown)"},"url":{"type":"string","description":"Link"},"color":{"type":"string","description":"Pin color","enum":["neutral","brand","blue","amber","red","violet"]}}}}}}}},"/workspaces/{workspace_id}/notes.json":{"post":{"operationId":"workspace_notes_create","summary":"Add a workspace-wide note (shown on every site)","tags":["Notes"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Note id, e.g. note_7Q2K9XH3AB"},"site_id":{"anyOf":[{"type":"string","description":"Site, or null for workspace-wide notes"},{"type":"null"}]},"date":{"type":"string","format":"date"},"end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}]},"title":{"type":"string"},"body":{"anyOf":[{"type":"string","description":"Markdown"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"type":"string","description":"neutral, brand, blue, amber, red, violet"},"source":{"type":"string","description":"manual, deploy, system, import, incident"},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"workspace_notes_create","x-permission":"content.write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"date":{"type":"string","format":"date","description":"Day of the note (site timezone). Defaults to today"},"end_date":{"type":"string","format":"date","description":"Last day, for a date range"},"title":{"type":"string","description":"Short title shown on charts","examples":["Launched new pricing"]},"body":{"type":"string","description":"Details (Markdown)"},"url":{"type":"string","description":"Link, e.g. a PR or changelog"},"color":{"type":"string","description":"Pin color","enum":["neutral","brand","blue","amber","red","violet"]},"source":{"type":"string","description":"manual, or deploy for release webhooks","enum":["manual","deploy","system","import","incident"],"default":"manual"},"version":{"type":"string","description":"Deploys: release version or commit, used for the default title"}}}}}}},"get":{"operationId":"workspace_notes_list","summary":"List notes across a workspace","tags":["Notes"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Only notes on or after this date"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Only notes on or before this date"}},{"name":"source","in":"query","required":false,"schema":{"type":"string","description":"Only notes from this source","enum":["manual","deploy","system","import","incident"]}},{"name":"query","in":"query","required":false,"schema":{"type":"string","description":"Search title, body and link"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Note id, e.g. note_7Q2K9XH3AB"},"site_id":{"anyOf":[{"type":"string","description":"Site, or null for workspace-wide notes"},{"type":"null"}]},"date":{"type":"string","format":"date"},"end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}]},"title":{"type":"string"},"body":{"anyOf":[{"type":"string","description":"Markdown"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"type":"string","description":"neutral, brand, blue, amber, red, violet"},"source":{"type":"string","description":"manual, deploy, system, import, incident"},"created_at":{"type":"string","format":"date-time"}}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"workspace_notes_list","x-permission":"analytics.read"}},"/workspaces/{workspace_id}/notes/{id}.json":{"delete":{"operationId":"workspace_notes_delete","summary":"Delete a workspace note","tags":["Notes"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Note id, e.g. note_7Q2K9XH3AB"},"site_id":{"anyOf":[{"type":"string","description":"Site, or null for workspace-wide notes"},{"type":"null"}]},"date":{"type":"string","format":"date"},"end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}]},"title":{"type":"string"},"body":{"anyOf":[{"type":"string","description":"Markdown"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"type":"string","description":"neutral, brand, blue, amber, red, violet"},"source":{"type":"string","description":"manual, deploy, system, import, incident"},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"workspace_notes_delete","x-permission":"content.write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}},"patch":{"operationId":"workspace_notes_update","summary":"Edit a workspace note","tags":["Notes"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Note id, e.g. note_7Q2K9XH3AB"},"site_id":{"anyOf":[{"type":"string","description":"Site, or null for workspace-wide notes"},{"type":"null"}]},"date":{"type":"string","format":"date"},"end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}]},"title":{"type":"string"},"body":{"anyOf":[{"type":"string","description":"Markdown"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"type":"string","description":"neutral, brand, blue, amber, red, violet"},"source":{"type":"string","description":"manual, deploy, system, import, incident"},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"workspace_notes_update","x-permission":"content.write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"date":{"type":"string","format":"date","description":"Day of the note"},"end_date":{"type":"string","format":"date","description":"Last day, for a date range"},"title":{"type":"string","description":"Short title shown on charts"},"body":{"type":"string","description":"Details (Markdown)"},"url":{"type":"string","description":"Link"},"color":{"type":"string","description":"Pin color","enum":["neutral","brand","blue","amber","red","violet"]}}}}}}}},"/workspaces/{workspace_id}/channels.json":{"post":{"operationId":"notification_channels_create","summary":"Add a notification channel","tags":["Notification channels"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Channel id, e.g. nch_7Q2K9XH3AB"},"kind":{"type":"string","description":"email, slack, teams, discord, webhook, pagerduty, opsgenie or push"},"name":{"type":"string"},"target":{"type":"string","description":"Masked destination"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"notification_channels_create","x-permission":"content.write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"Webhook URL (slack, teams, discord, webhook), HTTPS"},"secret":{"type":"string","description":"webhook: HMAC secret for X-Privatus-Signature"},"emails":{"type":"array","items":{"type":"string"},"description":"email: recipient addresses (max 20)"},"routing_key":{"type":"string","description":"pagerduty: Events API v2 integration key"},"api_key":{"type":"string","description":"opsgenie: API integration key"},"region":{"type":"string","description":"opsgenie: account region","enum":["us","eu"]},"kind":{"type":"string","description":"email, slack, teams, discord, webhook, pagerduty, opsgenie or push","enum":["email","slack","teams","discord","webhook","pagerduty","opsgenie","push"]},"name":{"type":"string","description":"Display name","examples":["#alerts"]}},"required":["kind","name"]}}}}},"get":{"operationId":"notification_channels_list","summary":"List notification channels","tags":["Notification channels"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","description":"Only channels of this kind","enum":["email","slack","teams","discord","webhook","pagerduty","opsgenie","push"]}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Channel id, e.g. nch_7Q2K9XH3AB"},"kind":{"type":"string","description":"email, slack, teams, discord, webhook, pagerduty, opsgenie or push"},"name":{"type":"string"},"target":{"type":"string","description":"Masked destination"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"notification_channels_list","x-permission":"analytics.read"}},"/channels/{id}.json":{"delete":{"operationId":"notification_channels_delete","summary":"Delete a notification channel","tags":["Notification channels"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Channel id, e.g. nch_7Q2K9XH3AB"},"kind":{"type":"string","description":"email, slack, teams, discord, webhook, pagerduty, opsgenie or push"},"name":{"type":"string"},"target":{"type":"string","description":"Masked destination"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"notification_channels_delete","x-permission":"content.write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}},"get":{"operationId":"notification_channels_get","summary":"Get a notification channel","tags":["Notification channels"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Channel id, e.g. nch_7Q2K9XH3AB"},"kind":{"type":"string","description":"email, slack, teams, discord, webhook, pagerduty, opsgenie or push"},"name":{"type":"string"},"target":{"type":"string","description":"Masked destination"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"notification_channels_get","x-permission":"analytics.read"},"patch":{"operationId":"notification_channels_update","summary":"Update a notification channel","tags":["Notification channels"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Channel id, e.g. nch_7Q2K9XH3AB"},"kind":{"type":"string","description":"email, slack, teams, discord, webhook, pagerduty, opsgenie or push"},"name":{"type":"string"},"target":{"type":"string","description":"Masked destination"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"notification_channels_update","x-permission":"content.write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"Webhook URL (slack, teams, discord, webhook), HTTPS"},"secret":{"type":"string","description":"webhook: HMAC secret for X-Privatus-Signature"},"emails":{"type":"array","items":{"type":"string"},"description":"email: recipient addresses (max 20)"},"routing_key":{"type":"string","description":"pagerduty: Events API v2 integration key"},"api_key":{"type":"string","description":"opsgenie: API integration key"},"region":{"type":"string","description":"opsgenie: account region","enum":["us","eu"]},"name":{"type":"string","description":"Display name"}}}}}}}},"/channels/{id}/send_test.json":{"post":{"operationId":"notification_channels_send_test","summary":"Send a test message through a channel","tags":["Notification channels"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Channel id, e.g. nch_7Q2K9XH3AB"},"kind":{"type":"string","description":"email, slack, teams, discord, webhook, pagerduty, opsgenie or push"},"name":{"type":"string"},"target":{"type":"string","description":"Masked destination"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"notification_channels_send_test","x-permission":"content.write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/push_subscription.json":{"post":{"operationId":"push_subscriptions_create","summary":"Register a browser for push notifications","tags":["Notification channels"],"parameters":[],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"endpoint_host":{"type":"string","description":"Push service host"},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"push_subscriptions_create","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"endpoint":{"type":"string","description":"PushSubscription.endpoint from the browser"},"p256dh":{"type":"string","description":"PushSubscription keys.p256dh (base64url)"},"auth":{"type":"string","description":"PushSubscription keys.auth (base64url)"}},"required":["endpoint","p256dh","auth"]}}}}},"delete":{"operationId":"push_subscriptions_delete","summary":"Remove a browser push registration","tags":["Notification channels"],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"endpoint_host":{"type":"string","description":"Push service host"},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"push_subscriptions_delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"endpoint":{"type":"string","description":"PushSubscription.endpoint to remove"}},"required":["endpoint"]}}}}}},"/sites/{site_id}/performance.json":{"get":{"operationId":"performance_report","summary":"Web Vitals: p75 scorecard, daily trend and breakdowns by page, device, browser and country","tags":["Performance"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","description":"Date range preset. Use custom with from/to","enum":["today","yesterday","24h","7d","14d","28d","30d","90d","mtd","last_month","qtd","last_quarter","ytd","12mo","last_year","all","custom"],"default":"30d"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom range start (site timezone)"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom range end, inclusive"}},{"name":"compare","in":"query","required":false,"schema":{"type":"string","description":"Comparison period","enum":["none","previous_period","previous_year","custom"],"default":"none"}},{"name":"compare_from","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom comparison start"}},{"name":"compare_to","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom comparison end"}},{"name":"match_weekday","in":"query","required":false,"schema":{"type":"boolean","description":"Align comparison days of the week","default":false}},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{},"description":"Filters: [[\"dimension\",\"operator\",\"value\"], …]. Operators: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Wrap conditions in {\"any\": [...]} for OR.","default":[]}},{"name":"segment_id","in":"query","required":false,"schema":{"type":"string","description":"Apply a saved segment (seg_…)"}},{"name":"include_imported","in":"query","required":false,"schema":{"type":"boolean","description":"Add imported historical data (dates before the first native event, ignored when filters or a segment are applied)","default":false}},{"name":"metric","in":"query","required":false,"schema":{"type":"string","description":"Metric for the trend and breakdowns","enum":["LCP","INP","CLS","FCP","TTFB"],"default":"LCP"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Rows per breakdown (max 100)","default":10}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"performance_report","x-permission":"analytics.read"}},"/plans.json":{"get":{"operationId":"plans_list","summary":"List plans, prices and limits","tags":["Plans"],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"free, pro, business or enterprise"},"events":{"anyOf":[{"type":"integer","description":"Included events a month (free plan only)"},{"type":"null"}]},"badge_bonus":{"anyOf":[{"type":"integer","description":"Extra events a month for showing the badge (free plan)"},{"type":"null"}]},"limits":{"type":"object","description":"Plan limits. Null means unlimited"},"tiers":{"type":"array","items":{"type":"object","properties":{"events":{"type":"integer","description":"Events a month included"},"monthly":{"type":"integer","description":"USD a month, billed monthly"},"yearly":{"type":"integer","description":"USD a year, billed yearly (2 months free)"},"monthly_price_id":{"anyOf":[{"type":"string","description":"Paddle price id (monthly)"},{"type":"null"}]},"yearly_price_id":{"anyOf":[{"type":"string","description":"Paddle price id (yearly)"},{"type":"null"}]}}},"description":"Price ladder by events a month"},"contact_sales":{"type":"boolean","description":"Priced per contract"}}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"plans_list","security":[]}},"/workspaces/{workspace_id}/roles.json":{"post":{"operationId":"roles_create","summary":"Create a custom role","tags":["Roles"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Custom role id (custom_role_id on members)"},"name":{"type":"string"},"permissions":{"type":"array","items":{"type":"string"},"description":"Granted permissions"},"members":{"type":"integer","description":"Members with this role"},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"roles_create","x-permission":"members.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Role name","examples":["Client reviewer"]},"permissions":{"type":"array","items":{"type":"string","enum":["analytics.read","analytics.export","content.write","sites.manage","uptime.manage","members.manage","tokens.manage","billing.manage","workspace.manage"]},"description":"Permissions granted by the role"}},"required":["name","permissions"]}}}}},"get":{"operationId":"roles_list","summary":"List custom roles","tags":["Roles"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Custom role id (custom_role_id on members)"},"name":{"type":"string"},"permissions":{"type":"array","items":{"type":"string"},"description":"Granted permissions"},"members":{"type":"integer","description":"Members with this role"},"created_at":{"type":"string","format":"date-time"}}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"roles_list"}},"/workspaces/{workspace_id}/roles/{id}.json":{"delete":{"operationId":"roles_delete","summary":"Delete a custom role (must be unused)","tags":["Roles"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Custom role id (custom_role_id on members)"},"name":{"type":"string"},"permissions":{"type":"array","items":{"type":"string"},"description":"Granted permissions"},"members":{"type":"integer","description":"Members with this role"},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"roles_delete","x-permission":"members.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}},"patch":{"operationId":"roles_update","summary":"Update a custom role","tags":["Roles"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Custom role id (custom_role_id on members)"},"name":{"type":"string"},"permissions":{"type":"array","items":{"type":"string"},"description":"Granted permissions"},"members":{"type":"integer","description":"Members with this role"},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"roles_update","x-permission":"members.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Role name"},"permissions":{"type":"array","items":{"type":"string","enum":["analytics.read","analytics.export","content.write","sites.manage","uptime.manage","members.manage","tokens.manage","billing.manage","workspace.manage"]},"description":"Permissions granted by the role"}}}}}}}},"/scim/v2/Users.json":{"post":{"operationId":"scim_users_create","summary":"Provision a user","tags":["SCIM"],"parameters":[],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"scim_users_create","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"userName":{"type":"string","description":"Email address"},"name":{"type":"object","additionalProperties":true,"description":"givenName, familyName, formatted","default":{}},"active":{"type":"boolean","description":"Member of the workspace","default":true}},"required":["userName"]}}}},"security":[]},"get":{"operationId":"scim_users_list","summary":"List provisioned users","tags":["SCIM"],"parameters":[{"name":"scim_filter","in":"query","required":false,"schema":{"type":"string","description":"SCIM filter (query param `filter`), e.g. userName eq \"a@b.com\""}},{"name":"startIndex","in":"query","required":false,"schema":{"type":"integer","description":"1-based index of the first result","default":1}},{"name":"count","in":"query","required":false,"schema":{"type":"integer","description":"Page size (max 200)","default":100}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"scim_users_list","security":[]}},"/scim/v2/Users/{id}.json":{"delete":{"operationId":"scim_users_delete","summary":"Deprovision a user","tags":["SCIM"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"scim_users_delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"security":[]},"get":{"operationId":"scim_users_get","summary":"Get a provisioned user","tags":["SCIM"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"scim_users_get","security":[]},"patch":{"operationId":"scim_users_update","summary":"Update a user (PATCH active, name)","tags":["SCIM"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"scim_users_update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"Operations":{"type":"array","items":{"type":"object","additionalProperties":true},"description":"SCIM PatchOp operations"}},"required":["Operations"]}}}},"security":[]}},"/workspaces/{workspace_id}/sso/activate.json":{"post":{"operationId":"sso_activate","summary":"Activate a tested SSO configuration","tags":["SSO"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"protocol":{"type":"string","description":"saml or oidc"},"status":{"type":"string","description":"draft, testing, tested or active"},"enforced":{"type":"boolean","description":"SSO is the only way in (owner excepted)"},"domains":{"type":"array","items":{"type":"string"},"description":"Verified email domains"},"idp_sso_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"idp_entity_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"idp_cert_present":{"type":"boolean"},"oidc_issuer":{"anyOf":[{"type":"string"},{"type":"null"}]},"oidc_client_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"oidc_client_secret_present":{"type":"boolean"},"default_role":{"type":"string"},"jit_provisioning":{"type":"boolean"},"scim_enabled":{"type":"boolean"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"sso_activate","x-permission":"workspace.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/workspaces/{workspace_id}/sso/deactivate.json":{"post":{"operationId":"sso_deactivate","summary":"Turn SSO off (back to draft)","tags":["SSO"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"protocol":{"type":"string","description":"saml or oidc"},"status":{"type":"string","description":"draft, testing, tested or active"},"enforced":{"type":"boolean","description":"SSO is the only way in (owner excepted)"},"domains":{"type":"array","items":{"type":"string"},"description":"Verified email domains"},"idp_sso_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"idp_entity_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"idp_cert_present":{"type":"boolean"},"oidc_issuer":{"anyOf":[{"type":"string"},{"type":"null"}]},"oidc_client_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"oidc_client_secret_present":{"type":"boolean"},"default_role":{"type":"string"},"jit_provisioning":{"type":"boolean"},"scim_enabled":{"type":"boolean"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"sso_deactivate","x-permission":"workspace.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/workspaces/{workspace_id}/sso/scim_token.json":{"post":{"operationId":"sso_scim_token","summary":"Generate a new SCIM token (shown once)","tags":["SSO"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"sso_scim_token","x-permission":"workspace.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/workspaces/{workspace_id}/sso.json":{"get":{"operationId":"sso_get","summary":"Get SSO settings","tags":["SSO"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"protocol":{"type":"string","description":"saml or oidc"},"status":{"type":"string","description":"draft, testing, tested or active"},"enforced":{"type":"boolean","description":"SSO is the only way in (owner excepted)"},"domains":{"type":"array","items":{"type":"string"},"description":"Verified email domains"},"idp_sso_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"idp_entity_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"idp_cert_present":{"type":"boolean"},"oidc_issuer":{"anyOf":[{"type":"string"},{"type":"null"}]},"oidc_client_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"oidc_client_secret_present":{"type":"boolean"},"default_role":{"type":"string"},"jit_provisioning":{"type":"boolean"},"scim_enabled":{"type":"boolean"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"sso_get","x-permission":"workspace.manage"},"patch":{"operationId":"sso_update","summary":"Create or update SSO settings","tags":["SSO"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"protocol":{"type":"string","description":"saml or oidc"},"status":{"type":"string","description":"draft, testing, tested or active"},"enforced":{"type":"boolean","description":"SSO is the only way in (owner excepted)"},"domains":{"type":"array","items":{"type":"string"},"description":"Verified email domains"},"idp_sso_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"idp_entity_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"idp_cert_present":{"type":"boolean"},"oidc_issuer":{"anyOf":[{"type":"string"},{"type":"null"}]},"oidc_client_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"oidc_client_secret_present":{"type":"boolean"},"default_role":{"type":"string"},"jit_provisioning":{"type":"boolean"},"scim_enabled":{"type":"boolean"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"sso_update","x-permission":"workspace.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"protocol":{"type":"string","description":"saml or oidc","enum":["saml","oidc"]},"idp_sso_url":{"type":"string","description":"SAML: IdP single sign-on URL"},"idp_entity_id":{"type":"string","description":"SAML: IdP entity id (issuer)"},"idp_cert":{"type":"string","description":"SAML: IdP X.509 signing certificate (PEM)"},"oidc_issuer":{"type":"string","description":"OIDC: issuer URL (discovery)"},"oidc_client_id":{"type":"string","description":"OIDC: client id"},"oidc_client_secret":{"type":"string","description":"OIDC: client secret (write-only)"},"domains":{"type":"array","items":{"type":"string"},"description":"Verified email domains that use this SSO"},"default_role":{"type":"string","description":"Role for members created by JIT or SCIM","enum":["admin","editor","analyst","viewer","billing"]},"jit_provisioning":{"type":"boolean","description":"Create members on first SSO login"},"enforced":{"type":"boolean","description":"Only allow SSO logins (needs an active config)"}}}}}}}},"/sites/{site_id}/search.json":{"get":{"operationId":"search_report","summary":"Search report: clicks, impressions, CTR, position, top queries/pages, landing pages and opportunities","tags":["Search"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","description":"Date range preset. Use custom with from/to","enum":["today","yesterday","24h","7d","14d","28d","30d","90d","mtd","last_month","qtd","last_quarter","ytd","12mo","last_year","all","custom"],"default":"30d"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom range start (site timezone)"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom range end, inclusive"}},{"name":"compare","in":"query","required":false,"schema":{"type":"string","description":"Comparison period","enum":["none","previous_period","previous_year","custom"],"default":"none"}},{"name":"compare_from","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom comparison start"}},{"name":"compare_to","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom comparison end"}},{"name":"match_weekday","in":"query","required":false,"schema":{"type":"boolean","description":"Align comparison days of the week","default":false}},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{},"description":"Filters: [[\"dimension\",\"operator\",\"value\"], …]. Operators: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Wrap conditions in {\"any\": [...]} for OR.","default":[]}},{"name":"segment_id","in":"query","required":false,"schema":{"type":"string","description":"Apply a saved segment (seg_…)"}},{"name":"include_imported","in":"query","required":false,"schema":{"type":"boolean","description":"Add imported historical data (dates before the first native event, ignored when filters or a segment are applied)","default":false}},{"name":"provider","in":"query","required":false,"schema":{"type":"string","description":"google (Search Console) or bing","enum":["google","bing"],"default":"google"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Rows per table (max 100)","default":25}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"search_report","x-permission":"analytics.read"}},"/sites/{site_id}/search/connections.json":{"post":{"operationId":"search_connect","summary":"Connect a Search Console property or Bing site","tags":["Search"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"provider":{"type":"string","description":"google or bing"},"property":{"type":"string","description":"Search Console property or Bing site URL"},"status":{"type":"string","description":"active or error"},"last_synced_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"search_connect","x-permission":"sites.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","description":"google or bing","enum":["google","bing"],"default":"google"},"property":{"type":"string","description":"Search Console property (e.g. sc-domain:example.com) or Bing site URL","examples":["sc-domain:example.com"]},"bing_api_key":{"type":"string","description":"Your own Bing Webmaster Tools API key (Settings > API access). Required when provider is bing. Stored encrypted and never returned."}},"required":["property"]}}}}}},"/sites/{site_id}/search/connections/{provider}.json":{"delete":{"operationId":"search_disconnect","summary":"Disconnect Search Console or Bing and delete its data","tags":["Search"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"provider","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"provider":{"type":"string","description":"google or bing"},"property":{"type":"string","description":"Search Console property or Bing site URL"},"status":{"type":"string","description":"active or error"},"last_synced_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"search_disconnect","x-permission":"sites.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/sites/{site_id}/search/properties.json":{"post":{"operationId":"search_properties","summary":"List properties you can connect (Search Console needs a Google grant from the browser)","tags":["Search"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"search_properties","x-permission":"sites.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","description":"google or bing","enum":["google","bing"],"default":"google"},"bing_api_key":{"type":"string","description":"Your own Bing Webmaster Tools API key (Settings > API access). Required when provider is bing. Only used to list the sites it can see."}}}}}}}},"/sites/{site_id}/search/sync.json":{"post":{"operationId":"search_sync","summary":"Import search data now","tags":["Search"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"provider":{"type":"string","description":"google or bing"},"property":{"type":"string","description":"Search Console property or Bing site URL"},"status":{"type":"string","description":"active or error"},"last_synced_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"search_sync","x-permission":"sites.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","description":"google or bing","enum":["google","bing"],"default":"google"}}}}}}}},"/sites/{site_id}/segments.json":{"post":{"operationId":"segments_create","summary":"Save filters as a segment","tags":["Segments"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Segment id, e.g. seg_7Q2K9XH3AB"},"site_id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string","description":"What the segment is for, or null"},{"type":"null"}]},"filters":{"type":"array","description":"Filters in the stats filter format: conditions [\"dimension\", \"operator\", \"value\"] that must all match, and {\"any\": [conditions]} groups"},"summary":{"type":"string","description":"The filters in plain English, e.g. \"Visitors from the United States on mobile who viewed /pricing\""},"shared":{"type":"boolean","description":"Visible to everyone with access to the site"},"mine":{"type":"boolean","description":"Created by you"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"segments_create","x-permission":"content.write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Segment name, e.g. \"Mobile visitors from ads\"","examples":["Mobile visitors from ads"]},"description":{"type":"string","description":"Optional note on what the segment is for (300 characters at most)","examples":["People who might buy the Pro plan"]},"filters":{"type":"array","items":{},"description":"Filters, all of which must match. Each item is a condition [\"dimension\", \"operator\", \"value\"], or {\"any\": [conditions]} when any one of several may match. Dimensions: page, entry_page, exit_page, hostname, channel, referrer, referrer_url, ref, utm_source, utm_medium, utm_campaign, utm_content, utm_term, country (ISO code, e.g. US), language, device (desktop, mobile, tablet, tv, other), browser, browser_version, os, os_version, screen, interaction (seen, none or unknown), goal (goal id), event (custom event name) and prop:<key> (custom event property). Operators: is, is_not, contains, not_contains, starts_with, regex, not_regex, any_of and none_of (value is a list), gt and lt (a number), between (a list of two numbers). Rows from the segment form are accepted too: {\"dimension\", \"operator\", \"value\", \"property\" (for dimension prop), \"join\": \"and\" or \"or\" (or combines the row with the one before it)}. Example: [[\"country\", \"is\", \"US\"], [\"device\", \"is\", \"mobile\"], {\"any\": [[\"page\", \"starts_with\", \"/pricing\"], [\"goal\", \"is\", \"goal_7Q2K9XH3AB\"]]}]","examples":[[["country","is","US"],["device","is","mobile"],{"any":[["page","starts_with","/pricing"],["goal","is","goal_7Q2K9XH3AB"]]}]]},"shared":{"type":"boolean","description":"Visible to everyone with access to the site (false: only you)","default":true}},"required":["name","filters"]}}}}},"get":{"operationId":"segments_list","summary":"List segments you can use on a site","tags":["Segments"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Segment id, e.g. seg_7Q2K9XH3AB"},"site_id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string","description":"What the segment is for, or null"},{"type":"null"}]},"filters":{"type":"array","description":"Filters in the stats filter format: conditions [\"dimension\", \"operator\", \"value\"] that must all match, and {\"any\": [conditions]} groups"},"summary":{"type":"string","description":"The filters in plain English, e.g. \"Visitors from the United States on mobile who viewed /pricing\""},"shared":{"type":"boolean","description":"Visible to everyone with access to the site"},"mine":{"type":"boolean","description":"Created by you"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"segments_list","x-permission":"analytics.read"}},"/sites/{site_id}/segments/{id}.json":{"delete":{"operationId":"segments_delete","summary":"Delete a segment","tags":["Segments"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Segment id, e.g. seg_7Q2K9XH3AB"},"site_id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string","description":"What the segment is for, or null"},{"type":"null"}]},"filters":{"type":"array","description":"Filters in the stats filter format: conditions [\"dimension\", \"operator\", \"value\"] that must all match, and {\"any\": [conditions]} groups"},"summary":{"type":"string","description":"The filters in plain English, e.g. \"Visitors from the United States on mobile who viewed /pricing\""},"shared":{"type":"boolean","description":"Visible to everyone with access to the site"},"mine":{"type":"boolean","description":"Created by you"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"segments_delete","x-permission":"content.write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}},"get":{"operationId":"segments_get","summary":"Get a segment","tags":["Segments"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Segment id, e.g. seg_7Q2K9XH3AB"},"site_id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string","description":"What the segment is for, or null"},{"type":"null"}]},"filters":{"type":"array","description":"Filters in the stats filter format: conditions [\"dimension\", \"operator\", \"value\"] that must all match, and {\"any\": [conditions]} groups"},"summary":{"type":"string","description":"The filters in plain English, e.g. \"Visitors from the United States on mobile who viewed /pricing\""},"shared":{"type":"boolean","description":"Visible to everyone with access to the site"},"mine":{"type":"boolean","description":"Created by you"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"segments_get","x-permission":"analytics.read"},"patch":{"operationId":"segments_update","summary":"Rename a segment or change its filters or sharing","tags":["Segments"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Segment id, e.g. seg_7Q2K9XH3AB"},"site_id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string","description":"What the segment is for, or null"},{"type":"null"}]},"filters":{"type":"array","description":"Filters in the stats filter format: conditions [\"dimension\", \"operator\", \"value\"] that must all match, and {\"any\": [conditions]} groups"},"summary":{"type":"string","description":"The filters in plain English, e.g. \"Visitors from the United States on mobile who viewed /pricing\""},"shared":{"type":"boolean","description":"Visible to everyone with access to the site"},"mine":{"type":"boolean","description":"Created by you"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"segments_update","x-permission":"content.write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Segment name"},"description":{"type":"string","description":"Optional note on what the segment is for (300 characters at most, empty to clear)"},"filters":{"type":"array","items":{},"description":"Replacement filters, in the same format as when creating. Filters, all of which must match. Each item is a condition [\"dimension\", \"operator\", \"value\"], or {\"any\": [conditions]} when any one of several may match. Dimensions: page, entry_page, exit_page, hostname, channel, referrer, referrer_url, ref, utm_source, utm_medium, utm_campaign, utm_content, utm_term, country (ISO code, e.g. US), language, device (desktop, mobile, tablet, tv, other), browser, browser_version, os, os_version, screen, interaction (seen, none or unknown), goal (goal id), event (custom event name) and prop:<key> (custom event property). Operators: is, is_not, contains, not_contains, starts_with, regex, not_regex, any_of and none_of (value is a list), gt and lt (a number), between (a list of two numbers). Rows from the segment form are accepted too: {\"dimension\", \"operator\", \"value\", \"property\" (for dimension prop), \"join\": \"and\" or \"or\" (or combines the row with the one before it)}. Example: [[\"country\", \"is\", \"US\"], [\"device\", \"is\", \"mobile\"], {\"any\": [[\"page\", \"starts_with\", \"/pricing\"], [\"goal\", \"is\", \"goal_7Q2K9XH3AB\"]]}]","examples":[[["country","is","US"],["device","is","mobile"],{"any":[["page","starts_with","/pricing"],["goal","is","goal_7Q2K9XH3AB"]]}]]},"shared":{"type":"boolean","description":"Visible to everyone on the site"}}}}}}}},"/sites/{site_id}/segments/preview.json":{"post":{"operationId":"segments_preview","summary":"Describe filters in plain English and count the visitors they matched in the last 30 days","tags":["Segments"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"segments_preview","x-permission":"analytics.read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"filters":{"type":"array","items":{},"description":"Filters, all of which must match. Each item is a condition [\"dimension\", \"operator\", \"value\"], or {\"any\": [conditions]} when any one of several may match. Dimensions: page, entry_page, exit_page, hostname, channel, referrer, referrer_url, ref, utm_source, utm_medium, utm_campaign, utm_content, utm_term, country (ISO code, e.g. US), language, device (desktop, mobile, tablet, tv, other), browser, browser_version, os, os_version, screen, interaction (seen, none or unknown), goal (goal id), event (custom event name) and prop:<key> (custom event property). Operators: is, is_not, contains, not_contains, starts_with, regex, not_regex, any_of and none_of (value is a list), gt and lt (a number), between (a list of two numbers). Rows from the segment form are accepted too: {\"dimension\", \"operator\", \"value\", \"property\" (for dimension prop), \"join\": \"and\" or \"or\" (or combines the row with the one before it)}. Example: [[\"country\", \"is\", \"US\"], [\"device\", \"is\", \"mobile\"], {\"any\": [[\"page\", \"starts_with\", \"/pricing\"], [\"goal\", \"is\", \"goal_7Q2K9XH3AB\"]]}]","examples":[[["country","is","US"],["device","is","mobile"],{"any":[["page","starts_with","/pricing"],["goal","is","goal_7Q2K9XH3AB"]]}]],"default":[]}}}}}}}},"/badge/{site_id}.json":{"get":{"operationId":"badges_get","summary":"Visitor counter badge (SVG) for a public site","tags":["Sharing"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"badges_get","security":[]}},"/sites/{site_id}/shared_links.json":{"post":{"operationId":"shared_links_create","summary":"Create a share link","tags":["Sharing"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Share link id, e.g. shr_7Q2K9XH3AB"},"kind":{"type":"string","description":"public, password, sso or embed"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"type":"string","description":"Share URL (the password never goes in it)"},"embed_url":{"type":"string","description":"URL for an iframe embed"},"sections":{"type":"array","items":{"type":"string"},"description":"Shared sections besides the overview"},"locked_filters":{"type":"array","description":"Filters viewers cannot remove"},"locked_period":{"anyOf":[{"type":"string","description":"Fixed date range"},{"type":"null"}]},"options":{"type":"object","description":"theme and allow_filters"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"usable":{"type":"boolean","description":"Not expired or revoked"},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"shared_links_create","x-permission":"sites.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","description":"public, password, sso (members only) or embed","enum":["public","password","sso","embed"],"default":"public"},"name":{"type":"string","description":"Label, e.g. \"Client report\""},"password":{"type":"string","description":"Password for password links (min 8 characters)"},"expires_at":{"type":"string","format":"date-time","description":"Link stops working after this time"},"sections":{"type":"array","items":{"type":"string"},"description":"Sections to show besides the overview: overview, pages, sources, campaigns, locations, technology, conversions, events, live","default":["pages","sources"]},"locked_filters":{"type":"array","items":{},"description":"Filters applied to every view of the link and not removable, e.g. [[\"country\",\"is\",\"US\"]]","default":[]},"locked_period":{"type":"string","description":"Fix the date range to a preset such as 30d (blank lets viewers choose)"},"theme":{"type":"string","description":"Color theme for the shared page and embeds","enum":["auto","light","dark"],"default":"auto"},"allow_filters":{"type":"boolean","description":"Let viewers add their own filters","default":true}}}}}}},"get":{"operationId":"shared_links_list","summary":"List share links","tags":["Sharing"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","description":"Only links of this kind","enum":["public","password","sso","embed"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Share link id, e.g. shr_7Q2K9XH3AB"},"kind":{"type":"string","description":"public, password, sso or embed"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"type":"string","description":"Share URL (the password never goes in it)"},"embed_url":{"type":"string","description":"URL for an iframe embed"},"sections":{"type":"array","items":{"type":"string"},"description":"Shared sections besides the overview"},"locked_filters":{"type":"array","description":"Filters viewers cannot remove"},"locked_period":{"anyOf":[{"type":"string","description":"Fixed date range"},{"type":"null"}]},"options":{"type":"object","description":"theme and allow_filters"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"usable":{"type":"boolean","description":"Not expired or revoked"},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"shared_links_list","x-permission":"sites.manage"}},"/sites/{site_id}/shared_links/{id}.json":{"delete":{"operationId":"shared_links_delete","summary":"Revoke a share link","tags":["Sharing"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Share link id, e.g. shr_7Q2K9XH3AB"},"kind":{"type":"string","description":"public, password, sso or embed"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"type":"string","description":"Share URL (the password never goes in it)"},"embed_url":{"type":"string","description":"URL for an iframe embed"},"sections":{"type":"array","items":{"type":"string"},"description":"Shared sections besides the overview"},"locked_filters":{"type":"array","description":"Filters viewers cannot remove"},"locked_period":{"anyOf":[{"type":"string","description":"Fixed date range"},{"type":"null"}]},"options":{"type":"object","description":"theme and allow_filters"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"usable":{"type":"boolean","description":"Not expired or revoked"},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"shared_links_delete","x-permission":"sites.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}},"patch":{"operationId":"shared_links_update","summary":"Change a share link","tags":["Sharing"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Share link id, e.g. shr_7Q2K9XH3AB"},"kind":{"type":"string","description":"public, password, sso or embed"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"type":"string","description":"Share URL (the password never goes in it)"},"embed_url":{"type":"string","description":"URL for an iframe embed"},"sections":{"type":"array","items":{"type":"string"},"description":"Shared sections besides the overview"},"locked_filters":{"type":"array","description":"Filters viewers cannot remove"},"locked_period":{"anyOf":[{"type":"string","description":"Fixed date range"},{"type":"null"}]},"options":{"type":"object","description":"theme and allow_filters"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"usable":{"type":"boolean","description":"Not expired or revoked"},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"shared_links_update","x-permission":"sites.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Label"},"password":{"type":"string","description":"New password (password links)"},"expires_at":{"type":"string","format":"date-time","description":"Link stops working after this time"},"clear_expiry":{"type":"boolean","description":"Remove the expiry date","default":false},"sections":{"type":"array","items":{"type":"string"},"description":"Sections to show besides the overview: overview, pages, sources, campaigns, locations, technology, conversions, events, live"},"locked_filters":{"type":"array","items":{},"description":"Filters applied to every view of the link and not removable, e.g. [[\"country\",\"is\",\"US\"]]"},"locked_period":{"type":"string","description":"Fix the date range (e.g. 30d), or \"none\" to unlock"},"theme":{"type":"string","description":"Color theme","enum":["auto","light","dark"]},"allow_filters":{"type":"boolean","description":"Let viewers add their own filters"}}}}}}}},"/share/{token}/breakdown/{dimension}.json":{"get":{"operationId":"shares_breakdown","summary":"Top values of a shared dimension","tags":["Sharing"],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}},{"name":"dimension","in":"path","required":true,"schema":{"type":"string"}},{"name":"dimension","in":"query","required":false,"schema":{"type":"string","description":"A dimension from a shared section, e.g. page, channel, country"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","description":"Date range preset (ignored if the link locks it)","enum":["today","yesterday","24h","7d","14d","28d","30d","90d","mtd","last_month","qtd","last_quarter","ytd","12mo","last_year","all","custom"],"default":"30d"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom range start"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom range end, inclusive"}},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{},"description":"Extra filters, if the link allows them","default":[]}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Rows (max 100)","default":10}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"shares_breakdown","security":[]}},"/share/{token}.json":{"get":{"operationId":"shares_overview","summary":"Shared dashboard overview for a share token","tags":["Sharing"],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","description":"Date range preset (ignored if the link locks it)","enum":["today","yesterday","24h","7d","14d","28d","30d","90d","mtd","last_month","qtd","last_quarter","ytd","12mo","last_year","all","custom"],"default":"30d"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom range start"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Custom range end, inclusive"}},{"name":"compare","in":"query","required":false,"schema":{"type":"string","description":"Comparison period","enum":["none","previous_period","previous_year","custom"],"default":"none"}},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{},"description":"Extra filters, if the link allows them: [[\"dimension\",\"operator\",\"value\"], …]","default":[]}},{"name":"interval","in":"query","required":false,"schema":{"type":"string","description":"Chart bucket size","enum":["auto","minute","hour","day","week","month","quarter","year"],"default":"auto"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"shares_overview","security":[]}},"/sites/{site_id}/data_reset.json":{"post":{"operationId":"sites_reset_data","summary":"Delete all events and visits in a date range (runs in the background, cannot be undone)","tags":["Sites"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"sites_reset_data","x-permission":"sites.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","format":"date","description":"First day to delete (site timezone)"},"to":{"type":"string","format":"date","description":"Last day to delete, inclusive"},"confirm":{"type":"string","description":"Type the domain to confirm"}},"required":["from","to","confirm"]}}}}}},"/sites/{site_id}/filter_stats.json":{"get":{"operationId":"sites_filter_stats","summary":"Filtered traffic summary: bots, traffic rules or PII redactions by reason and country (counts only)","tags":["Sites"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","description":"bot (bots filtered), rule (traffic rules) or redaction (PII scrubber)","enum":["bot","rule","redaction"],"default":"bot"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","description":"Days to look back (1-395)","default":30}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"sites_filter_stats","x-permission":"analytics.read"}},"/sites/{site_id}/access.json":{"get":{"operationId":"sites_access_list","summary":"List members and whether they can see this site","tags":["Sites"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid","description":"Membership id"},"email":{"type":"string"},"name":{"type":"string"},"role":{"type":"string"},"access":{"type":"boolean","description":"Can see this site"},"locked":{"type":"boolean","description":"Owners and admins always have access"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"sites_access_list","x-permission":"members.manage"},"patch":{"operationId":"sites_access_update","summary":"Grant or remove one member's access to this site","tags":["Sites"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid","description":"Membership id"},"email":{"type":"string"},"name":{"type":"string"},"role":{"type":"string"},"access":{"type":"boolean","description":"Can see this site"},"locked":{"type":"boolean","description":"Owners and admins always have access"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"sites_access_update","x-permission":"members.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"membership_id":{"type":"string","description":"Membership id from sites_access_list"},"access":{"type":"boolean","description":"true to grant access, false to remove it"}},"required":["membership_id","access"]}}}}}},"/sites/{site_id}/favorite.json":{"post":{"operationId":"sites_favorite","summary":"Star a site (pinned first on All sites)","tags":["Sites"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Site id used in the tracking snippet"},"workspace_id":{"type":"string"},"domain":{"type":"string"},"name":{"type":"string"},"extra_domains":{"type":"array","items":{"type":"string"}},"multi_domain_mode":{"type":"string"},"timezone":{"type":"string"},"currency":{"type":"string"},"week_start":{"type":"integer"},"labels":{"type":"array","items":{"type":"string"}},"honor_dnt":{"type":"boolean"},"honor_gpc":{"type":"boolean"},"pii_scrubber":{"type":"boolean"},"redaction_rules":{"type":"array"},"allowed_params":{"type":"array","items":{"type":"string"}},"path_masks":{"type":"array"},"retention_months":{"anyOf":[{"type":"integer"},{"type":"null"}]},"bot_filtering":{"type":"boolean"},"traffic_rule_modes":{"type":"object"},"vitals_sample_rate":{"type":"integer"},"conversion_denominator":{"type":"string"},"public_dashboard":{"type":"boolean"},"public_indexable":{"type":"boolean"},"ingest_key_prefix":{"anyOf":[{"type":"string","description":"Start of the server ingest key"},{"type":"null"}]},"verified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"first_event_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_event_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"snippet":{"type":"string","description":"HTML tracking snippet"},"favorite":{"type":"boolean","description":"Starred by you"},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"sites_favorite","x-permission":"analytics.read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}},"delete":{"operationId":"sites_unfavorite","summary":"Unstar a site","tags":["Sites"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Site id used in the tracking snippet"},"workspace_id":{"type":"string"},"domain":{"type":"string"},"name":{"type":"string"},"extra_domains":{"type":"array","items":{"type":"string"}},"multi_domain_mode":{"type":"string"},"timezone":{"type":"string"},"currency":{"type":"string"},"week_start":{"type":"integer"},"labels":{"type":"array","items":{"type":"string"}},"honor_dnt":{"type":"boolean"},"honor_gpc":{"type":"boolean"},"pii_scrubber":{"type":"boolean"},"redaction_rules":{"type":"array"},"allowed_params":{"type":"array","items":{"type":"string"}},"path_masks":{"type":"array"},"retention_months":{"anyOf":[{"type":"integer"},{"type":"null"}]},"bot_filtering":{"type":"boolean"},"traffic_rule_modes":{"type":"object"},"vitals_sample_rate":{"type":"integer"},"conversion_denominator":{"type":"string"},"public_dashboard":{"type":"boolean"},"public_indexable":{"type":"boolean"},"ingest_key_prefix":{"anyOf":[{"type":"string","description":"Start of the server ingest key"},{"type":"null"}]},"verified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"first_event_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_event_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"snippet":{"type":"string","description":"HTML tracking snippet"},"favorite":{"type":"boolean","description":"Starred by you"},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"sites_unfavorite","x-permission":"analytics.read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/sites/{site_id}/setup.json":{"get":{"operationId":"sites_setup_get","summary":"Installation status and snippet for a site","tags":["Sites"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"sites_setup_get","x-permission":"analytics.read"}},"/transfers/{token}/accept.json":{"post":{"operationId":"site_transfers_accept","summary":"Accept a site transfer into one of your workspaces","tags":["Sites"],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"site_id":{"type":"string","description":"Site being transferred"},"site_domain":{"type":"string"},"from_workspace":{"type":"string","description":"Current workspace name"},"to_workspace_id":{"anyOf":[{"type":"string","description":"Receiving workspace"},{"type":"null"}]},"to_email":{"type":"string","description":"Recipient email"},"status":{"type":"string","description":"pending, accepted or canceled"},"expires_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"site_transfers_accept","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace_id":{"type":"string","description":"Workspace to move the site into (ws_…)"}},"required":["workspace_id"]}}}},"security":[]}},"/sites/{site_id}/transfer.json":{"post":{"operationId":"sites_transfer_start","summary":"Start transferring a site to another workspace (emails the recipient)","tags":["Sites"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"site_id":{"type":"string","description":"Site being transferred"},"site_domain":{"type":"string"},"from_workspace":{"type":"string","description":"Current workspace name"},"to_workspace_id":{"anyOf":[{"type":"string","description":"Receiving workspace"},{"type":"null"}]},"to_email":{"type":"string","description":"Recipient email"},"status":{"type":"string","description":"pending, accepted or canceled"},"expires_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"sites_transfer_start","x-permission":"sites.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the person who will receive the site (they choose one of their workspaces)"}},"required":["email"]}}}}},"delete":{"operationId":"sites_transfer_cancel","summary":"Cancel a pending site transfer","tags":["Sites"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"site_id":{"type":"string","description":"Site being transferred"},"site_domain":{"type":"string"},"from_workspace":{"type":"string","description":"Current workspace name"},"to_workspace_id":{"anyOf":[{"type":"string","description":"Receiving workspace"},{"type":"null"}]},"to_email":{"type":"string","description":"Recipient email"},"status":{"type":"string","description":"pending, accepted or canceled"},"expires_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"sites_transfer_cancel","x-permission":"sites.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/transfers/{token}.json":{"get":{"operationId":"site_transfers_get","summary":"Get a pending transfer from its emailed token","tags":["Sites"],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"site_id":{"type":"string","description":"Site being transferred"},"site_domain":{"type":"string"},"from_workspace":{"type":"string","description":"Current workspace name"},"to_workspace_id":{"anyOf":[{"type":"string","description":"Receiving workspace"},{"type":"null"}]},"to_email":{"type":"string","description":"Recipient email"},"status":{"type":"string","description":"pending, accepted or canceled"},"expires_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"site_transfers_get","security":[]}},"/workspaces/{workspace_id}/sites.json":{"post":{"operationId":"sites_create","summary":"Add a site","tags":["Sites"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Site id used in the tracking snippet"},"workspace_id":{"type":"string"},"domain":{"type":"string"},"name":{"type":"string"},"extra_domains":{"type":"array","items":{"type":"string"}},"multi_domain_mode":{"type":"string"},"timezone":{"type":"string"},"currency":{"type":"string"},"week_start":{"type":"integer"},"labels":{"type":"array","items":{"type":"string"}},"honor_dnt":{"type":"boolean"},"honor_gpc":{"type":"boolean"},"pii_scrubber":{"type":"boolean"},"redaction_rules":{"type":"array"},"allowed_params":{"type":"array","items":{"type":"string"}},"path_masks":{"type":"array"},"retention_months":{"anyOf":[{"type":"integer"},{"type":"null"}]},"bot_filtering":{"type":"boolean"},"traffic_rule_modes":{"type":"object"},"vitals_sample_rate":{"type":"integer"},"conversion_denominator":{"type":"string"},"public_dashboard":{"type":"boolean"},"public_indexable":{"type":"boolean"},"ingest_key_prefix":{"anyOf":[{"type":"string","description":"Start of the server ingest key"},{"type":"null"}]},"verified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"first_event_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_event_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"snippet":{"type":"string","description":"HTML tracking snippet"},"favorite":{"type":"boolean","description":"Starred by you"},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"sites_create","x-permission":"sites.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","description":"Primary domain, e.g. example.com","examples":["example.com"]},"name":{"type":"string","description":"Display name (defaults to the domain)"},"timezone":{"type":"string","description":"Reporting timezone"},"currency":{"type":"string","description":"Currency for revenue (ISO 4217)"}},"required":["domain"]}}}}},"get":{"operationId":"sites_list","summary":"List sites in a workspace","tags":["Sites"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"query","in":"query","required":false,"schema":{"type":"string","description":"Filter by domain or name"}},{"name":"label","in":"query","required":false,"schema":{"type":"string","description":"Only sites with this label"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","description":"position (your order), name, or visitors in the last 30 days (most first)","enum":["position","name","visitors"],"default":"position"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Site id used in the tracking snippet"},"workspace_id":{"type":"string"},"domain":{"type":"string"},"name":{"type":"string"},"extra_domains":{"type":"array","items":{"type":"string"}},"multi_domain_mode":{"type":"string"},"timezone":{"type":"string"},"currency":{"type":"string"},"week_start":{"type":"integer"},"labels":{"type":"array","items":{"type":"string"}},"honor_dnt":{"type":"boolean"},"honor_gpc":{"type":"boolean"},"pii_scrubber":{"type":"boolean"},"redaction_rules":{"type":"array"},"allowed_params":{"type":"array","items":{"type":"string"}},"path_masks":{"type":"array"},"retention_months":{"anyOf":[{"type":"integer"},{"type":"null"}]},"bot_filtering":{"type":"boolean"},"traffic_rule_modes":{"type":"object"},"vitals_sample_rate":{"type":"integer"},"conversion_denominator":{"type":"string"},"public_dashboard":{"type":"boolean"},"public_indexable":{"type":"boolean"},"ingest_key_prefix":{"anyOf":[{"type":"string","description":"Start of the server ingest key"},{"type":"null"}]},"verified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"first_event_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_event_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"snippet":{"type":"string","description":"HTML tracking snippet"},"favorite":{"type":"boolean","description":"Starred by you"},"created_at":{"type":"string","format":"date-time"}}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"sites_list","x-permission":"analytics.read"}},"/sites/{id}.json":{"delete":{"operationId":"sites_delete","summary":"Delete a site (purged after 7 days)","tags":["Sites"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Site id used in the tracking snippet"},"workspace_id":{"type":"string"},"domain":{"type":"string"},"name":{"type":"string"},"extra_domains":{"type":"array","items":{"type":"string"}},"multi_domain_mode":{"type":"string"},"timezone":{"type":"string"},"currency":{"type":"string"},"week_start":{"type":"integer"},"labels":{"type":"array","items":{"type":"string"}},"honor_dnt":{"type":"boolean"},"honor_gpc":{"type":"boolean"},"pii_scrubber":{"type":"boolean"},"redaction_rules":{"type":"array"},"allowed_params":{"type":"array","items":{"type":"string"}},"path_masks":{"type":"array"},"retention_months":{"anyOf":[{"type":"integer"},{"type":"null"}]},"bot_filtering":{"type":"boolean"},"traffic_rule_modes":{"type":"object"},"vitals_sample_rate":{"type":"integer"},"conversion_denominator":{"type":"string"},"public_dashboard":{"type":"boolean"},"public_indexable":{"type":"boolean"},"ingest_key_prefix":{"anyOf":[{"type":"string","description":"Start of the server ingest key"},{"type":"null"}]},"verified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"first_event_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_event_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"snippet":{"type":"string","description":"HTML tracking snippet"},"favorite":{"type":"boolean","description":"Starred by you"},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"sites_delete","x-permission":"sites.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirm":{"type":"string","description":"Type the domain to confirm"}},"required":["confirm"]}}}}},"get":{"operationId":"sites_get","summary":"Get a site and all its settings","tags":["Sites"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Site id used in the tracking snippet"},"workspace_id":{"type":"string"},"domain":{"type":"string"},"name":{"type":"string"},"extra_domains":{"type":"array","items":{"type":"string"}},"multi_domain_mode":{"type":"string"},"timezone":{"type":"string"},"currency":{"type":"string"},"week_start":{"type":"integer"},"labels":{"type":"array","items":{"type":"string"}},"honor_dnt":{"type":"boolean"},"honor_gpc":{"type":"boolean"},"pii_scrubber":{"type":"boolean"},"redaction_rules":{"type":"array"},"allowed_params":{"type":"array","items":{"type":"string"}},"path_masks":{"type":"array"},"retention_months":{"anyOf":[{"type":"integer"},{"type":"null"}]},"bot_filtering":{"type":"boolean"},"traffic_rule_modes":{"type":"object"},"vitals_sample_rate":{"type":"integer"},"conversion_denominator":{"type":"string"},"public_dashboard":{"type":"boolean"},"public_indexable":{"type":"boolean"},"ingest_key_prefix":{"anyOf":[{"type":"string","description":"Start of the server ingest key"},{"type":"null"}]},"verified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"first_event_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_event_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"snippet":{"type":"string","description":"HTML tracking snippet"},"favorite":{"type":"boolean","description":"Starred by you"},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"sites_get","x-permission":"analytics.read"},"patch":{"operationId":"sites_update","summary":"Update site settings","tags":["Sites"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Site id used in the tracking snippet"},"workspace_id":{"type":"string"},"domain":{"type":"string"},"name":{"type":"string"},"extra_domains":{"type":"array","items":{"type":"string"}},"multi_domain_mode":{"type":"string"},"timezone":{"type":"string"},"currency":{"type":"string"},"week_start":{"type":"integer"},"labels":{"type":"array","items":{"type":"string"}},"honor_dnt":{"type":"boolean"},"honor_gpc":{"type":"boolean"},"pii_scrubber":{"type":"boolean"},"redaction_rules":{"type":"array"},"allowed_params":{"type":"array","items":{"type":"string"}},"path_masks":{"type":"array"},"retention_months":{"anyOf":[{"type":"integer"},{"type":"null"}]},"bot_filtering":{"type":"boolean"},"traffic_rule_modes":{"type":"object"},"vitals_sample_rate":{"type":"integer"},"conversion_denominator":{"type":"string"},"public_dashboard":{"type":"boolean"},"public_indexable":{"type":"boolean"},"ingest_key_prefix":{"anyOf":[{"type":"string","description":"Start of the server ingest key"},{"type":"null"}]},"verified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"first_event_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_event_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"snippet":{"type":"string","description":"HTML tracking snippet"},"favorite":{"type":"boolean","description":"Starred by you"},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"sites_update","x-permission":"sites.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Display name"},"domain":{"type":"string","description":"Primary domain"},"extra_domains":{"type":"array","items":{"type":"string"},"description":"Additional hostnames"},"multi_domain_mode":{"type":"string","description":"combined: one visitor across domains","enum":["combined","separate"]},"timezone":{"type":"string","description":"Reporting timezone"},"currency":{"type":"string","description":"Revenue currency (ISO 4217)"},"week_start":{"type":"integer","description":"0 = Sunday, 1 = Monday"},"labels":{"type":"array","items":{"type":"string"},"description":"Labels for grouping sites"},"honor_dnt":{"type":"boolean","description":"Skip visitors sending DNT"},"honor_gpc":{"type":"boolean","description":"Skip visitors sending GPC"},"pii_scrubber":{"type":"boolean","description":"Redact emails, tokens, ids"},"redaction_rules":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"pattern":{"type":"string"}}},"description":"Custom redaction regexes"},"allowed_params":{"type":"array","items":{"type":"string"},"description":"Query parameters to keep on paths"},"path_masks":{"type":"array","items":{"type":"object","properties":{"pattern":{"type":"string"},"replacement":{"type":"string"}}},"description":"Path masking rules, e.g. /u/* -> /u/:id"},"retention_months":{"type":"integer","description":"Delete data older than this"},"bot_filtering":{"type":"boolean","description":"Filter bot traffic"},"traffic_rule_modes":{"type":"object","additionalProperties":true,"description":"block or allow per traffic rule list"},"vitals_sample_rate":{"type":"integer","description":"Web Vitals sample %"},"conversion_denominator":{"type":"string","description":"Conversion rate over visits or visitors","enum":["visits","visitors"]},"public_dashboard":{"type":"boolean","description":"Anyone with the link can view stats"},"public_indexable":{"type":"boolean","description":"Let search engines index the public page"}}}}}}}},"/status/{slug}/confirm/{token}.json":{"get":{"operationId":"public_status_pages_confirm","summary":"Confirm a subscription from the emailed link","tags":["Status pages"],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}},{"name":"token","in":"path","required":true,"schema":{"type":"string"}},{"name":"token","in":"query","required":false,"schema":{"type":"string","description":"Confirmation token from the email"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"public_status_pages_confirm","security":[]}},"/status/{slug}.json":{"get":{"operationId":"public_status_pages_get","summary":"Public status page: current status, 90-day uptime bars, incidents and posts","tags":["Status pages"],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"brand_color":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","description":"operational, degraded or outage"},"checks":{"type":"array","description":"Each: {name, status, uptime_90d, days: [{date, uptime, downtime_seconds}]}"},"posts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Post id (spp_…)"},"title":{"type":"string"},"body":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","description":"investigating, identified, monitoring or resolved"},"posted_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}},"incidents":{"type":"array","description":"Recent incidents: {check, started_at, resolved_at, duration_seconds}"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"public_status_pages_get","security":[]}},"/status/{slug}/subscribers.json":{"post":{"operationId":"public_status_pages_subscribe","summary":"Subscribe an email address (double opt-in)","description":"Browser clients send a Cloudflare Turnstile token as `cf-turnstile-response`. Requests with an API token need none.","tags":["Status pages"],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"public_status_pages_subscribe","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"Email address to notify","examples":["you@example.com"]}},"required":["email"]}}}},"security":[]}},"/status/{slug}/unsubscribe/{token}.json":{"post":{"operationId":"public_status_pages_unsubscribe","summary":"Unsubscribe with the emailed token","tags":["Status pages"],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}},{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"public_status_pages_unsubscribe","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","description":"Unsubscribe token from the email"}},"required":["token"]}}}},"security":[]}},"/status_pages/{status_page_id}/posts.json":{"post":{"operationId":"status_page_posts_create","summary":"Post an incident update (emails subscribers)","tags":["Status pages"],"parameters":[{"name":"status_page_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Post id (spp_…)"},"title":{"type":"string"},"body":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","description":"investigating, identified, monitoring or resolved"},"posted_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"status_page_posts_create","x-permission":"uptime.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","description":"Headline, e.g. \"Elevated error rates\""},"body":{"type":"string","description":"Update text (plain text)"},"status":{"type":"string","description":"investigating, identified, monitoring or resolved","enum":["investigating","identified","monitoring","resolved"],"default":"investigating"},"posted_at":{"type":"string","format":"date-time","description":"When it happened (defaults to now)"},"notify":{"type":"boolean","description":"Email confirmed subscribers","default":true}},"required":["title"]}}}}},"get":{"operationId":"status_page_posts_list","summary":"List posts on a status page","tags":["Status pages"],"parameters":[{"name":"status_page_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","description":"Only posts with this status","enum":["investigating","identified","monitoring","resolved"]}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Post id (spp_…)"},"title":{"type":"string"},"body":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","description":"investigating, identified, monitoring or resolved"},"posted_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"status_page_posts_list","x-permission":"analytics.read"}},"/status_pages/{status_page_id}/posts/{id}.json":{"delete":{"operationId":"status_page_posts_delete","summary":"Delete a status page post","tags":["Status pages"],"parameters":[{"name":"status_page_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Post id (spp_…)"},"title":{"type":"string"},"body":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","description":"investigating, identified, monitoring or resolved"},"posted_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"status_page_posts_delete","x-permission":"uptime.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}},"patch":{"operationId":"status_page_posts_update","summary":"Edit a status page post","tags":["Status pages"],"parameters":[{"name":"status_page_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Post id (spp_…)"},"title":{"type":"string"},"body":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","description":"investigating, identified, monitoring or resolved"},"posted_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"status_page_posts_update","x-permission":"uptime.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","description":"Headline"},"body":{"type":"string","description":"Update text (plain text)"},"status":{"type":"string","description":"investigating, identified, monitoring or resolved","enum":["investigating","identified","monitoring","resolved"]},"notify":{"type":"boolean","description":"Email confirmed subscribers if the status changes","default":true}}}}}}}},"/status_pages/{status_page_id}/subscribers/{id}.json":{"delete":{"operationId":"status_page_subscribers_delete","summary":"Remove a subscriber","tags":["Status pages"],"parameters":[{"name":"status_page_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"email":{"type":"string"},"confirmed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"status_page_subscribers_delete","x-permission":"uptime.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/status_pages/{status_page_id}/subscribers.json":{"get":{"operationId":"status_page_subscribers_list","summary":"List subscribers of a status page","tags":["Status pages"],"parameters":[{"name":"status_page_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"confirmed","in":"query","required":false,"schema":{"type":"boolean","description":"true: confirmed only, false: pending only"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"email":{"type":"string"},"confirmed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"status_page_subscribers_list","x-permission":"uptime.manage"}},"/workspaces/{workspace_id}/status_pages.json":{"post":{"operationId":"status_pages_create","summary":"Create a status page","tags":["Status pages"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Status page id (sp_…)"},"workspace_id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string","description":"Public URL: /status/<slug>"},"custom_domain":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"brand_color":{"anyOf":[{"type":"string"},{"type":"null"}]},"published":{"type":"boolean"},"check_ids":{"type":"array","items":{"type":"string"},"description":"Uptime check ids shown"},"subscribers":{"type":"integer","description":"Confirmed subscribers"},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"status_pages_create","x-permission":"uptime.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Page title, e.g. \"Acme status\""},"slug":{"type":"string","description":"Public URL slug: /status/<slug> (defaults from name)"},"description":{"type":"string","description":"Intro text under the title"},"logo_url":{"type":"string","description":"HTTPS URL of a logo image"},"brand_color":{"type":"string","description":"Accent color, e.g. #06755b"},"custom_domain":{"type":"string","description":"Custom domain (CNAME to our host), e.g. status.example.com. Empty to remove"},"check_ids":{"type":"array","items":{"type":"string"},"description":"Uptime check ids (upc_…) to show"},"published":{"type":"boolean","description":"Visible to the public","default":true}},"required":["name"]}}}}},"get":{"operationId":"status_pages_list","summary":"List status pages","tags":["Status pages"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"query","in":"query","required":false,"schema":{"type":"string","description":"Filter by name or slug"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Status page id (sp_…)"},"workspace_id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string","description":"Public URL: /status/<slug>"},"custom_domain":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"brand_color":{"anyOf":[{"type":"string"},{"type":"null"}]},"published":{"type":"boolean"},"check_ids":{"type":"array","items":{"type":"string"},"description":"Uptime check ids shown"},"subscribers":{"type":"integer","description":"Confirmed subscribers"},"created_at":{"type":"string","format":"date-time"}}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"status_pages_list","x-permission":"analytics.read"}},"/status_pages/{id}.json":{"delete":{"operationId":"status_pages_delete","summary":"Delete a status page","tags":["Status pages"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Status page id (sp_…)"},"workspace_id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string","description":"Public URL: /status/<slug>"},"custom_domain":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"brand_color":{"anyOf":[{"type":"string"},{"type":"null"}]},"published":{"type":"boolean"},"check_ids":{"type":"array","items":{"type":"string"},"description":"Uptime check ids shown"},"subscribers":{"type":"integer","description":"Confirmed subscribers"},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"status_pages_delete","x-permission":"uptime.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}},"get":{"operationId":"status_pages_get","summary":"Get a status page","tags":["Status pages"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Status page id (sp_…)"},"workspace_id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string","description":"Public URL: /status/<slug>"},"custom_domain":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"brand_color":{"anyOf":[{"type":"string"},{"type":"null"}]},"published":{"type":"boolean"},"check_ids":{"type":"array","items":{"type":"string"},"description":"Uptime check ids shown"},"subscribers":{"type":"integer","description":"Confirmed subscribers"},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"status_pages_get","x-permission":"analytics.read"},"patch":{"operationId":"status_pages_update","summary":"Change a status page","tags":["Status pages"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Status page id (sp_…)"},"workspace_id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string","description":"Public URL: /status/<slug>"},"custom_domain":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"brand_color":{"anyOf":[{"type":"string"},{"type":"null"}]},"published":{"type":"boolean"},"check_ids":{"type":"array","items":{"type":"string"},"description":"Uptime check ids shown"},"subscribers":{"type":"integer","description":"Confirmed subscribers"},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"status_pages_update","x-permission":"uptime.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Page title, e.g. \"Acme status\""},"slug":{"type":"string","description":"Public URL slug: /status/<slug> (defaults from name)"},"description":{"type":"string","description":"Intro text under the title"},"logo_url":{"type":"string","description":"HTTPS URL of a logo image"},"brand_color":{"type":"string","description":"Accent color, e.g. #06755b"},"custom_domain":{"type":"string","description":"Custom domain (CNAME to our host), e.g. status.example.com. Empty to remove"},"check_ids":{"type":"array","items":{"type":"string"},"description":"Uptime check ids (upc_…) to show"},"published":{"type":"boolean","description":"Visible to the public"}}}}}}}},"/sites/{site_id}/tracking/ingest_key.json":{"post":{"operationId":"tracking_ingest_key_rotate","summary":"Create or rotate the server ingest key (shown once)","tags":["Tracking"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"site_id":{"type":"string","description":"Site id"},"key":{"type":"string","description":"The ingest key. Shown once: store it now. Send it as a Bearer token to POST /api/events"},"prefix":{"type":"string","description":"Key prefix shown in settings"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"tracking_ingest_key_rotate","x-permission":"sites.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}},"delete":{"operationId":"tracking_ingest_key_revoke","summary":"Revoke the server ingest key","tags":["Tracking"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Site id used in the tracking snippet"},"workspace_id":{"type":"string"},"domain":{"type":"string"},"name":{"type":"string"},"extra_domains":{"type":"array","items":{"type":"string"}},"multi_domain_mode":{"type":"string"},"timezone":{"type":"string"},"currency":{"type":"string"},"week_start":{"type":"integer"},"labels":{"type":"array","items":{"type":"string"}},"honor_dnt":{"type":"boolean"},"honor_gpc":{"type":"boolean"},"pii_scrubber":{"type":"boolean"},"redaction_rules":{"type":"array"},"allowed_params":{"type":"array","items":{"type":"string"}},"path_masks":{"type":"array"},"retention_months":{"anyOf":[{"type":"integer"},{"type":"null"}]},"bot_filtering":{"type":"boolean"},"traffic_rule_modes":{"type":"object"},"vitals_sample_rate":{"type":"integer"},"conversion_denominator":{"type":"string"},"public_dashboard":{"type":"boolean"},"public_indexable":{"type":"boolean"},"ingest_key_prefix":{"anyOf":[{"type":"string","description":"Start of the server ingest key"},{"type":"null"}]},"verified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"first_event_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_event_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"snippet":{"type":"string","description":"HTML tracking snippet"},"favorite":{"type":"boolean","description":"Starred by you"},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"tracking_ingest_key_revoke","x-permission":"sites.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/sites/{site_id}/tracking/verify.json":{"post":{"operationId":"tracking_verify","summary":"Check the tracker is installed on the site (script tag, site id, CSP and referrer policy)","tags":["Tracking"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"tracking_verify","x-permission":"sites.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"Page to check (defaults to https://<domain>/)"}}}}}}}},"/sites/{site_id}/tracking/snippet.json":{"get":{"operationId":"tracking_snippet","summary":"Build the tracking snippet for chosen options","tags":["Tracking"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"modules","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"Optional modules: auto (outbound links, downloads, forms, 404s), engage (time and scroll), vitals (Web Vitals), clicks","default":["engage"]}},{"name":"manual","in":"query","required":false,"schema":{"type":"boolean","description":"Turn off the automatic pageview","default":false}},{"name":"spa","in":"query","required":false,"schema":{"type":"string","description":"Single-page app navigation tracking","enum":["auto","history","hash","off"],"default":"auto"}},{"name":"domains","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"Only track on these hostnames","default":[]}},{"name":"exclude","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"Path globs not to track, e.g. /admin/*","default":[]}},{"name":"query_params","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"Extra query parameters to keep, e.g. page","default":[]}},{"name":"mask","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"Client-side path masks, e.g. /u/*->/u/:id","default":[]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"tracking_snippet","x-permission":"analytics.read"}},"/sites/{site_id}/traffic_rules.json":{"post":{"operationId":"traffic_rules_create","summary":"Add a traffic rule","tags":["Traffic rules"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Rule id"},"list":{"type":"string","description":"hostnames, paths, referrers, countries, ip_ranges, user_agents or events"},"pattern":{"type":"string","description":"Pattern (* wildcards, CIDR for ip_ranges)"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"mode":{"type":"string","description":"block or allow (the mode of its list)"},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"traffic_rules_create","x-permission":"sites.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"list":{"type":"string","description":"hostnames, paths, referrers, countries, ip_ranges, user_agents or events","enum":["hostnames","paths","referrers","countries","ip_ranges","user_agents","events"]},"pattern":{"type":"string","description":"Value to match. * is a wildcard. ip_ranges take an IP or CIDR (v4/v6), countries an ISO code","examples":["/admin/*"]},"label":{"type":"string","description":"Optional note, e.g. \"Office\""}},"required":["list","pattern"]}}}}},"get":{"operationId":"traffic_rules_list","summary":"List traffic rules","tags":["Traffic rules"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"list","in":"query","required":false,"schema":{"type":"string","description":"Only rules in this list","enum":["hostnames","paths","referrers","countries","ip_ranges","user_agents","events"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Rule id"},"list":{"type":"string","description":"hostnames, paths, referrers, countries, ip_ranges, user_agents or events"},"pattern":{"type":"string","description":"Pattern (* wildcards, CIDR for ip_ranges)"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"mode":{"type":"string","description":"block or allow (the mode of its list)"},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"traffic_rules_list","x-permission":"analytics.read"}},"/sites/{site_id}/traffic_rules/{id}.json":{"delete":{"operationId":"traffic_rules_delete","summary":"Delete a traffic rule","tags":["Traffic rules"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Rule id"},"list":{"type":"string","description":"hostnames, paths, referrers, countries, ip_ranges, user_agents or events"},"pattern":{"type":"string","description":"Pattern (* wildcards, CIDR for ip_ranges)"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"mode":{"type":"string","description":"block or allow (the mode of its list)"},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"traffic_rules_delete","x-permission":"sites.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}},"patch":{"operationId":"traffic_rules_update","summary":"Change a traffic rule","tags":["Traffic rules"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Rule id"},"list":{"type":"string","description":"hostnames, paths, referrers, countries, ip_ranges, user_agents or events"},"pattern":{"type":"string","description":"Pattern (* wildcards, CIDR for ip_ranges)"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"mode":{"type":"string","description":"block or allow (the mode of its list)"},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"traffic_rules_update","x-permission":"sites.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"pattern":{"type":"string","description":"New pattern"},"label":{"type":"string","description":"New label"}}}}}}}},"/sites/{site_id}/traffic_rules/test.json":{"post":{"operationId":"traffic_rules_test","summary":"Test whether a hit would be counted with the site's current rules","tags":["Traffic rules"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"traffic_rules_test","x-permission":"analytics.read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"Page URL, e.g. https://example.com/a"},"referrer":{"type":"string","description":"Referrer URL or hostname"},"country":{"type":"string","description":"ISO country code, e.g. US"},"ip":{"type":"string","description":"IP address to test against ip_ranges (not stored)"},"user_agent":{"type":"string","description":"User-Agent string (reduced to browser and major version, like at ingest)"},"event":{"type":"string","description":"Custom event name"}}}}}}}},"/sites/{site_id}/uptime.json":{"post":{"operationId":"uptime_checks_create","summary":"Add an uptime check for a site","tags":["Uptime"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Check id (upc_…)"},"workspace_id":{"type":"string"},"site_id":{"anyOf":[{"type":"string","description":"Site the check belongs to"},{"type":"null"}]},"name":{"type":"string"},"kind":{"type":"string","description":"http, keyword, tcp or dns"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"host":{"anyOf":[{"type":"string"},{"type":"null"}]},"port":{"anyOf":[{"type":"integer"},{"type":"null"}]},"keyword":{"anyOf":[{"type":"string"},{"type":"null"}]},"expected_status":{"type":"integer"},"http_method":{"type":"string"},"interval_seconds":{"type":"integer"},"timeout_seconds":{"type":"integer"},"status":{"type":"string","description":"up, down, pending or paused"},"enabled":{"type":"boolean"},"public":{"type":"boolean","description":"May appear on status pages"},"last_checked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"next_check_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_response_ms":{"anyOf":[{"type":"integer"},{"type":"null"}]},"ssl_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"ssl_issuer":{"anyOf":[{"type":"string"},{"type":"null"}]},"domain_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"uptime_checks_create","x-permission":"uptime.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Display name (defaults to the target)"},"kind":{"type":"string","description":"http (status code), keyword (body contains), tcp (host:port) or dns (name resolves)","enum":["http","keyword","tcp","dns"],"default":"http"},"url":{"type":"string","description":"URL for http/keyword checks","examples":["https://example.com/health"]},"host":{"type":"string","description":"Hostname for tcp/dns checks"},"port":{"type":"integer","description":"TCP port for tcp checks"},"keyword":{"type":"string","description":"Text the response body must contain (keyword)"},"expected_status":{"type":"integer","description":"Expected HTTP status code","default":200},"http_method":{"type":"string","description":"HTTP method","enum":["GET","HEAD"],"default":"GET"},"interval_seconds":{"type":"integer","description":"Seconds between checks (plan minimum applies, default 300 or the minimum)"},"timeout_seconds":{"type":"integer","description":"Seconds before a probe times out (1-30)","default":20},"public":{"type":"boolean","description":"May appear on public status pages","default":false}}}}}}},"get":{"operationId":"uptime_checks_list","summary":"List a site's uptime checks","tags":["Uptime"],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","description":"Only checks in this state","enum":["up","down","pending","paused"]}},{"name":"query","in":"query","required":false,"schema":{"type":"string","description":"Filter by name or target"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Check id (upc_…)"},"workspace_id":{"type":"string"},"site_id":{"anyOf":[{"type":"string","description":"Site the check belongs to"},{"type":"null"}]},"name":{"type":"string"},"kind":{"type":"string","description":"http, keyword, tcp or dns"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"host":{"anyOf":[{"type":"string"},{"type":"null"}]},"port":{"anyOf":[{"type":"integer"},{"type":"null"}]},"keyword":{"anyOf":[{"type":"string"},{"type":"null"}]},"expected_status":{"type":"integer"},"http_method":{"type":"string"},"interval_seconds":{"type":"integer"},"timeout_seconds":{"type":"integer"},"status":{"type":"string","description":"up, down, pending or paused"},"enabled":{"type":"boolean"},"public":{"type":"boolean","description":"May appear on status pages"},"last_checked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"next_check_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_response_ms":{"anyOf":[{"type":"integer"},{"type":"null"}]},"ssl_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"ssl_issuer":{"anyOf":[{"type":"string"},{"type":"null"}]},"domain_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"uptime_checks_list","x-permission":"analytics.read"}},"/uptime/checks/{id}.json":{"delete":{"operationId":"uptime_checks_delete","summary":"Delete an uptime check and its history","tags":["Uptime"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Check id (upc_…)"},"workspace_id":{"type":"string"},"site_id":{"anyOf":[{"type":"string","description":"Site the check belongs to"},{"type":"null"}]},"name":{"type":"string"},"kind":{"type":"string","description":"http, keyword, tcp or dns"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"host":{"anyOf":[{"type":"string"},{"type":"null"}]},"port":{"anyOf":[{"type":"integer"},{"type":"null"}]},"keyword":{"anyOf":[{"type":"string"},{"type":"null"}]},"expected_status":{"type":"integer"},"http_method":{"type":"string"},"interval_seconds":{"type":"integer"},"timeout_seconds":{"type":"integer"},"status":{"type":"string","description":"up, down, pending or paused"},"enabled":{"type":"boolean"},"public":{"type":"boolean","description":"May appear on status pages"},"last_checked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"next_check_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_response_ms":{"anyOf":[{"type":"integer"},{"type":"null"}]},"ssl_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"ssl_issuer":{"anyOf":[{"type":"string"},{"type":"null"}]},"domain_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"uptime_checks_delete","x-permission":"uptime.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}},"get":{"operationId":"uptime_checks_get","summary":"Get an uptime check: uptime 24h/7d/30d, response times and incidents","tags":["Uptime"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"range","in":"query","required":false,"schema":{"type":"string","description":"Window for the response-time chart","enum":["24h","7d","30d"],"default":"24h"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"check":{"type":"object","properties":{"id":{"type":"string","description":"Check id (upc_…)"},"workspace_id":{"type":"string"},"site_id":{"anyOf":[{"type":"string","description":"Site the check belongs to"},{"type":"null"}]},"name":{"type":"string"},"kind":{"type":"string","description":"http, keyword, tcp or dns"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"host":{"anyOf":[{"type":"string"},{"type":"null"}]},"port":{"anyOf":[{"type":"integer"},{"type":"null"}]},"keyword":{"anyOf":[{"type":"string"},{"type":"null"}]},"expected_status":{"type":"integer"},"http_method":{"type":"string"},"interval_seconds":{"type":"integer"},"timeout_seconds":{"type":"integer"},"status":{"type":"string","description":"up, down, pending or paused"},"enabled":{"type":"boolean"},"public":{"type":"boolean","description":"May appear on status pages"},"last_checked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"next_check_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_response_ms":{"anyOf":[{"type":"integer"},{"type":"null"}]},"ssl_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"ssl_issuer":{"anyOf":[{"type":"string"},{"type":"null"}]},"domain_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}},"uptime":{"type":"object","description":"Uptime % for 24h, 7d and 30d"},"range":{"type":"string","description":"Window of response_times"},"response_times":{"type":"object","description":"Average response ms per bucket: {unit, labels, series: {location: [ms…]}}"},"incidents":{"type":"array","items":{"type":"object","properties":{"started_at":{"type":"string","format":"date-time"},"resolved_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"duration_seconds":{"type":"integer","description":"So far, if still open"},"cause":{"anyOf":[{"type":"string","description":"Most common error, e.g. timeout or status_503"},{"type":"null"}]},"failed_locations":{"type":"array","items":{"type":"string"}}}}}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"uptime_checks_get","x-permission":"analytics.read"},"patch":{"operationId":"uptime_checks_update","summary":"Change an uptime check","tags":["Uptime"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Check id (upc_…)"},"workspace_id":{"type":"string"},"site_id":{"anyOf":[{"type":"string","description":"Site the check belongs to"},{"type":"null"}]},"name":{"type":"string"},"kind":{"type":"string","description":"http, keyword, tcp or dns"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"host":{"anyOf":[{"type":"string"},{"type":"null"}]},"port":{"anyOf":[{"type":"integer"},{"type":"null"}]},"keyword":{"anyOf":[{"type":"string"},{"type":"null"}]},"expected_status":{"type":"integer"},"http_method":{"type":"string"},"interval_seconds":{"type":"integer"},"timeout_seconds":{"type":"integer"},"status":{"type":"string","description":"up, down, pending or paused"},"enabled":{"type":"boolean"},"public":{"type":"boolean","description":"May appear on status pages"},"last_checked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"next_check_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_response_ms":{"anyOf":[{"type":"integer"},{"type":"null"}]},"ssl_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"ssl_issuer":{"anyOf":[{"type":"string"},{"type":"null"}]},"domain_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"uptime_checks_update","x-permission":"uptime.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Display name (defaults to the target)"},"kind":{"type":"string","description":"http (status code), keyword (body contains), tcp (host:port) or dns (name resolves)","enum":["http","keyword","tcp","dns"]},"url":{"type":"string","description":"URL for http/keyword checks","examples":["https://example.com/health"]},"host":{"type":"string","description":"Hostname for tcp/dns checks"},"port":{"type":"integer","description":"TCP port for tcp checks"},"keyword":{"type":"string","description":"Text the response body must contain (keyword)"},"expected_status":{"type":"integer","description":"Expected HTTP status code"},"http_method":{"type":"string","description":"HTTP method","enum":["GET","HEAD"]},"interval_seconds":{"type":"integer","description":"Seconds between checks (plan minimum applies, default 300 or the minimum)"},"timeout_seconds":{"type":"integer","description":"Seconds before a probe times out (1-30)"},"public":{"type":"boolean","description":"May appear on public status pages"}}}}}}}},"/uptime/checks/{id}/pause.json":{"post":{"operationId":"uptime_checks_pause","summary":"Pause an uptime check","tags":["Uptime"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Check id (upc_…)"},"workspace_id":{"type":"string"},"site_id":{"anyOf":[{"type":"string","description":"Site the check belongs to"},{"type":"null"}]},"name":{"type":"string"},"kind":{"type":"string","description":"http, keyword, tcp or dns"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"host":{"anyOf":[{"type":"string"},{"type":"null"}]},"port":{"anyOf":[{"type":"integer"},{"type":"null"}]},"keyword":{"anyOf":[{"type":"string"},{"type":"null"}]},"expected_status":{"type":"integer"},"http_method":{"type":"string"},"interval_seconds":{"type":"integer"},"timeout_seconds":{"type":"integer"},"status":{"type":"string","description":"up, down, pending or paused"},"enabled":{"type":"boolean"},"public":{"type":"boolean","description":"May appear on status pages"},"last_checked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"next_check_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_response_ms":{"anyOf":[{"type":"integer"},{"type":"null"}]},"ssl_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"ssl_issuer":{"anyOf":[{"type":"string"},{"type":"null"}]},"domain_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"uptime_checks_pause","x-permission":"uptime.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/uptime/checks/{id}/resume.json":{"post":{"operationId":"uptime_checks_resume","summary":"Resume a paused uptime check","tags":["Uptime"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Check id (upc_…)"},"workspace_id":{"type":"string"},"site_id":{"anyOf":[{"type":"string","description":"Site the check belongs to"},{"type":"null"}]},"name":{"type":"string"},"kind":{"type":"string","description":"http, keyword, tcp or dns"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"host":{"anyOf":[{"type":"string"},{"type":"null"}]},"port":{"anyOf":[{"type":"integer"},{"type":"null"}]},"keyword":{"anyOf":[{"type":"string"},{"type":"null"}]},"expected_status":{"type":"integer"},"http_method":{"type":"string"},"interval_seconds":{"type":"integer"},"timeout_seconds":{"type":"integer"},"status":{"type":"string","description":"up, down, pending or paused"},"enabled":{"type":"boolean"},"public":{"type":"boolean","description":"May appear on status pages"},"last_checked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"next_check_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_response_ms":{"anyOf":[{"type":"integer"},{"type":"null"}]},"ssl_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"ssl_issuer":{"anyOf":[{"type":"string"},{"type":"null"}]},"domain_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"uptime_checks_resume","x-permission":"uptime.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/uptime/probes.json":{"get":{"operationId":"uptime_probes_list","summary":"Probe datacenter, User-Agent and egress IP ranges (for allowlisting our uptime probes)","tags":["Uptime"],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"uptime_probes_list","security":[]}},"/uptime/probes/results.json":{"post":{"operationId":"uptime_probes_results","summary":"Submit results from an external probe agent (Bearer uptime probe token)","tags":["Uptime"],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"uptime_probes_results","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"check_id":{"type":"string"},"location":{"type":"string"},"ok":{"type":"boolean"},"status_code":{"type":"integer"},"response_ms":{"type":"integer"},"error":{"type":"string"},"checked_at":{"type":"string","format":"date-time"}}},"description":"Probe results: [{check_id, location, ok, status_code, response_ms, error, checked_at}]"}},"required":["results"]}}}},"security":[]}},"/workspaces/{workspace_id}/uptime.json":{"post":{"operationId":"workspace_uptime_checks_create","summary":"Add a workspace uptime check (not tied to a site)","tags":["Uptime"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Check id (upc_…)"},"workspace_id":{"type":"string"},"site_id":{"anyOf":[{"type":"string","description":"Site the check belongs to"},{"type":"null"}]},"name":{"type":"string"},"kind":{"type":"string","description":"http, keyword, tcp or dns"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"host":{"anyOf":[{"type":"string"},{"type":"null"}]},"port":{"anyOf":[{"type":"integer"},{"type":"null"}]},"keyword":{"anyOf":[{"type":"string"},{"type":"null"}]},"expected_status":{"type":"integer"},"http_method":{"type":"string"},"interval_seconds":{"type":"integer"},"timeout_seconds":{"type":"integer"},"status":{"type":"string","description":"up, down, pending or paused"},"enabled":{"type":"boolean"},"public":{"type":"boolean","description":"May appear on status pages"},"last_checked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"next_check_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_response_ms":{"anyOf":[{"type":"integer"},{"type":"null"}]},"ssl_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"ssl_issuer":{"anyOf":[{"type":"string"},{"type":"null"}]},"domain_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"workspace_uptime_checks_create","x-permission":"uptime.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Display name (defaults to the target)"},"kind":{"type":"string","description":"http (status code), keyword (body contains), tcp (host:port) or dns (name resolves)","enum":["http","keyword","tcp","dns"],"default":"http"},"url":{"type":"string","description":"URL for http/keyword checks","examples":["https://example.com/health"]},"host":{"type":"string","description":"Hostname for tcp/dns checks"},"port":{"type":"integer","description":"TCP port for tcp checks"},"keyword":{"type":"string","description":"Text the response body must contain (keyword)"},"expected_status":{"type":"integer","description":"Expected HTTP status code","default":200},"http_method":{"type":"string","description":"HTTP method","enum":["GET","HEAD"],"default":"GET"},"interval_seconds":{"type":"integer","description":"Seconds between checks (plan minimum applies, default 300 or the minimum)"},"timeout_seconds":{"type":"integer","description":"Seconds before a probe times out (1-30)","default":20},"public":{"type":"boolean","description":"May appear on public status pages","default":false}}}}}}},"get":{"operationId":"workspace_uptime_checks_list","summary":"List all uptime checks in a workspace","tags":["Uptime"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","description":"Only checks in this state","enum":["up","down","pending","paused"]}},{"name":"query","in":"query","required":false,"schema":{"type":"string","description":"Filter by name or target"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Check id (upc_…)"},"workspace_id":{"type":"string"},"site_id":{"anyOf":[{"type":"string","description":"Site the check belongs to"},{"type":"null"}]},"name":{"type":"string"},"kind":{"type":"string","description":"http, keyword, tcp or dns"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"host":{"anyOf":[{"type":"string"},{"type":"null"}]},"port":{"anyOf":[{"type":"integer"},{"type":"null"}]},"keyword":{"anyOf":[{"type":"string"},{"type":"null"}]},"expected_status":{"type":"integer"},"http_method":{"type":"string"},"interval_seconds":{"type":"integer"},"timeout_seconds":{"type":"integer"},"status":{"type":"string","description":"up, down, pending or paused"},"enabled":{"type":"boolean"},"public":{"type":"boolean","description":"May appear on status pages"},"last_checked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"next_check_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_response_ms":{"anyOf":[{"type":"integer"},{"type":"null"}]},"ssl_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"ssl_issuer":{"anyOf":[{"type":"string"},{"type":"null"}]},"domain_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"workspace_uptime_checks_list","x-permission":"analytics.read"}},"/workspaces/{workspace_id}/warehouses.json":{"post":{"operationId":"warehouse_destinations_create","summary":"Add a warehouse destination","tags":["Warehouse sync"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Destination id, e.g. whd_7Q2K9XH3AB"},"kind":{"type":"string","description":"s3, bigquery, snowflake or azure"},"name":{"type":"string"},"target":{"type":"string","description":"Where data goes: s3://bucket/prefix, project.dataset.table, account/database.schema.table or the Azure container"},"configured":{"type":"array","items":{"type":"string"},"description":"Setting names that are filled in (values are never returned)"},"site_ids":{"type":"array","items":{"type":"string"},"description":"Sites sent (pa_…). Empty means all sites"},"schedule":{"type":"string","description":"daily: 02:00 UTC, sends the previous UTC day"},"schema_version":{"type":"string","description":"Row schema sent"},"last_run_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"next_run_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"warehouse_destinations_create","x-permission":"workspace.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Display name, e.g. Data lake"},"site_ids":{"type":"array","items":{"type":"string"},"description":"Sites to send (pa_…). Empty sends all sites"},"bucket":{"type":"string","description":"s3: bucket name"},"region":{"type":"string","description":"s3: region, e.g. us-east-1 (auto for R2)"},"prefix":{"type":"string","description":"s3/azure: path prefix, e.g. privatus/events"},"endpoint":{"type":"string","description":"s3: https endpoint for S3-compatible storage (GCS interoperability, R2, MinIO)"},"access_key_id":{"type":"string","description":"s3: access key id"},"secret_access_key":{"type":"string","description":"s3: secret access key (write-only)"},"service_account_json":{"type":"string","description":"bigquery: service account JSON key with BigQuery Data Editor (write-only)"},"project_id":{"type":"string","description":"bigquery: project id (default: from the key)"},"dataset":{"type":"string","description":"bigquery: dataset id"},"table":{"type":"string","description":"bigquery/snowflake: table name (columns: schema v1)"},"account":{"type":"string","description":"snowflake: account identifier, e.g. xy12345.us-east-1 or myorg-myaccount"},"user":{"type":"string","description":"snowflake: user with key-pair authentication"},"private_key":{"type":"string","description":"snowflake: PEM RSA private key (write-only)"},"database":{"type":"string","description":"snowflake: database"},"schema":{"type":"string","description":"snowflake: schema"},"warehouse":{"type":"string","description":"snowflake: virtual warehouse"},"role":{"type":"string","description":"snowflake: role (optional)"},"sas_url":{"type":"string","description":"azure: container SAS URL with create/write permission (write-only)"},"kind":{"type":"string","description":"s3 (also GCS/R2/MinIO), bigquery, snowflake or azure","enum":["s3","bigquery","snowflake","azure"]}},"required":["kind"]}}}}},"get":{"operationId":"warehouse_destinations_list","summary":"List warehouse destinations","tags":["Warehouse sync"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","description":"Only destinations of this kind","enum":["s3","bigquery","snowflake","azure"]}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Destination id, e.g. whd_7Q2K9XH3AB"},"kind":{"type":"string","description":"s3, bigquery, snowflake or azure"},"name":{"type":"string"},"target":{"type":"string","description":"Where data goes: s3://bucket/prefix, project.dataset.table, account/database.schema.table or the Azure container"},"configured":{"type":"array","items":{"type":"string"},"description":"Setting names that are filled in (values are never returned)"},"site_ids":{"type":"array","items":{"type":"string"},"description":"Sites sent (pa_…). Empty means all sites"},"schedule":{"type":"string","description":"daily: 02:00 UTC, sends the previous UTC day"},"schema_version":{"type":"string","description":"Row schema sent"},"last_run_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"next_run_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"warehouse_destinations_list","x-permission":"workspace.manage"}},"/warehouses/{id}.json":{"delete":{"operationId":"warehouse_destinations_delete","summary":"Delete a warehouse destination","tags":["Warehouse sync"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Destination id, e.g. whd_7Q2K9XH3AB"},"kind":{"type":"string","description":"s3, bigquery, snowflake or azure"},"name":{"type":"string"},"target":{"type":"string","description":"Where data goes: s3://bucket/prefix, project.dataset.table, account/database.schema.table or the Azure container"},"configured":{"type":"array","items":{"type":"string"},"description":"Setting names that are filled in (values are never returned)"},"site_ids":{"type":"array","items":{"type":"string"},"description":"Sites sent (pa_…). Empty means all sites"},"schedule":{"type":"string","description":"daily: 02:00 UTC, sends the previous UTC day"},"schema_version":{"type":"string","description":"Row schema sent"},"last_run_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"next_run_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"warehouse_destinations_delete","x-permission":"workspace.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}},"get":{"operationId":"warehouse_destinations_get","summary":"Get a warehouse destination (no secrets)","tags":["Warehouse sync"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Destination id, e.g. whd_7Q2K9XH3AB"},"kind":{"type":"string","description":"s3, bigquery, snowflake or azure"},"name":{"type":"string"},"target":{"type":"string","description":"Where data goes: s3://bucket/prefix, project.dataset.table, account/database.schema.table or the Azure container"},"configured":{"type":"array","items":{"type":"string"},"description":"Setting names that are filled in (values are never returned)"},"site_ids":{"type":"array","items":{"type":"string"},"description":"Sites sent (pa_…). Empty means all sites"},"schedule":{"type":"string","description":"daily: 02:00 UTC, sends the previous UTC day"},"schema_version":{"type":"string","description":"Row schema sent"},"last_run_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"next_run_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"warehouse_destinations_get","x-permission":"workspace.manage"},"patch":{"operationId":"warehouse_destinations_update","summary":"Update a warehouse destination (blank secrets are kept)","tags":["Warehouse sync"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Destination id, e.g. whd_7Q2K9XH3AB"},"kind":{"type":"string","description":"s3, bigquery, snowflake or azure"},"name":{"type":"string"},"target":{"type":"string","description":"Where data goes: s3://bucket/prefix, project.dataset.table, account/database.schema.table or the Azure container"},"configured":{"type":"array","items":{"type":"string"},"description":"Setting names that are filled in (values are never returned)"},"site_ids":{"type":"array","items":{"type":"string"},"description":"Sites sent (pa_…). Empty means all sites"},"schedule":{"type":"string","description":"daily: 02:00 UTC, sends the previous UTC day"},"schema_version":{"type":"string","description":"Row schema sent"},"last_run_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"next_run_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"warehouse_destinations_update","x-permission":"workspace.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Display name, e.g. Data lake"},"site_ids":{"type":"array","items":{"type":"string"},"description":"Sites to send (pa_…). Empty sends all sites"},"bucket":{"type":"string","description":"s3: bucket name"},"region":{"type":"string","description":"s3: region, e.g. us-east-1 (auto for R2)"},"prefix":{"type":"string","description":"s3/azure: path prefix, e.g. privatus/events"},"endpoint":{"type":"string","description":"s3: https endpoint for S3-compatible storage (GCS interoperability, R2, MinIO)"},"access_key_id":{"type":"string","description":"s3: access key id"},"secret_access_key":{"type":"string","description":"s3: secret access key (write-only)"},"service_account_json":{"type":"string","description":"bigquery: service account JSON key with BigQuery Data Editor (write-only)"},"project_id":{"type":"string","description":"bigquery: project id (default: from the key)"},"dataset":{"type":"string","description":"bigquery: dataset id"},"table":{"type":"string","description":"bigquery/snowflake: table name (columns: schema v1)"},"account":{"type":"string","description":"snowflake: account identifier, e.g. xy12345.us-east-1 or myorg-myaccount"},"user":{"type":"string","description":"snowflake: user with key-pair authentication"},"private_key":{"type":"string","description":"snowflake: PEM RSA private key (write-only)"},"database":{"type":"string","description":"snowflake: database"},"schema":{"type":"string","description":"snowflake: schema"},"warehouse":{"type":"string","description":"snowflake: virtual warehouse"},"role":{"type":"string","description":"snowflake: role (optional)"},"sas_url":{"type":"string","description":"azure: container SAS URL with create/write permission (write-only)"}}}}}}}},"/warehouses/{id}/sync.json":{"post":{"operationId":"warehouse_destinations_sync","summary":"Queue a sync of one day now","tags":["Warehouse sync"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Destination id, e.g. whd_7Q2K9XH3AB"},"kind":{"type":"string","description":"s3, bigquery, snowflake or azure"},"name":{"type":"string"},"target":{"type":"string","description":"Where data goes: s3://bucket/prefix, project.dataset.table, account/database.schema.table or the Azure container"},"configured":{"type":"array","items":{"type":"string"},"description":"Setting names that are filled in (values are never returned)"},"site_ids":{"type":"array","items":{"type":"string"},"description":"Sites sent (pa_…). Empty means all sites"},"schedule":{"type":"string","description":"daily: 02:00 UTC, sends the previous UTC day"},"schema_version":{"type":"string","description":"Row schema sent"},"last_run_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"next_run_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"warehouse_destinations_sync","x-permission":"workspace.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"date":{"type":"string","format":"date","description":"UTC day to send, e.g. 2026-09-28 (default: yesterday)"}}}}}}}},"/workspaces/{workspace_id}/webhooks/{webhook_id}/deliveries.json":{"get":{"operationId":"webhook_deliveries_list","summary":"List deliveries for a webhook","tags":["Webhooks"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","description":"Only successful or failed deliveries","enum":["succeeded","failed"]}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Delivery id, e.g. whd_123"},"event":{"type":"string"},"status":{"type":"string","description":"pending, succeeded or failed"},"status_code":{"anyOf":[{"type":"integer","description":"HTTP status of the last attempt"},{"type":"null"}]},"error":{"anyOf":[{"type":"string","description":"Connection error of the last attempt"},{"type":"null"}]},"attempt":{"type":"integer"},"duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}]},"payload":{"type":"object"},"response_body":{"anyOf":[{"type":"string","description":"First 2,000 characters"},{"type":"null"}]},"delivered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"webhook_deliveries_list","x-permission":"workspace.manage"}},"/workspaces/{workspace_id}/webhooks/{webhook_id}/deliveries/{id}/redeliver.json":{"post":{"operationId":"webhook_deliveries_redeliver","summary":"Send a delivery again","tags":["Webhooks"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Delivery id, e.g. whd_123"},"event":{"type":"string"},"status":{"type":"string","description":"pending, succeeded or failed"},"status_code":{"anyOf":[{"type":"integer","description":"HTTP status of the last attempt"},{"type":"null"}]},"error":{"anyOf":[{"type":"string","description":"Connection error of the last attempt"},{"type":"null"}]},"attempt":{"type":"integer"},"duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}]},"payload":{"type":"object"},"response_body":{"anyOf":[{"type":"string","description":"First 2,000 characters"},{"type":"null"}]},"delivered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"webhook_deliveries_redeliver","x-permission":"workspace.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/workspaces/{workspace_id}/webhooks.json":{"post":{"operationId":"webhooks_create","summary":"Add a webhook endpoint","tags":["Webhooks"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Webhook id, e.g. wh_7Q2K9XH3AB"},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string"}},"enabled":{"type":"boolean"},"status":{"type":"string","description":"active, failing or disabled"},"secret":{"type":"string","description":"Signing secret for Privatus-Signature"},"consecutive_failures":{"type":"integer"},"last_success_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_failure_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"webhooks_create","x-permission":"workspace.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"HTTPS endpoint that receives POSTed JSON","examples":["https://example.com/hooks/privatus"]},"events":{"type":"array","items":{"type":"string","enum":["alert.triggered","alert.resolved","goal.completed_threshold","uptime.down","uptime.up","export.ready","import.completed","import.failed","site.created","site.deleted","member.added","usage.threshold"]},"description":"Events to send"},"enabled":{"type":"boolean","description":"Send deliveries","default":true}},"required":["url","events"]}}}}},"get":{"operationId":"webhooks_list","summary":"List webhooks","tags":["Webhooks"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Webhook id, e.g. wh_7Q2K9XH3AB"},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string"}},"enabled":{"type":"boolean"},"status":{"type":"string","description":"active, failing or disabled"},"secret":{"type":"string","description":"Signing secret for Privatus-Signature"},"consecutive_failures":{"type":"integer"},"last_success_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_failure_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"webhooks_list","x-permission":"workspace.manage"}},"/workspaces/{workspace_id}/webhooks/{id}.json":{"delete":{"operationId":"webhooks_delete","summary":"Delete a webhook","tags":["Webhooks"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Webhook id, e.g. wh_7Q2K9XH3AB"},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string"}},"enabled":{"type":"boolean"},"status":{"type":"string","description":"active, failing or disabled"},"secret":{"type":"string","description":"Signing secret for Privatus-Signature"},"consecutive_failures":{"type":"integer"},"last_success_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_failure_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"webhooks_delete","x-permission":"workspace.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}},"get":{"operationId":"webhooks_get","summary":"Get a webhook","tags":["Webhooks"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Webhook id, e.g. wh_7Q2K9XH3AB"},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string"}},"enabled":{"type":"boolean"},"status":{"type":"string","description":"active, failing or disabled"},"secret":{"type":"string","description":"Signing secret for Privatus-Signature"},"consecutive_failures":{"type":"integer"},"last_success_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_failure_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"webhooks_get","x-permission":"workspace.manage"},"patch":{"operationId":"webhooks_update","summary":"Update a webhook (events, URL, enabled, rotate secret)","tags":["Webhooks"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Webhook id, e.g. wh_7Q2K9XH3AB"},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string"}},"enabled":{"type":"boolean"},"status":{"type":"string","description":"active, failing or disabled"},"secret":{"type":"string","description":"Signing secret for Privatus-Signature"},"consecutive_failures":{"type":"integer"},"last_success_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_failure_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"webhooks_update","x-permission":"workspace.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"HTTPS endpoint"},"events":{"type":"array","items":{"type":"string","enum":["alert.triggered","alert.resolved","goal.completed_threshold","uptime.down","uptime.up","export.ready","import.completed","import.failed","site.created","site.deleted","member.added","usage.threshold"]},"description":"Events to send"},"enabled":{"type":"boolean","description":"Send deliveries"},"rotate_secret":{"type":"boolean","description":"Replace the signing secret","default":false}}}}}}}},"/workspaces/{workspace_id}/webhooks/{id}/test.json":{"post":{"operationId":"webhooks_test","summary":"Send a test delivery","tags":["Webhooks"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Delivery id, e.g. whd_123"},"event":{"type":"string"},"status":{"type":"string","description":"pending, succeeded or failed"},"status_code":{"anyOf":[{"type":"integer","description":"HTTP status of the last attempt"},{"type":"null"}]},"error":{"anyOf":[{"type":"string","description":"Connection error of the last attempt"},{"type":"null"}]},"attempt":{"type":"integer"},"duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}]},"payload":{"type":"object"},"response_body":{"anyOf":[{"type":"string","description":"First 2,000 characters"},{"type":"null"}]},"delivered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"webhooks_test","x-permission":"workspace.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/changelog.json":{"get":{"operationId":"changelog_list","summary":"List changelog entries","description":"Published product updates, newest first. Also available as RSS at /changelog.rss.","tags":["Website"],"parameters":[{"name":"area","in":"query","required":false,"schema":{"type":"string","description":"Only entries for this product area","enum":["product","dashboard","tracker","privacy","api","integrations","billing","docs"]}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Entry id, e.g. chg_7Q2K9XH3AB"},"title":{"type":"string","description":"Headline"},"area":{"type":"string","description":"Product area, e.g. dashboard, tracker, api"},"body":{"type":"string","description":"Markdown body"},"published_at":{"type":"string","format":"date-time","description":"Publication time"},"url":{"type":"string","description":"Permanent link"}}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"changelog_list","security":[]}},"/changelog/{id}.json":{"get":{"operationId":"changelog_get","summary":"Get a changelog entry","tags":["Website"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Entry id, e.g. chg_7Q2K9XH3AB"},"title":{"type":"string","description":"Headline"},"area":{"type":"string","description":"Product area, e.g. dashboard, tracker, api"},"body":{"type":"string","description":"Markdown body"},"published_at":{"type":"string","format":"date-time","description":"Publication time"},"url":{"type":"string","description":"Permanent link"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"changelog_get","security":[]}},"/contact.json":{"post":{"operationId":"contact_create","summary":"Send a message to the Privatus Analytics team","description":"Browser clients send a Cloudflare Turnstile token as `cf-turnstile-response`. Requests with an API token need none.","tags":["Website"],"parameters":[],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"received":{"type":"boolean","description":"Always true when the submission was accepted"},"message":{"type":"string","description":"What happens next"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"contact_create","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Your name","examples":["Ada Lovelace"]},"email":{"type":"string","description":"Where we should reply","examples":["ada@example.com"]},"company":{"type":"string","description":"Company or organization (optional)"},"topic":{"type":"string","description":"What the message is about","enum":["general","sales","support","privacy","security","partnerships","press"],"default":"general"},"message":{"type":"string","description":"Your message (10 to 5,000 characters)"},"website":{"type":"string","description":"Leave empty. Spam trap for bots. Filled-in submissions are discarded"}},"required":["name","email","message"]}}}},"security":[]}},"/newsletter/confirm.json":{"post":{"operationId":"newsletter_confirm","summary":"Confirm a newsletter subscription (signed token)","tags":["Website"],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"received":{"type":"boolean","description":"Always true when the submission was accepted"},"message":{"type":"string","description":"What happens next"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"newsletter_confirm","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","description":"Signed token from the confirmation email"}},"required":["token"]}}}},"security":[]}},"/newsletter.json":{"post":{"operationId":"newsletter_subscribe","summary":"Subscribe an email to the newsletter","description":"Browser clients send a Cloudflare Turnstile token as `cf-turnstile-response`. Requests with an API token need none.","tags":["Website"],"parameters":[],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"received":{"type":"boolean","description":"Always true when the submission was accepted"},"message":{"type":"string","description":"What happens next"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"newsletter_subscribe","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"Email address to subscribe. A confirmation link is emailed to it","examples":["reader@example.com"]},"website":{"type":"string","description":"Leave empty. Spam trap for bots. Filled-in submissions are discarded"}},"required":["email"]}}}},"security":[]}},"/newsletter/unsubscribe.json":{"post":{"operationId":"newsletter_unsubscribe","summary":"Unsubscribe with a signed link token","tags":["Website"],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"received":{"type":"boolean","description":"Always true when the submission was accepted"},"message":{"type":"string","description":"What happens next"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"newsletter_unsubscribe","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","description":"Signed token from the unsubscribe link"},"list":{"type":"string","description":"newsletter (default: the list the link was for) or marketing (all marketing email)","enum":["newsletter","marketing"]}},"required":["token"]}}}},"security":[]}},"/pricing.json":{"get":{"operationId":"pricing_get","summary":"Get plans, prices and plan limits","description":"The same data as the pricing page: the events ladder, every plan limit and what counts as an event. Pass events to get the matching tier.","tags":["Website"],"parameters":[{"name":"events","in":"query","required":false,"schema":{"type":"integer","description":"Expected pageviews plus custom events a month. Returns the matching tier as `recommendation`","examples":[750000]}},{"name":"interval","in":"query","required":false,"schema":{"type":"string","description":"Billing interval for the prices shown: month, or year (10x the monthly price)","enum":["month","year"],"default":"month"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"currency":{"type":"string","description":"Currency of every price (USD)"},"tax_included":{"type":"boolean","description":"Always true. Prices include VAT or sales tax, so the price shown is the price paid"},"interval":{"type":"string","description":"month or year. Prices are for this interval"},"annual_multiplier":{"type":"integer","description":"Yearly price = monthly price x this (two months free)"},"free_events":{"type":"integer","description":"Events a month included in the Free plan"},"badge_bonus":{"type":"integer","description":"Extra free events a month when the optional badge is shown"},"tiers":{"type":"array","items":{"type":"object"},"description":"Events ladder: { events, pro, business } prices for the interval (pro is null where only Business is offered), plus the monthly prices"},"plans":{"type":"array","items":{"type":"object"},"description":"Plans with { id, name, from_price, limits }. Limits of null mean unlimited"},"counted":{"type":"array","items":{"type":"string"},"description":"What counts as a billable event"},"not_counted":{"type":"array","items":{"type":"string"},"description":"What never counts toward usage"},"recommendation":{"anyOf":[{"type":"object","description":"{ events, plan, tier_events, price } for the `events` input, or null when no volume was given"},{"type":"null"}]}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"pricing_get","security":[]}},"/status.json":{"get":{"operationId":"status_get","summary":"Get the current system status","description":"Database, Redis and background-job health, checked at most every 15 seconds.","tags":["Website"],"parameters":[{"name":"fresh","in":"query","required":false,"schema":{"type":"boolean","description":"Skip the 15-second cache and check again now","default":false}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","description":"Overall: operational, degraded or outage"},"checked_at":{"type":"string","format":"date-time","description":"When the checks ran (cached up to 15 s)"},"components":{"type":"array","items":{"type":"object"},"description":"Per component: { id, name, status, detail, latency_ms }, plus queue_latency_s and queue_depth for queues"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"status_get","security":[]}},"/tools/consent-gap.json":{"get":{"operationId":"tools_consent_gap","summary":"Estimate traffic missed by consent-based analytics","tags":["Website"],"parameters":[{"name":"monthly_visitors","in":"query","required":false,"schema":{"type":"integer","description":"Visitors a month (from your server logs or current analytics)","examples":[50000]}},{"name":"consent_rate","in":"query","required":false,"schema":{"type":"number","description":"Percent of visitors who accept analytics cookies in your banner (0-100)","examples":[55]}},{"name":"adblock_share","in":"query","required":false,"schema":{"type":"number","description":"Percent of visitors whose blockers stop analytics scripts (0-100)","default":25.0}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"monthly_visitors":{"type":"integer","description":"Input: visitors a month"},"consent_rate":{"type":"number","description":"Input: percent who accept analytics cookies"},"adblock_share":{"type":"number","description":"Input: percent whose blockers stop scripts"},"measured_with_consent":{"type":"integer","description":"Visitors a consent-based tool can measure"},"missed":{"type":"integer","description":"Visitors it misses"},"missed_percent":{"type":"number","description":"Share of visitors missed, in percent"},"measured_cookieless":{"type":"integer","description":"Visitors a cookieless tool without a banner can measure, if it is blocked at the same rate"},"recovered_by_cookieless":{"type":"integer","description":"Difference between the cookieless and consent-based estimates"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"tools_consent_gap","security":[]}},"/tools/header-checker.json":{"get":{"operationId":"tools_header_check","summary":"Check a page’s Referrer-Policy and CSP for analytics","tags":["Website"],"parameters":[{"name":"url","in":"query","required":false,"schema":{"type":"string","description":"Public page to check (http or https)","examples":["https://example.com"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"url":{"type":"string","description":"Final URL after redirects"},"status":{"type":"integer","description":"HTTP status of the final response"},"findings":{"type":"array","items":{"type":"object"},"description":"Checks: { check, value, level (ok, warn, info), note }"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"tools_header_check","security":[]}},"/tools/privacy-policy-generator.json":{"get":{"operationId":"tools_privacy_policy","summary":"Draft a privacy-policy paragraph for Privatus Analytics","tags":["Website"],"parameters":[{"name":"site_name","in":"query","required":false,"schema":{"type":"string","description":"Your website or company name","examples":["Example Books"]}},{"name":"contact_email","in":"query","required":false,"schema":{"type":"string","description":"Privacy contact to mention (optional)"}},{"name":"honors_gpc","in":"query","required":false,"schema":{"type":"boolean","description":"Whether Do Not Track and Global Privacy Control are honored (the default)","default":true}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"site_name":{"type":"string","description":"Input: site or company name"},"paragraphs":{"type":"array","items":{"type":"string"},"description":"The policy text, one paragraph per item"},"text":{"type":"string","description":"The paragraphs joined with blank lines"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"tools_privacy_policy","security":[]}},"/tools/qr-code.json":{"get":{"operationId":"tools_qr_code","summary":"Generate a QR code as SVG","tags":["Website"],"parameters":[{"name":"text","in":"query","required":false,"schema":{"type":"string","description":"URL or text to encode (up to 1,000 characters)","examples":["https://example.com/?utm_source=poster"]}},{"name":"level","in":"query","required":false,"schema":{"type":"string","description":"Error correction: l (7%), m (15%), q (25%), h (30%)","enum":["l","m","q","h"],"default":"m"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"text":{"type":"string","description":"The encoded text"},"level":{"type":"string","description":"Error correction level"},"size":{"type":"integer","description":"Modules per side"},"svg":{"type":"string","description":"Standalone SVG document"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"tools_qr_code","security":[]}},"/tools/tracker-scanner.json":{"get":{"operationId":"tools_tracker_scan","summary":"List cookies and known trackers on a page","tags":["Website"],"parameters":[{"name":"url","in":"query","required":false,"schema":{"type":"string","description":"Public page to scan (http or https)","examples":["https://example.com"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"url":{"type":"string","description":"Final URL after redirects"},"status":{"type":"integer","description":"HTTP status of the final response"},"truncated":{"type":"boolean","description":"True when the page was over 1 MB and only the first 1 MB was scanned"},"cookies":{"type":"array","items":{"type":"object"},"description":"Cookies set by the HTTP response: { name, domain, path, expires, secure, http_only, same_site }. Values are never returned"},"trackers":{"type":"array","items":{"type":"object"},"description":"Known tools referenced by the page: { name, category, match, evidence }"},"third_party_hosts":{"type":"array","items":{"type":"string"},"description":"Other domains the page loads resources from"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"tools_tracker_scan","security":[]}},"/tools/utm-builder.json":{"get":{"operationId":"tools_utm_builder","summary":"Build a campaign URL with UTM parameters","tags":["Website"],"parameters":[{"name":"url","in":"query","required":false,"schema":{"type":"string","description":"Landing page URL","examples":["https://example.com/pricing"]}},{"name":"source","in":"query","required":false,"schema":{"type":"string","description":"utm_source: where the traffic comes from","examples":["newsletter"]}},{"name":"medium","in":"query","required":false,"schema":{"type":"string","description":"utm_medium: the channel, e.g. email, cpc, social","examples":["email"]}},{"name":"campaign","in":"query","required":false,"schema":{"type":"string","description":"utm_campaign: the campaign name","examples":["fall_launch"]}},{"name":"term","in":"query","required":false,"schema":{"type":"string","description":"utm_term: paid search keyword (optional)"}},{"name":"content","in":"query","required":false,"schema":{"type":"string","description":"utm_content: which link or creative (optional)"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"url":{"type":"string","description":"The landing page URL with UTM parameters"},"params":{"type":"object","description":"The UTM parameters that were added"},"warnings":{"type":"array","items":{"type":"string"},"description":"Problems worth fixing (case, spaces, personal data)"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"tools_utm_builder","security":[]}},"/waitlist.json":{"post":{"operationId":"waitlist_join","summary":"Join a waitlist (EU hosting)","description":"Browser clients send a Cloudflare Turnstile token as `cf-turnstile-response`. Requests with an API token need none.","tags":["Website"],"parameters":[],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"received":{"type":"boolean","description":"Always true when the submission was accepted"},"message":{"type":"string","description":"What happens next"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"waitlist_join","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"Email to notify","examples":["dpo@example.eu"]},"list":{"type":"string","description":"Which waitlist to join","enum":["eu_hosting"],"default":"eu_hosting"},"website":{"type":"string","description":"Leave empty. Spam trap for bots. Filled-in submissions are discarded"}},"required":["email"]}}}},"security":[]}},"/workspaces/{workspace_id}/white_label.json":{"get":{"operationId":"white_label_get","summary":"Get the white label brand","tags":["Workspaces"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"workspace_id":{"type":"string"},"brand_name":{"anyOf":[{"type":"string","description":"Name shown instead of Privatus Analytics"},{"type":"null"}]},"brand_logo_url":{"anyOf":[{"type":"string","description":"Logo image URL"},{"type":"null"}]},"brand_color":{"anyOf":[{"type":"string","description":"Accent color"},{"type":"null"}]},"hide_branding":{"type":"boolean","description":"Privatus Analytics branding is hidden"},"available":{"type":"boolean","description":"The plan includes white label"},"active":{"type":"boolean","description":"The brand is currently applied"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"white_label_get","x-permission":"workspace.manage"},"patch":{"operationId":"white_label_update","summary":"Set the white label brand for shared dashboards and email reports (Business)","tags":["Workspaces"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"workspace_id":{"type":"string"},"brand_name":{"anyOf":[{"type":"string","description":"Name shown instead of Privatus Analytics"},{"type":"null"}]},"brand_logo_url":{"anyOf":[{"type":"string","description":"Logo image URL"},{"type":"null"}]},"brand_color":{"anyOf":[{"type":"string","description":"Accent color"},{"type":"null"}]},"hide_branding":{"type":"boolean","description":"Privatus Analytics branding is hidden"},"available":{"type":"boolean","description":"The plan includes white label"},"active":{"type":"boolean","description":"The brand is currently applied"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"white_label_update","x-permission":"workspace.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"brand_name":{"type":"string","description":"Name shown instead of Privatus Analytics (blank removes it)"},"brand_logo_url":{"type":"string","description":"https URL of a logo image (blank removes it)"},"brand_color":{"type":"string","description":"Accent color, e.g. #06755b"},"hide_branding":{"type":"boolean","description":"Hide \"Privatus Analytics\" on shared dashboards and email reports"}}}}}}}},"/workspaces/{workspace_id}/security.json":{"get":{"operationId":"workspace_security_get","summary":"Get workspace security settings","tags":["Workspaces"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"workspace_id":{"type":"string"},"enforce_2fa":{"type":"boolean","description":"Members must set up 2FA"},"login_methods":{"type":"array","items":{"type":"string"},"description":"Allowed login methods"},"session_ttl_hours":{"anyOf":[{"type":"integer","description":"Session lifetime (null = none)"},{"type":"null"}]},"app_ip_allowlist":{"type":"array","items":{"type":"string"},"description":"Allowed IPs/CIDRs (empty = anywhere)"},"support_access_until":{"anyOf":[{"type":"string","format":"date-time","description":"Privatus Analytics support may view the workspace until"},{"type":"null"}]}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"workspace_security_get","x-permission":"workspace.manage"},"patch":{"operationId":"workspace_security_update","summary":"Update workspace security settings (2FA, login methods, session lifetime, IP allowlist, support access)","tags":["Workspaces"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"workspace_id":{"type":"string"},"enforce_2fa":{"type":"boolean","description":"Members must set up 2FA"},"login_methods":{"type":"array","items":{"type":"string"},"description":"Allowed login methods"},"session_ttl_hours":{"anyOf":[{"type":"integer","description":"Session lifetime (null = none)"},{"type":"null"}]},"app_ip_allowlist":{"type":"array","items":{"type":"string"},"description":"Allowed IPs/CIDRs (empty = anywhere)"},"support_access_until":{"anyOf":[{"type":"string","format":"date-time","description":"Privatus Analytics support may view the workspace until"},{"type":"null"}]}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"workspace_security_update","x-permission":"workspace.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enforce_2fa":{"type":"boolean","description":"Require members to set up 2FA"},"login_methods":{"type":"array","items":{"type":"string","enum":["password","magic_link","passkey","google","github","sso"]},"description":"Allowed login methods"},"session_ttl_hours":{"type":"integer","description":"Sign members out after this many hours (0 = no limit)"},"app_ip_allowlist":{"type":"array","items":{"type":"string"},"description":"Only allow app and API access from these IPs/CIDRs (Business). Empty = anywhere"},"support_access":{"type":"boolean","description":"Let Privatus Analytics support view the workspace for 7 days"}}}}}}}},"/workspaces.json":{"post":{"operationId":"workspaces_create","summary":"Create a workspace (you become the owner)","tags":["Workspaces"],"parameters":[],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Workspace id, e.g. ws_7Q2K9XH3AB"},"name":{"type":"string"},"timezone":{"type":"string","description":"Default reporting timezone"},"currency":{"type":"string","description":"Default currency"},"plan":{"type":"string","description":"free, pro, business or enterprise"},"plan_events":{"type":"integer","description":"Events per month included in the plan"},"subscription_status":{"type":"string"},"role":{"type":"string","description":"Your role in this workspace"},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"workspaces_create","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Workspace name","examples":["Acme Inc"]},"timezone":{"type":"string","description":"Default reporting timezone (defaults to the user's)"},"currency":{"type":"string","description":"Default currency (ISO 4217)","default":"USD"},"how_heard":{"type":"string","description":"How you heard about us"}},"required":["name"]}}}}},"get":{"operationId":"workspaces_list","summary":"List your workspaces","tags":["Workspaces"],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Workspace id, e.g. ws_7Q2K9XH3AB"},"name":{"type":"string"},"timezone":{"type":"string","description":"Default reporting timezone"},"currency":{"type":"string","description":"Default currency"},"plan":{"type":"string","description":"free, pro, business or enterprise"},"plan_events":{"type":"integer","description":"Events per month included in the plan"},"subscription_status":{"type":"string"},"role":{"type":"string","description":"Your role in this workspace"},"created_at":{"type":"string","format":"date-time"}}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"workspaces_list"}},"/workspaces/{id}.json":{"delete":{"operationId":"workspaces_delete","summary":"Delete a workspace and all its sites (owner only, cancels any subscription)","tags":["Workspaces"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Workspace id, e.g. ws_7Q2K9XH3AB"},"name":{"type":"string"},"timezone":{"type":"string","description":"Default reporting timezone"},"currency":{"type":"string","description":"Default currency"},"plan":{"type":"string","description":"free, pro, business or enterprise"},"plan_events":{"type":"integer","description":"Events per month included in the plan"},"subscription_status":{"type":"string"},"role":{"type":"string","description":"Your role in this workspace"},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"workspaces_delete","x-permission":"workspace.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirm":{"type":"string","description":"Type the workspace name to confirm"}},"required":["confirm"]}}}}},"get":{"operationId":"workspaces_get","summary":"Get a workspace","tags":["Workspaces"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Workspace id, e.g. ws_7Q2K9XH3AB"},"name":{"type":"string"},"timezone":{"type":"string","description":"Default reporting timezone"},"currency":{"type":"string","description":"Default currency"},"plan":{"type":"string","description":"free, pro, business or enterprise"},"plan_events":{"type":"integer","description":"Events per month included in the plan"},"subscription_status":{"type":"string"},"role":{"type":"string","description":"Your role in this workspace"},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"workspaces_get"},"patch":{"operationId":"workspaces_update","summary":"Update workspace settings","tags":["Workspaces"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Workspace id, e.g. ws_7Q2K9XH3AB"},"name":{"type":"string"},"timezone":{"type":"string","description":"Default reporting timezone"},"currency":{"type":"string","description":"Default currency"},"plan":{"type":"string","description":"free, pro, business or enterprise"},"plan_events":{"type":"integer","description":"Events per month included in the plan"},"subscription_status":{"type":"string"},"role":{"type":"string","description":"Your role in this workspace"},"created_at":{"type":"string","format":"date-time"}}},"meta":{"type":"object"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"workspaces_update","x-permission":"workspace.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Workspace name"},"timezone":{"type":"string","description":"Default reporting timezone"},"currency":{"type":"string","description":"Default currency (ISO 4217)"}}}}}}}}},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object"}}}}}}}}