api-reference

1. Create an API token or website key

Create a workspace API token from the API Tokens page when you need programmatic access across every website in your workspace, including MCP and OpenClaw integrations. Workspace tokens use the <code>flow_ws_</code> prefix. For server-to-server tracking for one website, create a website API key from that website's Settings > API page; website keys use the <code>flow_</code> prefix. Copy new tokens immediately because the secret is shown only once.

2. Authenticate your requests

Every API call must include the Authorization header using the Bearer scheme. Use a <code>flow_ws_</code> workspace token for multi-website API access, or a <code>flow_</code> website key for a single website.

Authorization header
Authorization: Bearer YOUR_API_KEY

3. Start making requests

The base URL for all v1 endpoints is: <code>https://analytics.flowsery.com/api/v1/</code>. With a workspace token, call <code>GET /websites</code> first, then pass <code>websiteId</code> or <code>domain</code> to endpoint requests. Website keys are already scoped to one website and do not need a selector.

Response format

Successful responses return a 200 OK status with a body structured as:

Success response
{
  "status": "success",
  "data": { ... }
}

Errors use the normal NestJS HTTP error response shape.

Error response
{
  "message": "Unauthorized",
  "statusCode": 401
}

Standard error codes

<strong>400 Bad Request</strong> -- The input is invalid or required parameters are missing.<br /><strong>401 Unauthorized</strong> -- The API token is missing, invalid, expired, or not accepted for this endpoint.<br /><strong>404 Not Found</strong> -- The requested resource does not exist.<br /><strong>500 Internal Server Error</strong> -- An unexpected issue occurred on the server.
Example request (curl)
curl --request GET \
  --url https://analytics.flowsery.com/analytics/api/v1/websites \
  --header 'Authorization: Bearer <workspace-api-token>'
200
{
  "status": "success",
  "data": [
    {
      "id": "cm8abc123",
      "domain": "example.com",
      "timezone": "America/New_York",
      "currency": "USD",
      "trackingId": "flid_abc123"
    }
  ]
}