---
title: "Erste Schritte mit der Flowsery Analytics API"
description: "Mit der Flowsery Analytics API greifen Sie programmgesteuert auf Ihre Analysedaten zu: von benutzerdefinierten Zielen bis zu Besucherdetails und Umsätzen."
url: "https://flowsery.com/de/docs/api-introduction"
---

# Erste Schritte mit der Flowsery Analytics API

Mit der Flowsery Analytics API können Sie programmgesteuert auf Ihre Analysedaten zugreifen – vom Tracking benutzerdefinierter Ziele bis zum Abrufen von Besucherdetails und mehr.

## 1. Create an API token or website key

Create a **workspace API token** from the workspace **API Tokens** page when you need programmatic access across every website in your workspace, including MCP and OpenClaw integrations. Workspace tokens use the `flow_ws_` prefix.

Create a **website API key** from a website's **Settings > API** page when you only need server-to-server access for one website, such as custom payment or goal tracking. Website keys use the `flow_` prefix.

Copy new secrets immediately because they are shown only once. Treat them like passwords: store them securely and never expose them in client-side code or public repositories.

## 2. Authenticate your requests

Every API call must include the `Authorization` header using the Bearer scheme. Substitute `YOUR_API_TOKEN` with the token or key you created.

`Authorization: Bearer YOUR_API_TOKEN`

## 3. Choose a website for workspace tokens

The base URL for all v1 endpoints is:
`https://analytics.flowsery.com/analytics/api/v1/`

When you authenticate with a workspace token, call [List websites](https://flowsery.com/docs/api-websites) first. Then pass either `websiteId` or `domain` to endpoint requests. For `GET` and `DELETE` endpoints, pass the selector as a query parameter. For `POST` endpoints such as goals and payments, pass it in the JSON body.

Website API keys are already scoped to one website, so they do not require `websiteId` or `domain`.

Here are a few common use cases to get you started:

- [List websites](https://flowsery.com/docs/api-websites)
- [Track a custom goal](https://flowsery.com/docs/api-create-goal)
- [Fetch visitor details](https://flowsery.com/docs/api-get-visitor)
- [Retrieve time series data](https://flowsery.com/docs/api-timeseries)

---

**Erfolgreiche Antworten** geben den Statuscode `200 OK` mit folgendem Body zurück:

```json
{
  "status": "success",
  "data": { ... }
}
```

**Fehlerantworten** geben den entsprechenden HTTP-Statuscode (4xx oder 5xx) mit folgendem Body zurück:

```json
{
  "status": "error",
  "error": {
    "code": HTTP_STATUS_CODE,
    "message": "A descriptive error message"
  }
}
```

Standard-Fehlercodes:

- `400 Bad Request`: Die Eingabe ist ungültig oder erforderliche Parameter fehlen.
- `401 Unauthorized`: Der API-Token fehlt, ist ungültig, abgelaufen oder für diesen Endpunkt nicht zulässig.
- `404 Not Found`: Die angeforderte Ressource existiert nicht (z.B. unbekannter Besucher).
- `500 Internal Server Error`: Ein unerwartetes Problem ist auf dem Server aufgetreten.
