{"openapi":"3.0.3","info":{"title":"Flowsery Analytics Public API","version":"1.0.0","description":"REST API for reading Flowsery web analytics and writing conversion events. Read traffic, revenue and engagement for any date range, break it down by page, referrer, channel, campaign, country, device, browser or OS, pull a single visitor's full activity timeline, and record goals and payments from your own backend. Authenticate with `Authorization: Bearer <api-key>`. A website API key is scoped to one website; a workspace token spans every website in the account, in which case pass `websiteId` or `domain` to pick one. All monetary values are in the website currency, as major units. All timestamps are ISO 8601 UTC. Every response carries the RFC 9331 rate-limit fields so a client can pace itself instead of discovering the limit through a 429: `RateLimit-Policy`, `RateLimit-Limit`, `RateLimit-Remaining` and `RateLimit-Reset`, the seconds until the window rolls over. A 429 adds `Retry-After` with the same number of seconds. Limits are counted per API key."},"servers":[{"url":"https://analytics.flowsery.com/analytics/api/v1"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"Reports","description":"Aggregated traffic and revenue metrics"},{"name":"Breakdowns","description":"Per-dimension visitor breakdowns"},{"name":"Issues","description":"Problems the AI found while analyzing session recordings"},{"name":"Visitors","description":"Individual visitor profiles and timelines"},{"name":"Events","description":"Server-side goal and payment tracking"},{"name":"Websites","description":"Websites reachable with this key"},{"name":"Workspaces","description":"Workspaces reachable with this key"}],"paths":{"/overview":{"get":{"operationId":"getOverview","summary":"Get headline metrics for a date range","description":"Visitors, sessions, bounce rate, average session duration, revenue and conversion rate for the window, as a single row.","tags":["Reports"],"parameters":[{"name":"websiteId","in":"query","required":false,"schema":{"type":"string"},"description":"Website to query. Optional when the API key is scoped to a single website; required for workspace tokens that span several."},{"name":"domain","in":"query","required":false,"schema":{"type":"string"},"description":"Alternative to `websiteId`: select the website by its domain."},{"name":"startAt","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Start of the reporting window (ISO 8601). Defaults to 30 days ago."},{"name":"endAt","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"End of the reporting window (ISO 8601). Defaults to now."},{"name":"timezone","in":"query","required":false,"schema":{"type":"string"},"description":"IANA timezone used to bucket the results, e.g. `Europe/Berlin`. Defaults to the website timezone."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":1000,"default":100},"description":"Maximum rows to return. Defaults to 100."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0},"description":"Rows to skip before returning results."},{"name":"filter_country","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `country` matches this value."},{"name":"filter_region","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `region` matches this value."},{"name":"filter_city","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `city` matches this value."},{"name":"filter_device","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `device` matches this value."},{"name":"filter_browser","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `browser` matches this value."},{"name":"filter_os","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `os` matches this value."},{"name":"filter_referrer","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `referrer` matches this value."},{"name":"filter_ref","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `ref` matches this value."},{"name":"filter_source","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `source` matches this value."},{"name":"filter_via","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `via` matches this value."},{"name":"filter_utm_source","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm source` matches this value."},{"name":"filter_utm_medium","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm medium` matches this value."},{"name":"filter_utm_campaign","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm campaign` matches this value."},{"name":"filter_utm_term","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm term` matches this value."},{"name":"filter_utm_content","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm content` matches this value."},{"name":"filter_page","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `page` matches this value."},{"name":"filter_hostname","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `hostname` matches this value."},{"name":"filter_entry_page","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `entry page` matches this value."},{"name":"filter_channel","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `channel` matches this value."},{"name":"filter_goal","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `goal` matches this value."},{"name":"X-Workspace-Id","in":"header","required":false,"schema":{"type":"string"},"description":"The workspace to act in, for OAuth sign-ins that reach several workspaces. Take the id from `GET /workspaces`. Without it the call lands in the default workspace. A workspace the caller cannot reach answers 403 with `code: workspace_access_denied`. An API key belongs to one workspace: send its own id or leave the header out"}],"responses":{"200":{"description":"Headline metrics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OverviewResponse"}}}},"401":{"description":"Missing, invalid, expired or revoked API key or access token. `code: token_issuer_lost_access` means the member who created the API key was deactivated or lost access to the workspace: ask a workspace admin for a new key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credentials are valid but cannot be used here. `code: permission_denied`: the workspace role behind the API key or OAuth sign-in lacks `flowsery.write`; `role`, `keyRole` and `issuerRole` say which role fell short. `code: subscription_required`: the organization plan does not include API access. `code: workspace_access_denied`: `X-Workspace-Id` names a workspace the caller cannot reach, or an API key was sent to a workspace other than its own","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Website not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/timeseries":{"get":{"operationId":"getTimeseries","summary":"Get metrics bucketed over time","description":"The same metrics as /overview, bucketed by hour, day, week or month, plus totals across the whole window.","tags":["Reports"],"parameters":[{"name":"websiteId","in":"query","required":false,"schema":{"type":"string"},"description":"Website to query. Optional when the API key is scoped to a single website; required for workspace tokens that span several."},{"name":"domain","in":"query","required":false,"schema":{"type":"string"},"description":"Alternative to `websiteId`: select the website by its domain."},{"name":"startAt","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Start of the reporting window (ISO 8601). Defaults to 30 days ago."},{"name":"endAt","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"End of the reporting window (ISO 8601). Defaults to now."},{"name":"timezone","in":"query","required":false,"schema":{"type":"string"},"description":"IANA timezone used to bucket the results, e.g. `Europe/Berlin`. Defaults to the website timezone."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":1000,"default":100},"description":"Maximum rows to return. Defaults to 100."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0},"description":"Rows to skip before returning results."},{"name":"filter_country","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `country` matches this value."},{"name":"filter_region","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `region` matches this value."},{"name":"filter_city","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `city` matches this value."},{"name":"filter_device","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `device` matches this value."},{"name":"filter_browser","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `browser` matches this value."},{"name":"filter_os","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `os` matches this value."},{"name":"filter_referrer","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `referrer` matches this value."},{"name":"filter_ref","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `ref` matches this value."},{"name":"filter_source","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `source` matches this value."},{"name":"filter_via","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `via` matches this value."},{"name":"filter_utm_source","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm source` matches this value."},{"name":"filter_utm_medium","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm medium` matches this value."},{"name":"filter_utm_campaign","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm campaign` matches this value."},{"name":"filter_utm_term","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm term` matches this value."},{"name":"filter_utm_content","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm content` matches this value."},{"name":"filter_page","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `page` matches this value."},{"name":"filter_hostname","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `hostname` matches this value."},{"name":"filter_entry_page","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `entry page` matches this value."},{"name":"filter_channel","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `channel` matches this value."},{"name":"filter_goal","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `goal` matches this value."},{"name":"interval","in":"query","required":false,"schema":{"type":"string","enum":["hour","day","week","month"],"default":"day"},"description":"Bucket size. Defaults to `day`."},{"name":"X-Workspace-Id","in":"header","required":false,"schema":{"type":"string"},"description":"The workspace to act in, for OAuth sign-ins that reach several workspaces. Take the id from `GET /workspaces`. Without it the call lands in the default workspace. A workspace the caller cannot reach answers 403 with `code: workspace_access_denied`. An API key belongs to one workspace: send its own id or leave the header out"}],"responses":{"200":{"description":"Time-bucketed metrics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimeseriesResponse"}}}},"401":{"description":"Missing, invalid, expired or revoked API key or access token. `code: token_issuer_lost_access` means the member who created the API key was deactivated or lost access to the workspace: ask a workspace admin for a new key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credentials are valid but cannot be used here. `code: permission_denied`: the workspace role behind the API key or OAuth sign-in lacks `flowsery.write`; `role`, `keyRole` and `issuerRole` say which role fell short. `code: subscription_required`: the organization plan does not include API access. `code: workspace_access_denied`: `X-Workspace-Id` names a workspace the caller cannot reach, or an API key was sent to a workspace other than its own","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Website not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/pages":{"get":{"operationId":"getPages","summary":"Break down visitors by page path","description":"Which pages visitors landed on, ordered by visitors.","tags":["Breakdowns"],"parameters":[{"name":"websiteId","in":"query","required":false,"schema":{"type":"string"},"description":"Website to query. Optional when the API key is scoped to a single website; required for workspace tokens that span several."},{"name":"domain","in":"query","required":false,"schema":{"type":"string"},"description":"Alternative to `websiteId`: select the website by its domain."},{"name":"startAt","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Start of the reporting window (ISO 8601). Defaults to 30 days ago."},{"name":"endAt","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"End of the reporting window (ISO 8601). Defaults to now."},{"name":"timezone","in":"query","required":false,"schema":{"type":"string"},"description":"IANA timezone used to bucket the results, e.g. `Europe/Berlin`. Defaults to the website timezone."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":1000,"default":100},"description":"Maximum rows to return. Defaults to 100."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0},"description":"Rows to skip before returning results."},{"name":"filter_country","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `country` matches this value."},{"name":"filter_region","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `region` matches this value."},{"name":"filter_city","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `city` matches this value."},{"name":"filter_device","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `device` matches this value."},{"name":"filter_browser","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `browser` matches this value."},{"name":"filter_os","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `os` matches this value."},{"name":"filter_referrer","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `referrer` matches this value."},{"name":"filter_ref","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `ref` matches this value."},{"name":"filter_source","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `source` matches this value."},{"name":"filter_via","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `via` matches this value."},{"name":"filter_utm_source","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm source` matches this value."},{"name":"filter_utm_medium","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm medium` matches this value."},{"name":"filter_utm_campaign","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm campaign` matches this value."},{"name":"filter_utm_term","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm term` matches this value."},{"name":"filter_utm_content","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm content` matches this value."},{"name":"filter_page","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `page` matches this value."},{"name":"filter_hostname","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `hostname` matches this value."},{"name":"filter_entry_page","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `entry page` matches this value."},{"name":"filter_channel","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `channel` matches this value."},{"name":"filter_goal","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `goal` matches this value."},{"name":"X-Workspace-Id","in":"header","required":false,"schema":{"type":"string"},"description":"The workspace to act in, for OAuth sign-ins that reach several workspaces. Take the id from `GET /workspaces`. Without it the call lands in the default workspace. A workspace the caller cannot reach answers 403 with `code: workspace_access_denied`. An API key belongs to one workspace: send its own id or leave the header out"}],"responses":{"200":{"description":"Breakdown rows ordered by visitors, descending.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownResponse"}}}},"401":{"description":"Missing, invalid, expired or revoked API key or access token. `code: token_issuer_lost_access` means the member who created the API key was deactivated or lost access to the workspace: ask a workspace admin for a new key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credentials are valid but cannot be used here. `code: permission_denied`: the workspace role behind the API key or OAuth sign-in lacks `flowsery.write`; `role`, `keyRole` and `issuerRole` say which role fell short. `code: subscription_required`: the organization plan does not include API access. `code: workspace_access_denied`: `X-Workspace-Id` names a workspace the caller cannot reach, or an API key was sent to a workspace other than its own","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Website not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/referrers":{"get":{"operationId":"getReferrers","summary":"Break down visitors by referrer","description":"Which sites sent the traffic, ordered by visitors.","tags":["Breakdowns"],"parameters":[{"name":"websiteId","in":"query","required":false,"schema":{"type":"string"},"description":"Website to query. Optional when the API key is scoped to a single website; required for workspace tokens that span several."},{"name":"domain","in":"query","required":false,"schema":{"type":"string"},"description":"Alternative to `websiteId`: select the website by its domain."},{"name":"startAt","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Start of the reporting window (ISO 8601). Defaults to 30 days ago."},{"name":"endAt","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"End of the reporting window (ISO 8601). Defaults to now."},{"name":"timezone","in":"query","required":false,"schema":{"type":"string"},"description":"IANA timezone used to bucket the results, e.g. `Europe/Berlin`. Defaults to the website timezone."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":1000,"default":100},"description":"Maximum rows to return. Defaults to 100."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0},"description":"Rows to skip before returning results."},{"name":"filter_country","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `country` matches this value."},{"name":"filter_region","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `region` matches this value."},{"name":"filter_city","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `city` matches this value."},{"name":"filter_device","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `device` matches this value."},{"name":"filter_browser","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `browser` matches this value."},{"name":"filter_os","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `os` matches this value."},{"name":"filter_referrer","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `referrer` matches this value."},{"name":"filter_ref","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `ref` matches this value."},{"name":"filter_source","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `source` matches this value."},{"name":"filter_via","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `via` matches this value."},{"name":"filter_utm_source","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm source` matches this value."},{"name":"filter_utm_medium","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm medium` matches this value."},{"name":"filter_utm_campaign","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm campaign` matches this value."},{"name":"filter_utm_term","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm term` matches this value."},{"name":"filter_utm_content","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm content` matches this value."},{"name":"filter_page","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `page` matches this value."},{"name":"filter_hostname","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `hostname` matches this value."},{"name":"filter_entry_page","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `entry page` matches this value."},{"name":"filter_channel","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `channel` matches this value."},{"name":"filter_goal","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `goal` matches this value."},{"name":"X-Workspace-Id","in":"header","required":false,"schema":{"type":"string"},"description":"The workspace to act in, for OAuth sign-ins that reach several workspaces. Take the id from `GET /workspaces`. Without it the call lands in the default workspace. A workspace the caller cannot reach answers 403 with `code: workspace_access_denied`. An API key belongs to one workspace: send its own id or leave the header out"}],"responses":{"200":{"description":"Breakdown rows ordered by visitors, descending.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownResponse"}}}},"401":{"description":"Missing, invalid, expired or revoked API key or access token. `code: token_issuer_lost_access` means the member who created the API key was deactivated or lost access to the workspace: ask a workspace admin for a new key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credentials are valid but cannot be used here. `code: permission_denied`: the workspace role behind the API key or OAuth sign-in lacks `flowsery.write`; `role`, `keyRole` and `issuerRole` say which role fell short. `code: subscription_required`: the organization plan does not include API access. `code: workspace_access_denied`: `X-Workspace-Id` names a workspace the caller cannot reach, or an API key was sent to a workspace other than its own","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Website not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/channels":{"get":{"operationId":"getChannels","summary":"Break down visitors by acquisition channel","description":"Organic search, paid, social, referral, direct and email, ordered by visitors.","tags":["Breakdowns"],"parameters":[{"name":"websiteId","in":"query","required":false,"schema":{"type":"string"},"description":"Website to query. Optional when the API key is scoped to a single website; required for workspace tokens that span several."},{"name":"domain","in":"query","required":false,"schema":{"type":"string"},"description":"Alternative to `websiteId`: select the website by its domain."},{"name":"startAt","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Start of the reporting window (ISO 8601). Defaults to 30 days ago."},{"name":"endAt","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"End of the reporting window (ISO 8601). Defaults to now."},{"name":"timezone","in":"query","required":false,"schema":{"type":"string"},"description":"IANA timezone used to bucket the results, e.g. `Europe/Berlin`. Defaults to the website timezone."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":1000,"default":100},"description":"Maximum rows to return. Defaults to 100."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0},"description":"Rows to skip before returning results."},{"name":"filter_country","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `country` matches this value."},{"name":"filter_region","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `region` matches this value."},{"name":"filter_city","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `city` matches this value."},{"name":"filter_device","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `device` matches this value."},{"name":"filter_browser","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `browser` matches this value."},{"name":"filter_os","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `os` matches this value."},{"name":"filter_referrer","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `referrer` matches this value."},{"name":"filter_ref","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `ref` matches this value."},{"name":"filter_source","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `source` matches this value."},{"name":"filter_via","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `via` matches this value."},{"name":"filter_utm_source","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm source` matches this value."},{"name":"filter_utm_medium","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm medium` matches this value."},{"name":"filter_utm_campaign","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm campaign` matches this value."},{"name":"filter_utm_term","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm term` matches this value."},{"name":"filter_utm_content","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm content` matches this value."},{"name":"filter_page","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `page` matches this value."},{"name":"filter_hostname","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `hostname` matches this value."},{"name":"filter_entry_page","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `entry page` matches this value."},{"name":"filter_channel","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `channel` matches this value."},{"name":"filter_goal","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `goal` matches this value."},{"name":"X-Workspace-Id","in":"header","required":false,"schema":{"type":"string"},"description":"The workspace to act in, for OAuth sign-ins that reach several workspaces. Take the id from `GET /workspaces`. Without it the call lands in the default workspace. A workspace the caller cannot reach answers 403 with `code: workspace_access_denied`. An API key belongs to one workspace: send its own id or leave the header out"}],"responses":{"200":{"description":"Breakdown rows ordered by visitors, descending.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownResponse"}}}},"401":{"description":"Missing, invalid, expired or revoked API key or access token. `code: token_issuer_lost_access` means the member who created the API key was deactivated or lost access to the workspace: ask a workspace admin for a new key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credentials are valid but cannot be used here. `code: permission_denied`: the workspace role behind the API key or OAuth sign-in lacks `flowsery.write`; `role`, `keyRole` and `issuerRole` say which role fell short. `code: subscription_required`: the organization plan does not include API access. `code: workspace_access_denied`: `X-Workspace-Id` names a workspace the caller cannot reach, or an API key was sent to a workspace other than its own","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Website not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/campaigns":{"get":{"operationId":"getCampaigns","summary":"Break down visitors by UTM campaign","description":"Which marketing campaigns drove the traffic, ordered by visitors.","tags":["Breakdowns"],"parameters":[{"name":"websiteId","in":"query","required":false,"schema":{"type":"string"},"description":"Website to query. Optional when the API key is scoped to a single website; required for workspace tokens that span several."},{"name":"domain","in":"query","required":false,"schema":{"type":"string"},"description":"Alternative to `websiteId`: select the website by its domain."},{"name":"startAt","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Start of the reporting window (ISO 8601). Defaults to 30 days ago."},{"name":"endAt","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"End of the reporting window (ISO 8601). Defaults to now."},{"name":"timezone","in":"query","required":false,"schema":{"type":"string"},"description":"IANA timezone used to bucket the results, e.g. `Europe/Berlin`. Defaults to the website timezone."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":1000,"default":100},"description":"Maximum rows to return. Defaults to 100."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0},"description":"Rows to skip before returning results."},{"name":"filter_country","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `country` matches this value."},{"name":"filter_region","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `region` matches this value."},{"name":"filter_city","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `city` matches this value."},{"name":"filter_device","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `device` matches this value."},{"name":"filter_browser","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `browser` matches this value."},{"name":"filter_os","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `os` matches this value."},{"name":"filter_referrer","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `referrer` matches this value."},{"name":"filter_ref","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `ref` matches this value."},{"name":"filter_source","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `source` matches this value."},{"name":"filter_via","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `via` matches this value."},{"name":"filter_utm_source","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm source` matches this value."},{"name":"filter_utm_medium","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm medium` matches this value."},{"name":"filter_utm_campaign","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm campaign` matches this value."},{"name":"filter_utm_term","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm term` matches this value."},{"name":"filter_utm_content","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm content` matches this value."},{"name":"filter_page","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `page` matches this value."},{"name":"filter_hostname","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `hostname` matches this value."},{"name":"filter_entry_page","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `entry page` matches this value."},{"name":"filter_channel","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `channel` matches this value."},{"name":"filter_goal","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `goal` matches this value."},{"name":"X-Workspace-Id","in":"header","required":false,"schema":{"type":"string"},"description":"The workspace to act in, for OAuth sign-ins that reach several workspaces. Take the id from `GET /workspaces`. Without it the call lands in the default workspace. A workspace the caller cannot reach answers 403 with `code: workspace_access_denied`. An API key belongs to one workspace: send its own id or leave the header out"}],"responses":{"200":{"description":"Breakdown rows ordered by visitors, descending.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownResponse"}}}},"401":{"description":"Missing, invalid, expired or revoked API key or access token. `code: token_issuer_lost_access` means the member who created the API key was deactivated or lost access to the workspace: ask a workspace admin for a new key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credentials are valid but cannot be used here. `code: permission_denied`: the workspace role behind the API key or OAuth sign-in lacks `flowsery.write`; `role`, `keyRole` and `issuerRole` say which role fell short. `code: subscription_required`: the organization plan does not include API access. `code: workspace_access_denied`: `X-Workspace-Id` names a workspace the caller cannot reach, or an API key was sent to a workspace other than its own","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Website not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/hostnames":{"get":{"operationId":"getHostnames","summary":"Break down visitors by hostname","description":"Useful when one website tracks several subdomains.","tags":["Breakdowns"],"parameters":[{"name":"websiteId","in":"query","required":false,"schema":{"type":"string"},"description":"Website to query. Optional when the API key is scoped to a single website; required for workspace tokens that span several."},{"name":"domain","in":"query","required":false,"schema":{"type":"string"},"description":"Alternative to `websiteId`: select the website by its domain."},{"name":"startAt","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Start of the reporting window (ISO 8601). Defaults to 30 days ago."},{"name":"endAt","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"End of the reporting window (ISO 8601). Defaults to now."},{"name":"timezone","in":"query","required":false,"schema":{"type":"string"},"description":"IANA timezone used to bucket the results, e.g. `Europe/Berlin`. Defaults to the website timezone."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":1000,"default":100},"description":"Maximum rows to return. Defaults to 100."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0},"description":"Rows to skip before returning results."},{"name":"filter_country","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `country` matches this value."},{"name":"filter_region","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `region` matches this value."},{"name":"filter_city","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `city` matches this value."},{"name":"filter_device","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `device` matches this value."},{"name":"filter_browser","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `browser` matches this value."},{"name":"filter_os","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `os` matches this value."},{"name":"filter_referrer","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `referrer` matches this value."},{"name":"filter_ref","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `ref` matches this value."},{"name":"filter_source","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `source` matches this value."},{"name":"filter_via","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `via` matches this value."},{"name":"filter_utm_source","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm source` matches this value."},{"name":"filter_utm_medium","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm medium` matches this value."},{"name":"filter_utm_campaign","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm campaign` matches this value."},{"name":"filter_utm_term","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm term` matches this value."},{"name":"filter_utm_content","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm content` matches this value."},{"name":"filter_page","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `page` matches this value."},{"name":"filter_hostname","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `hostname` matches this value."},{"name":"filter_entry_page","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `entry page` matches this value."},{"name":"filter_channel","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `channel` matches this value."},{"name":"filter_goal","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `goal` matches this value."},{"name":"X-Workspace-Id","in":"header","required":false,"schema":{"type":"string"},"description":"The workspace to act in, for OAuth sign-ins that reach several workspaces. Take the id from `GET /workspaces`. Without it the call lands in the default workspace. A workspace the caller cannot reach answers 403 with `code: workspace_access_denied`. An API key belongs to one workspace: send its own id or leave the header out"}],"responses":{"200":{"description":"Breakdown rows ordered by visitors, descending.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownResponse"}}}},"401":{"description":"Missing, invalid, expired or revoked API key or access token. `code: token_issuer_lost_access` means the member who created the API key was deactivated or lost access to the workspace: ask a workspace admin for a new key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credentials are valid but cannot be used here. `code: permission_denied`: the workspace role behind the API key or OAuth sign-in lacks `flowsery.write`; `role`, `keyRole` and `issuerRole` say which role fell short. `code: subscription_required`: the organization plan does not include API access. `code: workspace_access_denied`: `X-Workspace-Id` names a workspace the caller cannot reach, or an API key was sent to a workspace other than its own","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Website not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/countries":{"get":{"operationId":"getCountries","summary":"Break down visitors by country","description":"Each row carries an ISO 3166-1 alpha-2 `countryCode` alongside the country name.","tags":["Breakdowns"],"parameters":[{"name":"websiteId","in":"query","required":false,"schema":{"type":"string"},"description":"Website to query. Optional when the API key is scoped to a single website; required for workspace tokens that span several."},{"name":"domain","in":"query","required":false,"schema":{"type":"string"},"description":"Alternative to `websiteId`: select the website by its domain."},{"name":"startAt","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Start of the reporting window (ISO 8601). Defaults to 30 days ago."},{"name":"endAt","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"End of the reporting window (ISO 8601). Defaults to now."},{"name":"timezone","in":"query","required":false,"schema":{"type":"string"},"description":"IANA timezone used to bucket the results, e.g. `Europe/Berlin`. Defaults to the website timezone."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":1000,"default":100},"description":"Maximum rows to return. Defaults to 100."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0},"description":"Rows to skip before returning results."},{"name":"filter_country","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `country` matches this value."},{"name":"filter_region","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `region` matches this value."},{"name":"filter_city","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `city` matches this value."},{"name":"filter_device","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `device` matches this value."},{"name":"filter_browser","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `browser` matches this value."},{"name":"filter_os","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `os` matches this value."},{"name":"filter_referrer","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `referrer` matches this value."},{"name":"filter_ref","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `ref` matches this value."},{"name":"filter_source","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `source` matches this value."},{"name":"filter_via","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `via` matches this value."},{"name":"filter_utm_source","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm source` matches this value."},{"name":"filter_utm_medium","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm medium` matches this value."},{"name":"filter_utm_campaign","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm campaign` matches this value."},{"name":"filter_utm_term","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm term` matches this value."},{"name":"filter_utm_content","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm content` matches this value."},{"name":"filter_page","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `page` matches this value."},{"name":"filter_hostname","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `hostname` matches this value."},{"name":"filter_entry_page","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `entry page` matches this value."},{"name":"filter_channel","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `channel` matches this value."},{"name":"filter_goal","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `goal` matches this value."},{"name":"X-Workspace-Id","in":"header","required":false,"schema":{"type":"string"},"description":"The workspace to act in, for OAuth sign-ins that reach several workspaces. Take the id from `GET /workspaces`. Without it the call lands in the default workspace. A workspace the caller cannot reach answers 403 with `code: workspace_access_denied`. An API key belongs to one workspace: send its own id or leave the header out"}],"responses":{"200":{"description":"Breakdown rows ordered by visitors, descending.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownResponse"}}}},"401":{"description":"Missing, invalid, expired or revoked API key or access token. `code: token_issuer_lost_access` means the member who created the API key was deactivated or lost access to the workspace: ask a workspace admin for a new key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credentials are valid but cannot be used here. `code: permission_denied`: the workspace role behind the API key or OAuth sign-in lacks `flowsery.write`; `role`, `keyRole` and `issuerRole` say which role fell short. `code: subscription_required`: the organization plan does not include API access. `code: workspace_access_denied`: `X-Workspace-Id` names a workspace the caller cannot reach, or an API key was sent to a workspace other than its own","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Website not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/regions":{"get":{"operationId":"getRegions","summary":"Break down visitors by region","description":"Sub-national regions, ordered by visitors.","tags":["Breakdowns"],"parameters":[{"name":"websiteId","in":"query","required":false,"schema":{"type":"string"},"description":"Website to query. Optional when the API key is scoped to a single website; required for workspace tokens that span several."},{"name":"domain","in":"query","required":false,"schema":{"type":"string"},"description":"Alternative to `websiteId`: select the website by its domain."},{"name":"startAt","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Start of the reporting window (ISO 8601). Defaults to 30 days ago."},{"name":"endAt","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"End of the reporting window (ISO 8601). Defaults to now."},{"name":"timezone","in":"query","required":false,"schema":{"type":"string"},"description":"IANA timezone used to bucket the results, e.g. `Europe/Berlin`. Defaults to the website timezone."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":1000,"default":100},"description":"Maximum rows to return. Defaults to 100."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0},"description":"Rows to skip before returning results."},{"name":"filter_country","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `country` matches this value."},{"name":"filter_region","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `region` matches this value."},{"name":"filter_city","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `city` matches this value."},{"name":"filter_device","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `device` matches this value."},{"name":"filter_browser","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `browser` matches this value."},{"name":"filter_os","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `os` matches this value."},{"name":"filter_referrer","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `referrer` matches this value."},{"name":"filter_ref","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `ref` matches this value."},{"name":"filter_source","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `source` matches this value."},{"name":"filter_via","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `via` matches this value."},{"name":"filter_utm_source","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm source` matches this value."},{"name":"filter_utm_medium","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm medium` matches this value."},{"name":"filter_utm_campaign","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm campaign` matches this value."},{"name":"filter_utm_term","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm term` matches this value."},{"name":"filter_utm_content","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm content` matches this value."},{"name":"filter_page","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `page` matches this value."},{"name":"filter_hostname","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `hostname` matches this value."},{"name":"filter_entry_page","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `entry page` matches this value."},{"name":"filter_channel","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `channel` matches this value."},{"name":"filter_goal","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `goal` matches this value."},{"name":"X-Workspace-Id","in":"header","required":false,"schema":{"type":"string"},"description":"The workspace to act in, for OAuth sign-ins that reach several workspaces. Take the id from `GET /workspaces`. Without it the call lands in the default workspace. A workspace the caller cannot reach answers 403 with `code: workspace_access_denied`. An API key belongs to one workspace: send its own id or leave the header out"}],"responses":{"200":{"description":"Breakdown rows ordered by visitors, descending.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownResponse"}}}},"401":{"description":"Missing, invalid, expired or revoked API key or access token. `code: token_issuer_lost_access` means the member who created the API key was deactivated or lost access to the workspace: ask a workspace admin for a new key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credentials are valid but cannot be used here. `code: permission_denied`: the workspace role behind the API key or OAuth sign-in lacks `flowsery.write`; `role`, `keyRole` and `issuerRole` say which role fell short. `code: subscription_required`: the organization plan does not include API access. `code: workspace_access_denied`: `X-Workspace-Id` names a workspace the caller cannot reach, or an API key was sent to a workspace other than its own","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Website not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/cities":{"get":{"operationId":"getCities","summary":"Break down visitors by city","description":"Cities, ordered by visitors.","tags":["Breakdowns"],"parameters":[{"name":"websiteId","in":"query","required":false,"schema":{"type":"string"},"description":"Website to query. Optional when the API key is scoped to a single website; required for workspace tokens that span several."},{"name":"domain","in":"query","required":false,"schema":{"type":"string"},"description":"Alternative to `websiteId`: select the website by its domain."},{"name":"startAt","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Start of the reporting window (ISO 8601). Defaults to 30 days ago."},{"name":"endAt","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"End of the reporting window (ISO 8601). Defaults to now."},{"name":"timezone","in":"query","required":false,"schema":{"type":"string"},"description":"IANA timezone used to bucket the results, e.g. `Europe/Berlin`. Defaults to the website timezone."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":1000,"default":100},"description":"Maximum rows to return. Defaults to 100."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0},"description":"Rows to skip before returning results."},{"name":"filter_country","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `country` matches this value."},{"name":"filter_region","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `region` matches this value."},{"name":"filter_city","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `city` matches this value."},{"name":"filter_device","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `device` matches this value."},{"name":"filter_browser","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `browser` matches this value."},{"name":"filter_os","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `os` matches this value."},{"name":"filter_referrer","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `referrer` matches this value."},{"name":"filter_ref","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `ref` matches this value."},{"name":"filter_source","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `source` matches this value."},{"name":"filter_via","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `via` matches this value."},{"name":"filter_utm_source","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm source` matches this value."},{"name":"filter_utm_medium","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm medium` matches this value."},{"name":"filter_utm_campaign","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm campaign` matches this value."},{"name":"filter_utm_term","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm term` matches this value."},{"name":"filter_utm_content","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm content` matches this value."},{"name":"filter_page","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `page` matches this value."},{"name":"filter_hostname","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `hostname` matches this value."},{"name":"filter_entry_page","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `entry page` matches this value."},{"name":"filter_channel","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `channel` matches this value."},{"name":"filter_goal","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `goal` matches this value."},{"name":"X-Workspace-Id","in":"header","required":false,"schema":{"type":"string"},"description":"The workspace to act in, for OAuth sign-ins that reach several workspaces. Take the id from `GET /workspaces`. Without it the call lands in the default workspace. A workspace the caller cannot reach answers 403 with `code: workspace_access_denied`. An API key belongs to one workspace: send its own id or leave the header out"}],"responses":{"200":{"description":"Breakdown rows ordered by visitors, descending.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownResponse"}}}},"401":{"description":"Missing, invalid, expired or revoked API key or access token. `code: token_issuer_lost_access` means the member who created the API key was deactivated or lost access to the workspace: ask a workspace admin for a new key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credentials are valid but cannot be used here. `code: permission_denied`: the workspace role behind the API key or OAuth sign-in lacks `flowsery.write`; `role`, `keyRole` and `issuerRole` say which role fell short. `code: subscription_required`: the organization plan does not include API access. `code: workspace_access_denied`: `X-Workspace-Id` names a workspace the caller cannot reach, or an API key was sent to a workspace other than its own","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Website not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/devices":{"get":{"operationId":"getDevices","summary":"Break down visitors by device type","description":"Desktop, mobile and tablet, ordered by visitors.","tags":["Breakdowns"],"parameters":[{"name":"websiteId","in":"query","required":false,"schema":{"type":"string"},"description":"Website to query. Optional when the API key is scoped to a single website; required for workspace tokens that span several."},{"name":"domain","in":"query","required":false,"schema":{"type":"string"},"description":"Alternative to `websiteId`: select the website by its domain."},{"name":"startAt","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Start of the reporting window (ISO 8601). Defaults to 30 days ago."},{"name":"endAt","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"End of the reporting window (ISO 8601). Defaults to now."},{"name":"timezone","in":"query","required":false,"schema":{"type":"string"},"description":"IANA timezone used to bucket the results, e.g. `Europe/Berlin`. Defaults to the website timezone."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":1000,"default":100},"description":"Maximum rows to return. Defaults to 100."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0},"description":"Rows to skip before returning results."},{"name":"filter_country","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `country` matches this value."},{"name":"filter_region","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `region` matches this value."},{"name":"filter_city","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `city` matches this value."},{"name":"filter_device","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `device` matches this value."},{"name":"filter_browser","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `browser` matches this value."},{"name":"filter_os","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `os` matches this value."},{"name":"filter_referrer","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `referrer` matches this value."},{"name":"filter_ref","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `ref` matches this value."},{"name":"filter_source","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `source` matches this value."},{"name":"filter_via","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `via` matches this value."},{"name":"filter_utm_source","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm source` matches this value."},{"name":"filter_utm_medium","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm medium` matches this value."},{"name":"filter_utm_campaign","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm campaign` matches this value."},{"name":"filter_utm_term","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm term` matches this value."},{"name":"filter_utm_content","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm content` matches this value."},{"name":"filter_page","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `page` matches this value."},{"name":"filter_hostname","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `hostname` matches this value."},{"name":"filter_entry_page","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `entry page` matches this value."},{"name":"filter_channel","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `channel` matches this value."},{"name":"filter_goal","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `goal` matches this value."},{"name":"X-Workspace-Id","in":"header","required":false,"schema":{"type":"string"},"description":"The workspace to act in, for OAuth sign-ins that reach several workspaces. Take the id from `GET /workspaces`. Without it the call lands in the default workspace. A workspace the caller cannot reach answers 403 with `code: workspace_access_denied`. An API key belongs to one workspace: send its own id or leave the header out"}],"responses":{"200":{"description":"Breakdown rows ordered by visitors, descending.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownResponse"}}}},"401":{"description":"Missing, invalid, expired or revoked API key or access token. `code: token_issuer_lost_access` means the member who created the API key was deactivated or lost access to the workspace: ask a workspace admin for a new key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credentials are valid but cannot be used here. `code: permission_denied`: the workspace role behind the API key or OAuth sign-in lacks `flowsery.write`; `role`, `keyRole` and `issuerRole` say which role fell short. `code: subscription_required`: the organization plan does not include API access. `code: workspace_access_denied`: `X-Workspace-Id` names a workspace the caller cannot reach, or an API key was sent to a workspace other than its own","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Website not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/browsers":{"get":{"operationId":"getBrowsers","summary":"Break down visitors by browser","description":"Browsers, ordered by visitors.","tags":["Breakdowns"],"parameters":[{"name":"websiteId","in":"query","required":false,"schema":{"type":"string"},"description":"Website to query. Optional when the API key is scoped to a single website; required for workspace tokens that span several."},{"name":"domain","in":"query","required":false,"schema":{"type":"string"},"description":"Alternative to `websiteId`: select the website by its domain."},{"name":"startAt","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Start of the reporting window (ISO 8601). Defaults to 30 days ago."},{"name":"endAt","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"End of the reporting window (ISO 8601). Defaults to now."},{"name":"timezone","in":"query","required":false,"schema":{"type":"string"},"description":"IANA timezone used to bucket the results, e.g. `Europe/Berlin`. Defaults to the website timezone."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":1000,"default":100},"description":"Maximum rows to return. Defaults to 100."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0},"description":"Rows to skip before returning results."},{"name":"filter_country","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `country` matches this value."},{"name":"filter_region","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `region` matches this value."},{"name":"filter_city","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `city` matches this value."},{"name":"filter_device","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `device` matches this value."},{"name":"filter_browser","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `browser` matches this value."},{"name":"filter_os","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `os` matches this value."},{"name":"filter_referrer","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `referrer` matches this value."},{"name":"filter_ref","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `ref` matches this value."},{"name":"filter_source","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `source` matches this value."},{"name":"filter_via","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `via` matches this value."},{"name":"filter_utm_source","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm source` matches this value."},{"name":"filter_utm_medium","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm medium` matches this value."},{"name":"filter_utm_campaign","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm campaign` matches this value."},{"name":"filter_utm_term","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm term` matches this value."},{"name":"filter_utm_content","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm content` matches this value."},{"name":"filter_page","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `page` matches this value."},{"name":"filter_hostname","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `hostname` matches this value."},{"name":"filter_entry_page","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `entry page` matches this value."},{"name":"filter_channel","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `channel` matches this value."},{"name":"filter_goal","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `goal` matches this value."},{"name":"X-Workspace-Id","in":"header","required":false,"schema":{"type":"string"},"description":"The workspace to act in, for OAuth sign-ins that reach several workspaces. Take the id from `GET /workspaces`. Without it the call lands in the default workspace. A workspace the caller cannot reach answers 403 with `code: workspace_access_denied`. An API key belongs to one workspace: send its own id or leave the header out"}],"responses":{"200":{"description":"Breakdown rows ordered by visitors, descending.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownResponse"}}}},"401":{"description":"Missing, invalid, expired or revoked API key or access token. `code: token_issuer_lost_access` means the member who created the API key was deactivated or lost access to the workspace: ask a workspace admin for a new key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credentials are valid but cannot be used here. `code: permission_denied`: the workspace role behind the API key or OAuth sign-in lacks `flowsery.write`; `role`, `keyRole` and `issuerRole` say which role fell short. `code: subscription_required`: the organization plan does not include API access. `code: workspace_access_denied`: `X-Workspace-Id` names a workspace the caller cannot reach, or an API key was sent to a workspace other than its own","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Website not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/operating-systems":{"get":{"operationId":"getOperatingSystems","summary":"Break down visitors by operating system","description":"Operating systems, ordered by visitors.","tags":["Breakdowns"],"parameters":[{"name":"websiteId","in":"query","required":false,"schema":{"type":"string"},"description":"Website to query. Optional when the API key is scoped to a single website; required for workspace tokens that span several."},{"name":"domain","in":"query","required":false,"schema":{"type":"string"},"description":"Alternative to `websiteId`: select the website by its domain."},{"name":"startAt","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Start of the reporting window (ISO 8601). Defaults to 30 days ago."},{"name":"endAt","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"End of the reporting window (ISO 8601). Defaults to now."},{"name":"timezone","in":"query","required":false,"schema":{"type":"string"},"description":"IANA timezone used to bucket the results, e.g. `Europe/Berlin`. Defaults to the website timezone."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":1000,"default":100},"description":"Maximum rows to return. Defaults to 100."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0},"description":"Rows to skip before returning results."},{"name":"filter_country","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `country` matches this value."},{"name":"filter_region","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `region` matches this value."},{"name":"filter_city","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `city` matches this value."},{"name":"filter_device","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `device` matches this value."},{"name":"filter_browser","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `browser` matches this value."},{"name":"filter_os","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `os` matches this value."},{"name":"filter_referrer","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `referrer` matches this value."},{"name":"filter_ref","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `ref` matches this value."},{"name":"filter_source","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `source` matches this value."},{"name":"filter_via","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `via` matches this value."},{"name":"filter_utm_source","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm source` matches this value."},{"name":"filter_utm_medium","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm medium` matches this value."},{"name":"filter_utm_campaign","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm campaign` matches this value."},{"name":"filter_utm_term","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm term` matches this value."},{"name":"filter_utm_content","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm content` matches this value."},{"name":"filter_page","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `page` matches this value."},{"name":"filter_hostname","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `hostname` matches this value."},{"name":"filter_entry_page","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `entry page` matches this value."},{"name":"filter_channel","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `channel` matches this value."},{"name":"filter_goal","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `goal` matches this value."},{"name":"X-Workspace-Id","in":"header","required":false,"schema":{"type":"string"},"description":"The workspace to act in, for OAuth sign-ins that reach several workspaces. Take the id from `GET /workspaces`. Without it the call lands in the default workspace. A workspace the caller cannot reach answers 403 with `code: workspace_access_denied`. An API key belongs to one workspace: send its own id or leave the header out"}],"responses":{"200":{"description":"Breakdown rows ordered by visitors, descending.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownResponse"}}}},"401":{"description":"Missing, invalid, expired or revoked API key or access token. `code: token_issuer_lost_access` means the member who created the API key was deactivated or lost access to the workspace: ask a workspace admin for a new key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credentials are valid but cannot be used here. `code: permission_denied`: the workspace role behind the API key or OAuth sign-in lacks `flowsery.write`; `role`, `keyRole` and `issuerRole` say which role fell short. `code: subscription_required`: the organization plan does not include API access. `code: workspace_access_denied`: `X-Workspace-Id` names a workspace the caller cannot reach, or an API key was sent to a workspace other than its own","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Website not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/breakdown":{"get":{"operationId":"getBreakdown","summary":"Break down visitors by any supported dimension","description":"Generic form of the named breakdown endpoints. Pass `dimension` to choose what to group by, including dimensions with no dedicated route such as `entry_page`, `exit_link`, `browser_version`, `os_version` and the individual UTM parameters.","tags":["Breakdowns"],"parameters":[{"name":"dimension","in":"query","required":true,"schema":{"$ref":"#/components/schemas/BreakdownDimension"},"description":"The attribute to group visitors by."},{"name":"websiteId","in":"query","required":false,"schema":{"type":"string"},"description":"Website to query. Optional when the API key is scoped to a single website; required for workspace tokens that span several."},{"name":"domain","in":"query","required":false,"schema":{"type":"string"},"description":"Alternative to `websiteId`: select the website by its domain."},{"name":"startAt","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Start of the reporting window (ISO 8601). Defaults to 30 days ago."},{"name":"endAt","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"End of the reporting window (ISO 8601). Defaults to now."},{"name":"timezone","in":"query","required":false,"schema":{"type":"string"},"description":"IANA timezone used to bucket the results, e.g. `Europe/Berlin`. Defaults to the website timezone."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":1000,"default":100},"description":"Maximum rows to return. Defaults to 100."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0},"description":"Rows to skip before returning results."},{"name":"filter_country","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `country` matches this value."},{"name":"filter_region","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `region` matches this value."},{"name":"filter_city","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `city` matches this value."},{"name":"filter_device","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `device` matches this value."},{"name":"filter_browser","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `browser` matches this value."},{"name":"filter_os","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `os` matches this value."},{"name":"filter_referrer","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `referrer` matches this value."},{"name":"filter_ref","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `ref` matches this value."},{"name":"filter_source","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `source` matches this value."},{"name":"filter_via","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `via` matches this value."},{"name":"filter_utm_source","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm source` matches this value."},{"name":"filter_utm_medium","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm medium` matches this value."},{"name":"filter_utm_campaign","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm campaign` matches this value."},{"name":"filter_utm_term","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm term` matches this value."},{"name":"filter_utm_content","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm content` matches this value."},{"name":"filter_page","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `page` matches this value."},{"name":"filter_hostname","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `hostname` matches this value."},{"name":"filter_entry_page","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `entry page` matches this value."},{"name":"filter_channel","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `channel` matches this value."},{"name":"filter_goal","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `goal` matches this value."},{"name":"X-Workspace-Id","in":"header","required":false,"schema":{"type":"string"},"description":"The workspace to act in, for OAuth sign-ins that reach several workspaces. Take the id from `GET /workspaces`. Without it the call lands in the default workspace. A workspace the caller cannot reach answers 403 with `code: workspace_access_denied`. An API key belongs to one workspace: send its own id or leave the header out"}],"responses":{"200":{"description":"Breakdown rows ordered by visitors, descending.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreakdownResponse"}}}},"400":{"description":"Unknown dimension","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid, expired or revoked API key or access token. `code: token_issuer_lost_access` means the member who created the API key was deactivated or lost access to the workspace: ask a workspace admin for a new key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credentials are valid but cannot be used here. `code: permission_denied`: the workspace role behind the API key or OAuth sign-in lacks `flowsery.write`; `role`, `keyRole` and `issuerRole` say which role fell short. `code: subscription_required`: the organization plan does not include API access. `code: workspace_access_denied`: `X-Workspace-Id` names a workspace the caller cannot reach, or an API key was sent to a workspace other than its own","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Website not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/goals":{"get":{"operationId":"listGoals","summary":"List goals with completion counts","description":"Every configured goal and how many visitors completed it in the window. `filter_*` narrows the visitors counted; `limit` and `offset` page the goal list.","tags":["Reports"],"parameters":[{"name":"websiteId","in":"query","required":false,"schema":{"type":"string"},"description":"Website to query. Optional when the API key is scoped to a single website; required for workspace tokens that span several."},{"name":"domain","in":"query","required":false,"schema":{"type":"string"},"description":"Alternative to `websiteId`: select the website by its domain."},{"name":"startAt","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Start of the reporting window (ISO 8601). Defaults to 30 days ago."},{"name":"endAt","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"End of the reporting window (ISO 8601). Defaults to now."},{"name":"timezone","in":"query","required":false,"schema":{"type":"string"},"description":"IANA timezone used to bucket the results, e.g. `Europe/Berlin`. Defaults to the website timezone."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":1000,"default":100},"description":"Maximum rows to return. Defaults to 100."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0},"description":"Rows to skip before returning results."},{"name":"filter_country","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `country` matches this value."},{"name":"filter_region","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `region` matches this value."},{"name":"filter_city","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `city` matches this value."},{"name":"filter_device","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `device` matches this value."},{"name":"filter_browser","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `browser` matches this value."},{"name":"filter_os","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `os` matches this value."},{"name":"filter_referrer","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `referrer` matches this value."},{"name":"filter_ref","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `ref` matches this value."},{"name":"filter_source","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `source` matches this value."},{"name":"filter_via","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `via` matches this value."},{"name":"filter_utm_source","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm source` matches this value."},{"name":"filter_utm_medium","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm medium` matches this value."},{"name":"filter_utm_campaign","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm campaign` matches this value."},{"name":"filter_utm_term","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm term` matches this value."},{"name":"filter_utm_content","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `utm content` matches this value."},{"name":"filter_page","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `page` matches this value."},{"name":"filter_hostname","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `hostname` matches this value."},{"name":"filter_entry_page","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `entry page` matches this value."},{"name":"filter_channel","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `channel` matches this value."},{"name":"filter_goal","in":"query","required":false,"schema":{"type":"string"},"description":"Keep only rows whose `goal` matches this value."},{"name":"X-Workspace-Id","in":"header","required":false,"schema":{"type":"string"},"description":"The workspace to act in, for OAuth sign-ins that reach several workspaces. Take the id from `GET /workspaces`. Without it the call lands in the default workspace. A workspace the caller cannot reach answers 403 with `code: workspace_access_denied`. An API key belongs to one workspace: send its own id or leave the header out"}],"responses":{"200":{"description":"Goals with completion counts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoalsResponse"}}}},"401":{"description":"Missing, invalid, expired or revoked API key or access token. `code: token_issuer_lost_access` means the member who created the API key was deactivated or lost access to the workspace: ask a workspace admin for a new key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credentials are valid but cannot be used here. `code: permission_denied`: the workspace role behind the API key or OAuth sign-in lacks `flowsery.write`; `role`, `keyRole` and `issuerRole` say which role fell short. `code: subscription_required`: the organization plan does not include API access. `code: workspace_access_denied`: `X-Workspace-Id` names a workspace the caller cannot reach, or an API key was sent to a workspace other than its own","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Website not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"trackGoal","summary":"Record a goal completion","description":"Records a conversion from your own backend. Attach it to a known visitor with `visitorUid`, or omit it to record an anonymous completion.","tags":["Events"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrackGoalRequest"}}}},"responses":{"200":{"description":"Goal recorded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid, expired or revoked API key or access token. `code: token_issuer_lost_access` means the member who created the API key was deactivated or lost access to the workspace: ask a workspace admin for a new key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credentials are valid but cannot be used here. `code: permission_denied`: the workspace role behind the API key or OAuth sign-in lacks `flowsery.write`; `role`, `keyRole` and `issuerRole` say which role fell short. `code: subscription_required`: the organization plan does not include API access. `code: workspace_access_denied`: `X-Workspace-Id` names a workspace the caller cannot reach, or an API key was sent to a workspace other than its own","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Website not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"X-Workspace-Id","in":"header","required":false,"schema":{"type":"string"},"description":"The workspace to act in, for OAuth sign-ins that reach several workspaces. Take the id from `GET /workspaces`. Without it the call lands in the default workspace. A workspace the caller cannot reach answers 403 with `code: workspace_access_denied`. An API key belongs to one workspace: send its own id or leave the header out"}]},"delete":{"operationId":"deleteGoalCompletions","summary":"Delete goal completions","description":"Deletes recorded completions matching the filter. At least one of `visitorId`, `name`, `startAt` or `endAt` is required, so an unfiltered call cannot wipe the whole history by accident.","tags":["Events"],"parameters":[{"name":"websiteId","in":"query","required":false,"schema":{"type":"string"},"description":"Website to query. Optional when the API key is scoped to a single website; required for workspace tokens that span several."},{"name":"domain","in":"query","required":false,"schema":{"type":"string"},"description":"Alternative to `websiteId`: select the website by its domain."},{"name":"visitorId","in":"query","required":false,"schema":{"type":"string"},"description":"Delete completions belonging to this visitor."},{"name":"name","in":"query","required":false,"schema":{"type":"string"},"description":"Delete completions of this goal name."},{"name":"startAt","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Delete completions recorded at or after this time."},{"name":"endAt","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Delete completions recorded at or before this time."},{"name":"X-Workspace-Id","in":"header","required":false,"schema":{"type":"string"},"description":"The workspace to act in, for OAuth sign-ins that reach several workspaces. Take the id from `GET /workspaces`. Without it the call lands in the default workspace. A workspace the caller cannot reach answers 403 with `code: workspace_access_denied`. An API key belongs to one workspace: send its own id or leave the header out"}],"responses":{"200":{"description":"Completions deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"400":{"description":"No filter supplied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid, expired or revoked API key or access token. `code: token_issuer_lost_access` means the member who created the API key was deactivated or lost access to the workspace: ask a workspace admin for a new key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credentials are valid but cannot be used here. `code: permission_denied`: the workspace role behind the API key or OAuth sign-in lacks `flowsery.write`; `role`, `keyRole` and `issuerRole` say which role fell short. `code: subscription_required`: the organization plan does not include API access. `code: workspace_access_denied`: `X-Workspace-Id` names a workspace the caller cannot reach, or an API key was sent to a workspace other than its own","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Website not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/payments":{"post":{"operationId":"trackPayment","summary":"Record a payment, renewal or refund","description":"Attributes revenue to a visitor so it shows up in revenue metrics and the visitor profile. Set `isRenewal` for recurring charges and `isRefund` to reverse one.","tags":["Events"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrackPaymentRequest"}}}},"responses":{"200":{"description":"Payment recorded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"400":{"description":"Validation error, such as a missing `amount`, or a refund whose `transactionId` belongs to a payment on another website","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid, expired or revoked API key or access token. `code: token_issuer_lost_access` means the member who created the API key was deactivated or lost access to the workspace: ask a workspace admin for a new key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credentials are valid but cannot be used here. `code: permission_denied`: the workspace role behind the API key or OAuth sign-in lacks `flowsery.write`; `role`, `keyRole` and `issuerRole` say which role fell short. `code: subscription_required`: the organization plan does not include API access. `code: workspace_access_denied`: `X-Workspace-Id` names a workspace the caller cannot reach, or an API key was sent to a workspace other than its own","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Website not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"A payment with this `transactionId` was already recorded. Send `isRefund: true` to refund it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"X-Workspace-Id","in":"header","required":false,"schema":{"type":"string"},"description":"The workspace to act in, for OAuth sign-ins that reach several workspaces. Take the id from `GET /workspaces`. Without it the call lands in the default workspace. A workspace the caller cannot reach answers 403 with `code: workspace_access_denied`. An API key belongs to one workspace: send its own id or leave the header out"}]},"delete":{"operationId":"deletePayments","summary":"Delete recorded payments","description":"Deletes payments matching the filter. At least one of `transactionId`, `visitorId`, `startAt` or `endAt` is required.","tags":["Events"],"parameters":[{"name":"websiteId","in":"query","required":false,"schema":{"type":"string"},"description":"Website to query. Optional when the API key is scoped to a single website; required for workspace tokens that span several."},{"name":"domain","in":"query","required":false,"schema":{"type":"string"},"description":"Alternative to `websiteId`: select the website by its domain."},{"name":"transactionId","in":"query","required":false,"schema":{"type":"string"},"description":"Delete the payment with this transaction id."},{"name":"visitorId","in":"query","required":false,"schema":{"type":"string"},"description":"Delete payments belonging to this visitor."},{"name":"startAt","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Delete payments recorded at or after this time."},{"name":"endAt","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Delete payments recorded at or before this time."},{"name":"X-Workspace-Id","in":"header","required":false,"schema":{"type":"string"},"description":"The workspace to act in, for OAuth sign-ins that reach several workspaces. Take the id from `GET /workspaces`. Without it the call lands in the default workspace. A workspace the caller cannot reach answers 403 with `code: workspace_access_denied`. An API key belongs to one workspace: send its own id or leave the header out"}],"responses":{"200":{"description":"Payments deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"400":{"description":"No filter supplied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid, expired or revoked API key or access token. `code: token_issuer_lost_access` means the member who created the API key was deactivated or lost access to the workspace: ask a workspace admin for a new key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credentials are valid but cannot be used here. `code: permission_denied`: the workspace role behind the API key or OAuth sign-in lacks `flowsery.write`; `role`, `keyRole` and `issuerRole` say which role fell short. `code: subscription_required`: the organization plan does not include API access. `code: workspace_access_denied`: `X-Workspace-Id` names a workspace the caller cannot reach, or an API key was sent to a workspace other than its own","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Website not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/realtime":{"get":{"operationId":"getRealtimeVisitors","summary":"Count visitors active right now","tags":["Reports"],"parameters":[{"name":"websiteId","in":"query","required":false,"schema":{"type":"string"},"description":"Website to query. Optional when the API key is scoped to a single website; required for workspace tokens that span several."},{"name":"domain","in":"query","required":false,"schema":{"type":"string"},"description":"Alternative to `websiteId`: select the website by its domain."},{"name":"X-Workspace-Id","in":"header","required":false,"schema":{"type":"string"},"description":"The workspace to act in, for OAuth sign-ins that reach several workspaces. Take the id from `GET /workspaces`. Without it the call lands in the default workspace. A workspace the caller cannot reach answers 403 with `code: workspace_access_denied`. An API key belongs to one workspace: send its own id or leave the header out"}],"responses":{"200":{"description":"Active visitor count","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RealtimeResponse"}}}},"401":{"description":"Missing, invalid, expired or revoked API key or access token. `code: token_issuer_lost_access` means the member who created the API key was deactivated or lost access to the workspace: ask a workspace admin for a new key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credentials are valid but cannot be used here. `code: permission_denied`: the workspace role behind the API key or OAuth sign-in lacks `flowsery.write`; `role`, `keyRole` and `issuerRole` say which role fell short. `code: subscription_required`: the organization plan does not include API access. `code: workspace_access_denied`: `X-Workspace-Id` names a workspace the caller cannot reach, or an API key was sent to a workspace other than its own","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Website not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/realtime/map":{"get":{"operationId":"getRealtimeMapVisitors","summary":"List visitors active right now with their location","description":"Visitors seen in the last 5 minutes with geo, device, current page and revenue, for a live map. Capped to the 1000 most recently active visitors.","tags":["Reports"],"parameters":[{"name":"websiteId","in":"query","required":false,"schema":{"type":"string"},"description":"Website to query. Optional when the API key is scoped to a single website; required for workspace tokens that span several."},{"name":"domain","in":"query","required":false,"schema":{"type":"string"},"description":"Alternative to `websiteId`: select the website by its domain."},{"name":"X-Workspace-Id","in":"header","required":false,"schema":{"type":"string"},"description":"The workspace to act in, for OAuth sign-ins that reach several workspaces. Take the id from `GET /workspaces`. Without it the call lands in the default workspace. A workspace the caller cannot reach answers 403 with `code: workspace_access_denied`. An API key belongs to one workspace: send its own id or leave the header out"}],"responses":{"200":{"description":"Active visitors with location","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RealtimeMapResponse"}}}},"401":{"description":"Missing, invalid, expired or revoked API key or access token. `code: token_issuer_lost_access` means the member who created the API key was deactivated or lost access to the workspace: ask a workspace admin for a new key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credentials are valid but cannot be used here. `code: permission_denied`: the workspace role behind the API key or OAuth sign-in lacks `flowsery.write`; `role`, `keyRole` and `issuerRole` say which role fell short. `code: subscription_required`: the organization plan does not include API access. `code: workspace_access_denied`: `X-Workspace-Id` names a workspace the caller cannot reach, or an API key was sent to a workspace other than its own","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Website not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/metadata":{"get":{"operationId":"getWebsiteMetadata","summary":"Get a website’s display settings","description":"Domain, timezone, currency, KPI and logo for one website. With no website selected and a workspace token, this returns the same payload as /websites.","tags":["Websites"],"parameters":[{"name":"websiteId","in":"query","required":false,"schema":{"type":"string"},"description":"Website to query. Optional when the API key is scoped to a single website; required for workspace tokens that span several."},{"name":"domain","in":"query","required":false,"schema":{"type":"string"},"description":"Alternative to `websiteId`: select the website by its domain."},{"name":"X-Workspace-Id","in":"header","required":false,"schema":{"type":"string"},"description":"The workspace to act in, for OAuth sign-ins that reach several workspaces. Take the id from `GET /workspaces`. Without it the call lands in the default workspace. A workspace the caller cannot reach answers 403 with `code: workspace_access_denied`. An API key belongs to one workspace: send its own id or leave the header out"}],"responses":{"200":{"description":"Website metadata","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetadataResponse"}}}},"401":{"description":"Missing, invalid, expired or revoked API key or access token. `code: token_issuer_lost_access` means the member who created the API key was deactivated or lost access to the workspace: ask a workspace admin for a new key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credentials are valid but cannot be used here. `code: permission_denied`: the workspace role behind the API key or OAuth sign-in lacks `flowsery.write`; `role`, `keyRole` and `issuerRole` say which role fell short. `code: subscription_required`: the organization plan does not include API access. `code: workspace_access_denied`: `X-Workspace-Id` names a workspace the caller cannot reach, or an API key was sent to a workspace other than its own","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Website not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/workspaces":{"get":{"operationId":"listWorkspaces","summary":"List the workspaces the caller can act in","description":"An OAuth sign-in reaches every workspace its member belongs to, across organizations; an API key reaches only its own. Send a returned `id` in the `X-Workspace-Id` header to act in that workspace. `current` marks the workspace this call landed in. A website API key belongs to one website and answers 400 here","tags":["Workspaces"],"responses":{"200":{"description":"The reachable workspaces","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspacesResponse"}}}},"400":{"description":"Called with a website API key, which belongs to one website and has no workspaces to list. Use a workspace token or an OAuth sign-in","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid, expired or revoked API key or access token. `code: token_issuer_lost_access` means the member who created the API key was deactivated or lost access to the workspace: ask a workspace admin for a new key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credentials are valid but cannot be used here. `code: permission_denied`: the workspace role behind the API key or OAuth sign-in lacks `flowsery.write`; `role`, `keyRole` and `issuerRole` say which role fell short. `code: subscription_required`: the organization plan does not include API access. `code: workspace_access_denied`: `X-Workspace-Id` names a workspace the caller cannot reach, or an API key was sent to a workspace other than its own","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"X-Workspace-Id","in":"header","required":false,"schema":{"type":"string"},"description":"The workspace to act in, for OAuth sign-ins that reach several workspaces. Take the id from `GET /workspaces`. Without it the call lands in the default workspace. A workspace the caller cannot reach answers 403 with `code: workspace_access_denied`. An API key belongs to one workspace: send its own id or leave the header out"}]}},"/websites":{"get":{"operationId":"listWebsites","summary":"List websites this key can read","description":"A website key returns just its own website; a workspace token returns every website in the account. Use the returned ids as `websiteId` on the other endpoints.","tags":["Websites"],"responses":{"200":{"description":"Websites","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebsitesResponse"}}}},"401":{"description":"Missing, invalid, expired or revoked API key or access token. `code: token_issuer_lost_access` means the member who created the API key was deactivated or lost access to the workspace: ask a workspace admin for a new key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credentials are valid but cannot be used here. `code: permission_denied`: the workspace role behind the API key or OAuth sign-in lacks `flowsery.write`; `role`, `keyRole` and `issuerRole` say which role fell short. `code: subscription_required`: the organization plan does not include API access. `code: workspace_access_denied`: `X-Workspace-Id` names a workspace the caller cannot reach, or an API key was sent to a workspace other than its own","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"X-Workspace-Id","in":"header","required":false,"schema":{"type":"string"},"description":"The workspace to act in, for OAuth sign-ins that reach several workspaces. Take the id from `GET /workspaces`. Without it the call lands in the default workspace. A workspace the caller cannot reach answers 403 with `code: workspace_access_denied`. An API key belongs to one workspace: send its own id or leave the header out"}]}},"/issues":{"get":{"operationId":"listIssues","summary":"List AI-detected issues","description":"Issues the AI found while analyzing session recordings, deduplicated across sessions and ranked by severity. Each issue carries how many sessions hit it, when it was first and last seen, and steps to replicate.","tags":["Issues"],"parameters":[{"name":"websiteId","in":"query","required":false,"schema":{"type":"string"},"description":"Website to query. Optional when the API key is scoped to a single website; required for workspace tokens that span several."},{"name":"domain","in":"query","required":false,"schema":{"type":"string"},"description":"Alternative to `websiteId`: select the website by its domain."},{"name":"status","in":"query","required":false,"schema":{"$ref":"#/components/schemas/IssueStatus"},"description":"Keep only issues with this status."},{"name":"severity","in":"query","required":false,"schema":{"$ref":"#/components/schemas/IssueSeverity"},"description":"Keep only issues with this severity."},{"name":"search","in":"query","required":false,"schema":{"type":"string"},"description":"Match against issue title and description."},{"name":"sort","in":"query","required":false,"schema":{"$ref":"#/components/schemas/IssueSortKey"},"description":"Order by `severity` (default) or `recency` (last seen)."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":1000,"default":100},"description":"Maximum rows to return. Defaults to 100."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0},"description":"Rows to skip before returning results."},{"name":"X-Workspace-Id","in":"header","required":false,"schema":{"type":"string"},"description":"The workspace to act in, for OAuth sign-ins that reach several workspaces. Take the id from `GET /workspaces`. Without it the call lands in the default workspace. A workspace the caller cannot reach answers 403 with `code: workspace_access_denied`. An API key belongs to one workspace: send its own id or leave the header out"}],"responses":{"200":{"description":"Issues with status counts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueListResponse"}}}},"401":{"description":"Missing, invalid, expired or revoked API key or access token. `code: token_issuer_lost_access` means the member who created the API key was deactivated or lost access to the workspace: ask a workspace admin for a new key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credentials are valid but cannot be used here. `code: permission_denied`: the workspace role behind the API key or OAuth sign-in lacks `flowsery.write`; `role`, `keyRole` and `issuerRole` say which role fell short. `code: subscription_required`: the organization plan does not include API access. `code: workspace_access_denied`: `X-Workspace-Id` names a workspace the caller cannot reach, or an API key was sent to a workspace other than its own","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Website not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/issues/{issueId}":{"get":{"operationId":"getIssue","summary":"Get one issue with its sessions and comments","description":"Full detail for one issue: every occurrence the AI flagged, the sessions behind it, steps to replicate, comments, and any linked external ticket.","tags":["Issues"],"parameters":[{"name":"issueId","in":"path","required":true,"schema":{"type":"string"},"description":"Issue id, as returned by the issues list."},{"name":"websiteId","in":"query","required":false,"schema":{"type":"string"},"description":"Website to query. Optional when the API key is scoped to a single website; required for workspace tokens that span several."},{"name":"domain","in":"query","required":false,"schema":{"type":"string"},"description":"Alternative to `websiteId`: select the website by its domain."},{"name":"X-Workspace-Id","in":"header","required":false,"schema":{"type":"string"},"description":"The workspace to act in, for OAuth sign-ins that reach several workspaces. Take the id from `GET /workspaces`. Without it the call lands in the default workspace. A workspace the caller cannot reach answers 403 with `code: workspace_access_denied`. An API key belongs to one workspace: send its own id or leave the header out"}],"responses":{"200":{"description":"Issue detail","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueDetailResponse"}}}},"401":{"description":"Missing, invalid, expired or revoked API key or access token. `code: token_issuer_lost_access` means the member who created the API key was deactivated or lost access to the workspace: ask a workspace admin for a new key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credentials are valid but cannot be used here. `code: permission_denied`: the workspace role behind the API key or OAuth sign-in lacks `flowsery.write`; `role`, `keyRole` and `issuerRole` say which role fell short. `code: subscription_required`: the organization plan does not include API access. `code: workspace_access_denied`: `X-Workspace-Id` names a workspace the caller cannot reach, or an API key was sent to a workspace other than its own. On a free trial only the first 10 issues found are open; any other answers 403 with the message \"Upgrade to view this issue\" and no `code`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Issue not found on this website","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updateIssueStatus","summary":"Update an issue’s status","description":"Moves an issue between `open`, `in_progress`, `resolved` and `suspended`. Suspended issues disappear from the default list.","tags":["Issues"],"parameters":[{"name":"issueId","in":"path","required":true,"schema":{"type":"string"},"description":"Issue id, as returned by the issues list."},{"name":"websiteId","in":"query","required":false,"schema":{"type":"string"},"description":"Website to query. Optional when the API key is scoped to a single website; required for workspace tokens that span several."},{"name":"domain","in":"query","required":false,"schema":{"type":"string"},"description":"Alternative to `websiteId`: select the website by its domain."},{"name":"X-Workspace-Id","in":"header","required":false,"schema":{"type":"string"},"description":"The workspace to act in, for OAuth sign-ins that reach several workspaces. Take the id from `GET /workspaces`. Without it the call lands in the default workspace. A workspace the caller cannot reach answers 403 with `code: workspace_access_denied`. An API key belongs to one workspace: send its own id or leave the header out"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateIssueStatusRequest"}}}},"responses":{"200":{"description":"Updated issue detail","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueDetailResponse"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid, expired or revoked API key or access token. `code: token_issuer_lost_access` means the member who created the API key was deactivated or lost access to the workspace: ask a workspace admin for a new key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credentials are valid but cannot be used here. `code: permission_denied`: the workspace role behind the API key or OAuth sign-in lacks `flowsery.write`; `role`, `keyRole` and `issuerRole` say which role fell short. `code: subscription_required`: the organization plan does not include API access. `code: workspace_access_denied`: `X-Workspace-Id` names a workspace the caller cannot reach, or an API key was sent to a workspace other than its own. On a free trial only the first 10 issues found are open; any other answers 403 with the message \"Upgrade to view this issue\" and no `code`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Issue not found on this website","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/visitors/{visitorId}":{"get":{"operationId":"getVisitorProfile","summary":"Get one visitor’s profile and activity timeline","description":"Geo and device identity, acquisition source, page views, goal completions, revenue and a merged chronological timeline for a single visitor.","tags":["Visitors"],"parameters":[{"name":"visitorId","in":"path","required":true,"schema":{"type":"string"},"description":"Visitor id, as returned in breakdowns and the tracking script."},{"name":"websiteId","in":"query","required":false,"schema":{"type":"string"},"description":"Website to query. Optional when the API key is scoped to a single website; required for workspace tokens that span several."},{"name":"domain","in":"query","required":false,"schema":{"type":"string"},"description":"Alternative to `websiteId`: select the website by its domain."},{"name":"X-Workspace-Id","in":"header","required":false,"schema":{"type":"string"},"description":"The workspace to act in, for OAuth sign-ins that reach several workspaces. Take the id from `GET /workspaces`. Without it the call lands in the default workspace. A workspace the caller cannot reach answers 403 with `code: workspace_access_denied`. An API key belongs to one workspace: send its own id or leave the header out"}],"responses":{"200":{"description":"Visitor profile","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisitorProfileResponse"}}}},"401":{"description":"Missing, invalid, expired or revoked API key or access token. `code: token_issuer_lost_access` means the member who created the API key was deactivated or lost access to the workspace: ask a workspace admin for a new key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credentials are valid but cannot be used here. `code: permission_denied`: the workspace role behind the API key or OAuth sign-in lacks `flowsery.write`; `role`, `keyRole` and `issuerRole` say which role fell short. `code: subscription_required`: the organization plan does not include API access. `code: workspace_access_denied`: `X-Workspace-Id` names a workspace the caller cannot reach, or an API key was sent to a workspace other than its own","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Visitor not found on this website","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"A website API key or a workspace API token, sent as `Authorization: Bearer <api-key>`. Create either one under Settings in the Flowsery dashboard. An OAuth access token reaches every workspace its member belongs to: list them with `GET /workspaces` and pick one per call with the `X-Workspace-Id` header."}},"schemas":{"Error":{"type":"object","required":["statusCode","message"],"properties":{"statusCode":{"type":"integer"},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable reason, in the language of `x-language` or `Accept-Language`"},"code":{"type":"string","description":"Machine-readable reason, present on refusals a client can act on: `permission_denied`, `subscription_required`, `workspace_access_denied` or `token_issuer_lost_access`"},"workspaceId":{"type":"string","description":"The refused workspace, on `workspace_access_denied`"},"requiredPermission":{"type":"string","enum":["workspace.read","workspace.manage","posts.read","posts.draft","posts.others","posts.schedule","posts.publish","posts.delete","media.upload","accounts.read","accounts.manage","analytics.read","analytics.sync","ai.generate","members.read","members.manage","tokens.own","tokens.manage","webhooks.read","webhooks.manage","signature.manage","flowsery.write","redreplier.write","claw.use"],"description":"The permission the caller lacks, on `permission_denied`"},"role":{"type":"string","description":"The workspace role that lacks it, on `permission_denied`"},"keyRole":{"type":"string","nullable":true,"description":"The role the API key carries, when an API key or OAuth sign-in was refused"},"issuerRole":{"type":"string","nullable":true,"description":"The current role of the member who created the API key"},"tokenType":{"type":"string","enum":["session","api_token","oauth"]}}},"Pagination":{"type":"object","properties":{"limit":{"type":"integer"},"offset":{"type":"integer"},"total":{"type":"integer","description":"Total rows matching the query, before paging."}},"required":["limit","offset","total"]},"BreakdownDimension":{"type":"string","enum":["device","page","entry_page","exit_link","hostname","referrer","channel","campaign","goal","country","region","city","browser","browser_version","os","os_version","utm_source","utm_medium","utm_campaign","utm_term","utm_content","ref","source","via","all_params"]},"Interval":{"type":"string","enum":["hour","day","week","month"]},"Overview":{"type":"object","properties":{"visitors":{"type":"integer"},"sessions":{"type":"integer"},"bounceRate":{"type":"number","description":"Percentage, 0-100."},"avgSessionDuration":{"type":"integer","description":"Seconds."},"avgEngagedTime":{"type":"integer","description":"Seconds of active engagement."},"revenue":{"type":"number"},"renewalRevenue":{"type":"number"},"refundedRevenue":{"type":"number"},"revenuePerVisitor":{"type":"number"},"conversionRate":{"type":"number","description":"Percentage, 0-100."},"kpiValue":{"type":"number","description":"The website’s chosen KPI for this window."},"kpiPerVisitor":{"type":"number"},"kpiConversionRate":{"type":"number"},"currency":{"type":"string","description":"ISO 4217 code."}}},"OverviewResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Overview"},"description":"Always exactly one row."}},"required":["status","data"]},"TimeseriesPoint":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time"},"name":{"type":"string","description":"Bucket label formatted in the query timezone."},"visitors":{"type":"integer"},"sessions":{"type":"integer"},"revenue":{"type":"number"},"newRevenue":{"type":"number"},"renewalRevenue":{"type":"number"},"refundedRevenue":{"type":"number"},"conversionRate":{"type":"number"},"kpiValue":{"type":"number"}}},"TimeseriesResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success"]},"interval":{"$ref":"#/components/schemas/Interval"},"timezone":{"type":"string"},"currency":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/TimeseriesPoint"}},"totals":{"type":"object","properties":{"visitors":{"type":"integer"},"sessions":{"type":"integer"},"revenue":{"type":"number"}}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["status","data"]},"BreakdownRow":{"type":"object","properties":{"value":{"type":"string","description":"`Unknown` when the attribute was not captured."},"visitors":{"type":"integer"},"revenue":{"type":"number"},"newRevenue":{"type":"number"},"renewalRevenue":{"type":"number"},"percentage":{"type":"number","description":"This row’s share of visitors in the window, 0-100."},"countryCode":{"type":"string","description":"ISO 3166-1 alpha-2, present on geographic dimensions."},"iconUrl":{"type":"string","nullable":true,"description":"Favicon of the referring site, present on the referrer dimension."}},"required":["value","visitors"]},"BreakdownResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/BreakdownRow"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["status","data"]},"Goal":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"completions":{"type":"integer"},"visitors":{"type":"integer","description":"Same as `completions`."}}},"GoalsResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Goal"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["status","data"]},"IssueStatus":{"type":"string","enum":["open","in_progress","resolved","suspended"]},"IssueSeverity":{"type":"string","enum":["low","medium","high","critical"]},"IssueSortKey":{"type":"string","enum":["severity","recency"]},"Issue":{"type":"object","properties":{"id":{"type":"string"},"websiteId":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"severity":{"$ref":"#/components/schemas/IssueSeverity"},"status":{"$ref":"#/components/schemas/IssueStatus"},"sessionsCount":{"type":"integer","description":"How many analyzed sessions hit this issue."},"firstSeenAt":{"type":"string","format":"date-time"},"lastSeenAt":{"type":"string","format":"date-time"},"stepsToReplicate":{"type":"array","items":{"type":"string"}},"sampleRecordingId":{"type":"string","nullable":true},"externalTicketProvider":{"type":"string","nullable":true},"externalTicketKey":{"type":"string","nullable":true},"externalTicketUrl":{"type":"string","nullable":true}},"required":["id","websiteId","title","severity","status"]},"IssueOccurrence":{"type":"object","properties":{"description":{"type":"string"},"atSeconds":{"type":"number","nullable":true},"severity":{"$ref":"#/components/schemas/IssueSeverity"}}},"IssueComment":{"type":"object","properties":{"id":{"type":"string"},"incidentId":{"type":"string"},"authorId":{"type":"string"},"authorName":{"type":"string"},"body":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}}},"IssueDetail":{"allOf":[{"$ref":"#/components/schemas/Issue"},{"type":"object","properties":{"occurrences":{"type":"array","items":{"$ref":"#/components/schemas/IssueOccurrence"}},"sessions":{"type":"array","items":{"type":"object","properties":{"recordingId":{"type":"string"},"atSeconds":{"type":"number","nullable":true}}}},"comments":{"type":"array","items":{"$ref":"#/components/schemas/IssueComment"}}}}]},"IssueListResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Issue"}},"counts":{"type":"object","properties":{"open":{"type":"integer"},"inProgress":{"type":"integer"},"resolved":{"type":"integer"}}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["status","data"]},"IssueDetailResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success"]},"data":{"$ref":"#/components/schemas/IssueDetail"}},"required":["status","data"]},"UpdateIssueStatusRequest":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/IssueStatus"}},"required":["status"]},"RealtimeResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success"]},"data":{"type":"array","items":{"type":"object","properties":{"visitors":{"type":"integer"}}}}},"required":["status","data"]},"RealtimeMapVisitor":{"type":"object","properties":{"visitorId":{"type":"string"},"visitorUid":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"countryCode":{"type":"string","nullable":true},"region":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"latitude":{"type":"number","nullable":true},"longitude":{"type":"number","nullable":true},"browser":{"type":"string","nullable":true},"os":{"type":"string","nullable":true},"deviceType":{"type":"string","enum":["Desktop","Mobile","Tablet","Unknown"],"nullable":true},"currentUrl":{"type":"string","nullable":true},"referrer":{"type":"string","nullable":true},"referrerSource":{"type":"string","nullable":true},"referrerIconUrl":{"type":"string","nullable":true},"sessionStartTime":{"type":"string","format":"date-time","nullable":true},"pageviews":{"type":"integer"},"totalRevenue":{"type":"number"},"isCustomer":{"type":"boolean"},"name":{"type":"string","nullable":true},"email":{"type":"string","nullable":true}},"required":["visitorId","pageviews","totalRevenue","isCustomer"]},"RealtimeMapResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/RealtimeMapVisitor"}}},"required":["status","data"]},"WebsiteMetadata":{"type":"object","properties":{"domain":{"type":"string"},"timezone":{"type":"string"},"logo":{"type":"string","nullable":true},"kpiColorScheme":{"type":"string","nullable":true},"kpi":{"type":"string","nullable":true},"currency":{"type":"string"}}},"MetadataResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/WebsiteMetadata"}}},"required":["status","data"]},"Website":{"type":"object","properties":{"id":{"type":"string"},"domain":{"type":"string"},"timezone":{"type":"string"},"currency":{"type":"string"},"logo":{"type":"string","nullable":true},"kpiColorScheme":{"type":"string","nullable":true},"kpi":{"type":"string","nullable":true},"trackingId":{"type":"string"},"apiKeyPrefix":{"type":"string","nullable":true}}},"Workspace":{"type":"object","required":["id","name","organization","role","permissions","isDefault","current"],"properties":{"id":{"type":"string","description":"Send it in the `X-Workspace-Id` header"},"name":{"type":"string"},"organization":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"}}},"role":{"type":"object","required":["key","name"],"properties":{"key":{"type":"string"},"name":{"type":"string"}}},"permissions":{"type":"array","items":{"type":"string","enum":["workspace.read","workspace.manage","posts.read","posts.draft","posts.others","posts.schedule","posts.publish","posts.delete","media.upload","accounts.read","accounts.manage","analytics.read","analytics.sync","ai.generate","members.read","members.manage","tokens.own","tokens.manage","webhooks.read","webhooks.manage","signature.manage","flowsery.write","redreplier.write","claw.use"]}},"isDefault":{"type":"boolean"},"current":{"type":"boolean","description":"True for the workspace this call landed in"}}},"WorkspacesResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Workspace"}}},"required":["status","data"]},"WebsitesResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Website"}}},"required":["status","data"]},"TimelineEntry":{"type":"object","properties":{"type":{"type":"string","enum":["pageview","goal","payment"]},"timestamp":{"type":"string","format":"date-time"},"url":{"type":"string","nullable":true},"eventName":{"type":"string","nullable":true,"description":"Goal name, or `refund` on a reversal entry."},"amount":{"type":"number","nullable":true,"description":"Payment amount; negative on a refund."}}},"VisitorProfile":{"type":"object","properties":{"visitorId":{"type":"string"},"identity":{"type":"object","properties":{"country":{"type":"string","nullable":true},"countryCode":{"type":"string","nullable":true},"region":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"browser":{"type":"object","properties":{"name":{"type":"string","nullable":true},"version":{"type":"string","nullable":true}}},"os":{"type":"object","properties":{"name":{"type":"string","nullable":true},"version":{"type":"string","nullable":true}}},"device":{"type":"object","properties":{"type":{"type":"string","nullable":true}}},"viewport":{"type":"object","properties":{"width":{"type":"integer","nullable":true},"height":{"type":"integer","nullable":true}}}}},"source":{"type":"string","nullable":true,"description":"Acquisition source of the first session."},"sourceIconUrl":{"type":"string","nullable":true},"activity":{"type":"object","properties":{"visitCount":{"type":"integer"},"pageViewCount":{"type":"integer"},"firstVisitAt":{"type":"string","format":"date-time","nullable":true},"lastVisitAt":{"type":"string","format":"date-time","nullable":true},"currentUrl":{"type":"string","nullable":true},"visitedPages":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"timestamp":{"type":"string","format":"date-time"}}}},"completedCustomGoals":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"timestamp":{"type":"string","format":"date-time"}}}}}},"revenue":{"type":"object","properties":{"totalRevenue":{"type":"number","description":"Net of refunds."},"isCustomer":{"type":"boolean"},"timeToFirstConversion":{"type":"number","nullable":true,"description":"Seconds between first visit and first payment."}}},"profile":{"type":"object","nullable":true,"description":"Present once the visitor has been identified.","properties":{"userId":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"email":{"type":"string","nullable":true}}},"activityTimeline":{"type":"array","items":{"$ref":"#/components/schemas/TimelineEntry"},"description":"Newest first."}}},"VisitorProfileResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success"]},"data":{"$ref":"#/components/schemas/VisitorProfile"}},"required":["status","data"]},"TrackGoalRequest":{"type":"object","required":["name"],"properties":{"name":{"type":"string","maxLength":64,"pattern":"^[a-z0-9_-]+$","description":"Lowercase letters, digits, underscores and hyphens only."},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Arbitrary string key/value pairs stored with the completion."},"websiteId":{"type":"string"},"domain":{"type":"string"},"visitorUid":{"type":"string","description":"Ties the completion to a known visitor. Omit for anonymous events."},"sessionUid":{"type":"string"},"timezone":{"type":"string"}}},"TrackPaymentRequest":{"type":"object","required":["amount"],"properties":{"amount":{"type":"number","description":"Major units, e.g. 49.90. On a refund, the amount refunded; `0` clears an earlier refund."},"currency":{"type":"string","default":"USD","description":"ISO 4217 code. Defaults to `USD`."},"transactionId":{"type":"string","description":"Your own payment id, unique across Flowsery. A second payment with the same id answers 409. Required to refund or delete the payment later."},"email":{"type":"string"},"name":{"type":"string"},"customerId":{"type":"string"},"isRenewal":{"type":"boolean","description":"Marks a recurring charge."},"isRefund":{"type":"boolean","description":"Reverses an earlier payment."},"timestamp":{"type":"string","format":"date-time","description":"Defaults to now."},"websiteId":{"type":"string"},"domain":{"type":"string"},"visitorUid":{"type":"string"},"sessionUid":{"type":"string"},"timezone":{"type":"string"}}},"MessageResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success"]},"data":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"}}}}},"required":["status","data"]},"DeleteResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success"]},"data":{"type":"array","items":{"type":"object","properties":{"deleted":{"type":"integer"},"message":{"type":"string"}}}}},"required":["status","data"]}}}}