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

Fetch analytics data segmented by campaign parameters.

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.

Optional parameters

ParameterTypeDescription
startAtstringISO 8601 start date/time. 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 your 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 or code. Use | for multiple values and ! to exclude values.
filter_regionstringRegion or state.
filter_citystringCity name.
filter_devicestringDevice type. Use backend values such as Desktop|Mobile|Tablet, and ! to exclude.
filter_browserstringBrowser name. Safari includes Mobile Safari automatically.
filter_osstringOperating system.
filter_referrerstringReferrer domain or well-known name.
filter_refstringThe ref URL parameter.
filter_sourcestringThe source URL parameter.
filter_viastringThe via URL parameter.
filter_utm_sourcestringUTM source.
filter_utm_mediumstringUTM medium.
filter_utm_campaignstringUTM campaign.
filter_utm_termstringUTM term.
filter_utm_contentstringUTM content.
filter_pagestringPage path.
filter_entry_pagestringEntry page path.
filter_hostnamestringHostname/domain.
filter_channelstringMarketing channel.
filter_goalstringGoal name.
Example request (curl)
curl --request GET \
  --url https://analytics.flowsery.com/analytics/api/v1/campaigns \
  --header 'Authorization: Bearer <api-key>'
200
{
  "status": "success",
  "data": [
    {
      "campaign": {
        "utm_source": "",
        "utm_medium": "",
        "utm_campaign": "",
        "utm_term": "",
        "utm_content": "",
        "ref": "indiepage",
        "source": "",
        "via": ""
      },
      "visitors": 2150,
      "revenue": 3420,
      "renewalRevenue": 810,
      "percentage": 43.4
    },
    {
      "campaign": {
        "utm_source": "newsletter.example.com",
        "utm_medium": "email",
        "utm_campaign": "product-launch-2025",
        "utm_term": "",
        "utm_content": "",
        "ref": "",
        "source": "",
        "via": ""
      },
      "visitors": 1840,
      "revenue": 2890,
      "renewalRevenue": 540,
      "percentage": 37.1
    },
    {
      "campaign": {
        "utm_source": "",
        "utm_medium": "",
        "utm_campaign": "",
        "utm_term": "",
        "utm_content": "",
        "ref": "",
        "source": "",
        "via": "partner"
      },
      "visitors": 920,
      "revenue": 1450,
      "renewalRevenue": 210,
      "percentage": 18.5
    }
  ],
  "pagination": {
    "limit": 100,
    "offset": 0,
    "total": 138
  }
}