> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Start a Connect session

> The single Connect endpoint: start a session, respond to a route, and the fields every response carries.

Connect has one endpoint, `https://connect.flatpeak.com`. The `route` field in the body names the step, and each response names the route to render next, so handle every route Connect returns.

## Start

POST `route` `session_start` with the ID from [create a Connect session](/docs/energy-api/reference/connect-sessions/create.md). The session ID authenticates every request.

| `flow` | Result |
| :- | :- |
| `TARIFF` | Starts tariff connection. Every implementation must support it. |
| `VPP` | Starts the VPP flow, which is optional. |
| `AUTO` | Picks the flow from the session context. |

`ui` sets the color mode of the hosted WebView: `LIGHT` (default) or `DARK`. See [Color mode](/docs/energy-api/reference/connect/tariff/color-mode.md). Omit it when you build your own UI.

```bash Your request theme={"system"}
curl --request POST \
  --url https://connect.flatpeak.com \
  --header 'Content-Type: application/json' \
  --data '{
  "connect_session": "cos_6587fa4362341be5b524de3b",
  "route": "session_start",
  "flow": "TARIFF"
}'
```

Subscribe to `connect_session.complete` to know when the user finishes. See [Events](/docs/energy-api/guides/platform/events.md).

## Respond

Every response carries `route` and `data`, and most carry `actions`. Answer on the same route, in one of two ways:

* Send `data`: the fields the route collects. Each route page shows them.
* Send `action`: one value from the response's `actions` array. Never send an action that is not listed. Some actions take an `action_context`; the route page says which.

```bash Send an action theme={"system"}
curl --request POST \
  --url https://connect.flatpeak.com \
  --header 'Content-Type: application/json' \
  --data '{
  "connect_session": "cos_6587fa4362341be5b524de3b",
  "route": "supplier_select",
  "action": "BACK"
}'
```

## Device type

Every response carries `data.device_type` and `data.location` (`timezone`, `currency_code`). `device_type` selects the noun your UI uses for the device:

| `device_type` | Your UI reads |
| :- | :- |
| `BATTERY_STORAGE` | "your battery" |
| `ELECTRIC_VEHICLE` | "your vehicle" |
| `EV_CHARGER` | "your charger" |
| `AIR_CONDITIONER` | "your air conditioner" |
| `HEAT_PUMP` | "your heat pump" |
| `WATER_HEATER` | "your water heater" |
| `PV_SYSTEM` | "your solar system" |
| `POWER_GENERATOR` | "your generator" |
| `OTHER` | "your device" |

Select whole translated strings per type and do not substitute the noun into a template, as [Asset vocabulary](/docs/energy-api/guides/tariffs/connect.md#asset-vocabulary) explains. Hosted Connect does this for you.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.