"Best analytics tool I've used in 14 years"

Authentication and scopes

DataFast has two token types. They look similar, but they are meant for different jobs.

Token types

TokenNameScopeBest for
df_Website API keyOne websiteAnalytics reads, visitor lookup, server-side goals, payments, identify, and selected website-scoped admin actions
dft_Account tokenOne account, optionally limited to specific websitesCLI, AI agents, account automation, website creation, token creation, team management, alerts, funnels, settings

Website API keys (df_)

Use df_ keys when your integration only needs one website.
Create them in Website settings -> Developer. If you are signed in, use the website selector in this docs header to switch the link to another website.

Create a DataFast website API key

You can also create them with the CLI:

datafast websites apikeys create <websiteId> --name "Prod key"

With public website endpoints, the website is inferred from the key:

curl "https://datafa.st/api/v1/analytics/overview" \
  -H "Authorization: Bearer df_xxx"
A df_ key can also call some website-scoped Account API routes, such as listing or creating funnels for its own website. It cannot access account-level resources like /api/v1/admin/access-tokens, cannot create new websites, and cannot perform owner-only team actions.

Account tokens (dft_)

Use dft_ tokens when a script, CLI session, or AI agent needs broader account access.
Create them in Account settings -> API.

Create a DataFast account API token

You can also create them with the CLI:

datafast tokens create --name "AI agent" --permissions "analytics:read,websites:read,funnels:write,alerts:write"

Account tokens can be limited by:

  • Permissions: for example analytics:read, websites:write, funnels:write, or *
  • Website scope: all websites by default, or a fixed list of website IDs
  • Your role on the website: viewers are read-only, members can manage most website settings, and owners can manage team members
When you use a dft_ token with public website endpoints, pass websiteId so DataFast knows which website to query:
curl "https://datafa.st/api/v1/analytics/overview?websiteId=YOUR_WEBSITE_ID" \
  -H "Authorization: Bearer dft_xxx"

Admin endpoints include the website in the path:

curl "https://datafa.st/api/v1/admin/websites/YOUR_WEBSITE_ID/funnels" \
  -H "Authorization: Bearer dft_xxx"

Permissions

Use the smallest permission set that can do the job.

PermissionAllows
analytics:readAnalytics, visitors, realtime, metadata, funnel analytics
goals:writeCreate or delete custom goal events
payments:writeCreate or delete payment events
identify:writeIdentify visitors from your backend
websites:read / websites:writeList and create websites
settings:read / settings:writeRead and update website settings, connect integrations
api-keys:read / api-keys:writeList, create, roll, or revoke website API keys and account tokens
funnels:read / funnels:writeList, create, update, or delete funnels
alerts:read / alerts:writeList, create, update, or delete alerts
team:read / team:writeList, invite, or remove team members. Invite and remove are owner-only
*Full access

For AI agents

For an AI agent that should inspect analytics but not change data, use:

analytics:read,websites:read,settings:read,alerts:read,funnels:read,goals:read

For an AI agent that can manage growth workflows, add write permissions only for the resources it should change:

analytics:read,websites:read,settings:write,funnels:write,alerts:write,api-keys:read
Use Account API for REST automation, or DataFast CLI if the agent can run shell commands.

✍️ Something missing? Suggest features.

🤖 AI agent or LLM? Read this page as markdown