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

Fetch analytics data segmented by custom goals.

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).
Example request (curl)
curl --request GET \
  --url https://analytics.flowsery.com/analytics/api/v1/goals \
  --header 'Authorization: Bearer <api-key>'
200
{
  "status": "success",
  "data": [
    {
      "id": "goal_123",
      "createdAt": "2026-04-01T10:15:00.000Z",
      "updatedAt": "2026-04-14T08:30:00.000Z",
      "name": "newsletter_signup",
      "description": null,
      "isServer": false,
      "completions": 49730,
      "visitors": 27797
    },
    {
      "id": "goal_124",
      "createdAt": "2026-04-02T09:00:00.000Z",
      "updatedAt": "2026-04-14T08:30:00.000Z",
      "name": "payment",
      "description": "Tracked from the backend",
      "isServer": true,
      "completions": 35100,
      "visitors": 30807
    }
  ],
  "pagination": {
    "limit": 5,
    "offset": 0,
    "total": 48
  }
}