# Versioning

Keyed requests name the API version in a header:

```text
qg-version: v1
```

- A missing header gives `400 API_VERSION_MISSING`; another value gives `400 INPUT_INVALID` (`details[0].field` `qg-version`).
- Keyless endpoints need no version header.

## What changes within v1

- New response fields and new optional parameters can appear at any time. Clients ignore fields they do not know.
- New error names and new `data.reason` values can appear; handle unknown names by HTTP status.
- New chains and tokens appear in `/swap/chains`, `/gasless/chains` and `/tokens`.
- A chain where gasless is switched on changes `enabled` in `/gasless/chains` from `false` to `true`.

## Breaking changes

A change that removes or renames a field, or changes its meaning, ships only as a new version (`v2`). `v1` keeps working for at least 6 months after `v2` is released, and its responses then carry the `Deprecation` and `Sunset` headers.

Every change is listed in the [Changelog](changelog.md).
