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

# VPP quickstart

> Prepare a device, switch VPP on and start an enrollment through Connect.

Start from a working [tariff integration](/docs/energy-api/guides/quickstart.md): a user, a location with a connected tariff, and a device. If the location has no tariff, Connect asks the user to connect one first.

### 1. Prepare the device

Add the hardware identity and capabilities with [update a device](/docs/energy-api/reference/devices/update.md).

* `hardware.hardware_id`: the serial number, or the VIN for a vehicle.
* `capabilities`: one block per subsystem, such as `battery`, `inverter`, `evse` or `vehicle`.

```bash Request example theme={"system"}
curl --request PATCH \
  --url https://energy-api.flatpeak.com/devices/dev_9c1f70a4e2b6485db3f0c8a1 \
  --header 'Authorization: Bearer <bearer_token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "hardware": {
    "hardware_id": "PU2426A103557",
    "manufacturer": "Nova Systems",
    "model_code": "PICOXN2",
    "model_name": "Pico Ultimate"
  },
  "capabilities": {
    "battery": {
      "capacity_kwh": 14.2,
      "power_kw": 7.2
    }
  }
}'
```

### 2. Switch VPP on

Switch **VPP** on for your account in [Console](https://console.flatpeak.com/settings) > **Settings**; Connect offers no program until it is on. The switch sets the default for `vpp_enabled` on every device.

The [test VPP programs](/docs/energy-api/guides/platform/test-vpp-programs.md) ignore the switch, so build with them first.

To opt one device in or out, set its `vpp_enabled`:

```bash Request example theme={"system"}
curl --request PATCH \
  --url https://energy-api.flatpeak.com/devices/dev_9c1f70a4e2b6485db3f0c8a1 \
  --header 'Authorization: Bearer <bearer_token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "vpp_enabled": true
}'
```

### 3. Launch Connect

Create a Connect session for the device. Sessions are single-use and expire after 48 hours.

```bash Request example theme={"system"}
curl --request POST \
  --url https://energy-api.flatpeak.com/connect-sessions \
  --header 'Authorization: Bearer <bearer_token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "device_id": "dev_9c1f70a4e2b6485db3f0c8a1",
  "connect_url": "https://busbar.connect-web.flatpeak.com",
  "callback_url": "myapp://flatpeak/complete"
}'
```

```json Response example theme={"system"}
{
  "id": "cos_6a40d6e74440857d4e098d96",
  "object": "connect_session",
  "live_mode": true,
  "time_created": "2026-06-15T10:00:00Z",
  "time_expiry": "2026-06-17T10:00:00Z"
}
```

Open Connect with `flow` set to `VPP`:

```http theme={"system"}
https://busbar.connect-web.flatpeak.com/?connect_session=cos_6a40d6e74440857d4e098d96&flow=VPP
```

The user selects a program, consents and enrolls, and Connect then returns to your `callback_url`.

![The Connect VPP flow: program selection, consent and enrollment](https://mintcdn.com/flatpeak-d495c19e/2B6nWUU4-c2pSD3E/images/busbar/connect-vpp-flow.png?fit=max\&auto=format\&n=2B6nWUU4-c2pSD3E\&q=85\&s=9efc65d77d75d3f36ead69b36ec8101b)

Connect VPP flow

> [!TIP]
>
> With a test-mode secret key and an Antarctic Energy tariff, Connect offers the [test VPP programs](/docs/energy-api/guides/platform/test-vpp-programs.md).

## Next steps

> [card] [Enrollment](/docs/energy-api/guides/vpp/enrollment.md)
>
> Programs, telemetry and the enrollment lifecycle.

> [card] [Dispatch](/docs/energy-api/guides/vpp/dispatch.md)
>
> Fetch instructions, apply them and confirm them.


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