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

# API versioning

> How API versions work, how to set one per request or per account, and what support covers.

A version is a named release, such as `2027-01-01.busbar`, and one version covers the Energy API and the Fleet API. Moving to another version can require code changes; compatible changes do not change the version.

## Set the version

Requests use your account's default version. To override it for one request, send the `Flatpeak-Version` header:

```bash theme={"system"}
curl -I --request GET \
  --url "https://fleet-api.flatpeak.com/devices/dev_63a6087272941ef077a8fd3e" \
  --header 'Authorization: Bearer <bearer_token>' \
  --header 'Flatpeak-Version: 2027-01-01.busbar'
```

The response returns the version in its `flatpeak-version` header. A version older than your account default returns `422` `api_version_not_supported`.

To change the default, go to [Console](https://console.flatpeak.com/settings/versions) > **Settings** > **Versions** > **API Versions**. Test the version with the header first, because you cannot downgrade.

## Webhooks

A webhook event uses the version its object was created with, unless you have changed the account default.

## Support

A supported version keeps its endpoints, gets security and bug fixes, and is covered by the [service level agreement](https://flatpeak.com/legal/service-level-agreement). Capabilities are added to the newest version only.


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