API reference overview

The Flax programmatic REST API — base URL, authentication, content types, versioning, and the machine-readable OpenAPI spec.

The Flax REST API lets you run queries and manage sheets, charts, dashboards, and schedules programmatically. It is the same surface the MCP server is built on. For the machine-readable contract, see the OpenAPI spec.

#Base URL

All endpoints live under /api on your Flax host:

https://flax-analytics.com/api

#Authentication

Every request authenticates with a service-account API token (flax_pat_...) sent as a Bearer token. See Authentication to create one.

curl https://flax-analytics.com/api/charts \
  -H "Authorization: Bearer flax_pat_..."

A token carries a read or write scope, and every request is additionally constrained by the service account's team memberships and row-level security. The API grants no privilege the account does not already have.

#Requests and responses

  • Request and response bodies are JSON (Content-Type: application/json).
  • Timestamps are ISO-8601 UTC.
  • Errors use a consistent envelope — see Errors & limits.

#Versioning

The API is versioned by the OpenAPI document's info.version. Backward-incompatible changes ship under a new major version; additive changes (new endpoints, new optional fields) do not.

#Resource groups

Group Reference
Run and inspect queries Queries
Spreadsheet workbooks Sheets
Saved visualizations Charts
Dashboards & layout Dashboards
Warehouse connections Connections
Semantic projects & models Models
Scheduled deliveries Schedules
Automations Actions
Members, service accounts, embed tokens Orgs & admin