Source: https://datafa.st/docs/api/website
Markdown source: https://datafa.st/docs/api/website.md
Description: Read analytics and send events for one website with a df_ website API key.

# Website API

Use the Website API when you want to read analytics or send events for one website. These endpoints are usually authenticated with a `df_` website API key.

A website API key is scoped to one website, so you do not need to pass `websiteId` for most Website API requests. This makes it a good fit for backend integrations, scripts, dashboards, and AI agents that should not manage your full DataFast account.

## Get a website API key

Create website API keys in [Website settings -> Developer](/dashboard#website-api-key). 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](/blog-how-to-get-datafast-website-api-key.jpg.jpg)

## What you can do

| Category | Endpoints | Use it for |
|---|---|---|
| Analytics | [Analytics](/docs/api/website/analytics), [Breakdowns](/docs/api/website/breakdowns), and [Funnel analytics](/docs/api/website/analytics/funnel-results) | Query dashboard-style analytics |
| Visitors | [Visitors](/docs/api/website/visitors) | Search and inspect visitor journeys |
| Funnels | [Funnel analytics](/docs/api/website/analytics/funnel-results) | Query step-by-step funnel results |
| Events | [Goals](/docs/api/website/goals), [Payments](/docs/api/website/payments), [Identity](/docs/api/website/identity) | Send server-side events and user profiles |

## Token choice

- Use a `df_` website API key for one website.
- Use a `dft_` account token only if you need to query multiple websites from one token. When using `dft_` on Website API endpoints, pass `websiteId` as a query parameter.

Read [authentication and scopes](/docs/api/authentication) for the full difference.

## Try it

Use the [API playground](/docs/api/playground) to test Website API and Account API endpoints from the browser.
