api-referenceGET
GEThttps://analytics.flowsery.com/analytics/api/v1/channels

Fetch analytics data segmented by acquisition channel.

Bearer Token (workspace token or website API key)

Workspace Tokens Need a Website Selector

Workspace API tokens can access every website in the workspace. Pass either <code>websiteId</code> or <code>domain</code> so Flowsery knows which website to query or mutate. Website API keys are already scoped to one website, so the selector can be omitted.

Website Selector

ParameterTypeDescription
websiteIdstringWebsite ID to use with a workspace API token. Omit when authenticating with a website API key.
domainstringWebsite domain to use with a workspace API token when websiteId is not provided. Omit when authenticating with a website API key.

Query Parameters

ParameterTypeDescription
startAtstringISO 8601 start date/time (e.g. 2024-01-01T00:00:00Z). Defaults to the last 30 days when omitted.
endAtstringISO 8601 end date/time. Defaults to now when omitted.
timezonestringTimezone for aggregation (e.g., UTC, America/New_York). Falls back to the site's configured timezone.
limitnumberMaximum rows to return (1-1000, default: 100).
offsetnumberRows to skip for pagination (min 0, default: 0).

Filter Parameters

ParameterTypeDescription
filter_countrystringCountry name as returned by /countries, e.g. United States. Use | for several values, ! to exclude and ~ to match part of the value.
filter_regionstringRegion or state name as returned by /regions, e.g. California.
filter_citystringCity name.
filter_devicestringDevice type: Desktop, Mobile or Tablet. Values are case-sensitive.
filter_browserstringBrowser name. Safari includes Mobile Safari automatically.
filter_osstringOperating system (Mac OS, Windows, iOS, Android).
filter_referrerstringReferrer as returned by /referrers: a source name such as Google for recognized sites, otherwise the domain.
filter_refstringThe ref URL parameter value.
filter_sourcestringThe source URL parameter value.
filter_viastringThe via URL parameter value.
filter_utm_sourcestringUTM source.
filter_utm_mediumstringUTM medium.
filter_utm_campaignstringUTM campaign.
filter_utm_termstringUTM term.
filter_utm_contentstringUTM content.
filter_pagestringPage path or URL.
filter_entry_pagestringEntry page path or URL.
filter_hostnamestringHostname/domain.
filter_channelstringMarketing channel.
filter_goalstringGoal name.

Response Fields

Each item in the <code>data</code> array contains the channel name as <code>value</code>, visitor count, revenue split into <code>newRevenue</code> and <code>renewalRevenue</code>, and its share of visitors as <code>percentage</code>. Channel names are Direct, Organic search, Paid search, Organic social, Paid social, Referral, Email, A.I., Display, Video, Affiliate, SMS and Audio.

Combining Filters

Separate several values inside one filter parameter with |. Pass a channel name to <code>filter_channel</code> on any other report to narrow it to that channel (e.g., <code>filter_channel=Organic search|Paid search</code>).
Example Request (Curl)
curl --request GET \
  --url 'https://analytics.flowsery.com/analytics/api/v1/channels?limit=5' \
  --header 'Authorization: Bearer <api-key>'
200
{
  "status": "success",
  "data": [
    {
      "value": "Organic search",
      "visitors": 4120,
      "revenue": 8340,
      "newRevenue": 6910,
      "renewalRevenue": 1430,
      "percentage": 38.6
    },
    {
      "value": "Direct",
      "visitors": 2870,
      "revenue": 5120,
      "newRevenue": 4080,
      "renewalRevenue": 1040,
      "percentage": 26.9
    },
    {
      "value": "Organic social",
      "visitors": 1640,
      "revenue": 1980,
      "newRevenue": 1760,
      "renewalRevenue": 220,
      "percentage": 15.4
    },
    {
      "value": "Referral",
      "visitors": 1210,
      "revenue": 2450,
      "newRevenue": 2010,
      "renewalRevenue": 440,
      "percentage": 11.3
    },
    {
      "value": "Email",
      "visitors": 830,
      "revenue": 1760,
      "newRevenue": 1290,
      "renewalRevenue": 470,
      "percentage": 7.8
    }
  ],
  "pagination": {
    "limit": 5,
    "offset": 0,
    "total": 9
  }
}