# Using Versions

## Check the version a particular HTTP request used

To see what version a particular request to the Peach API was handled using, you can look at the HTTP request's response headers. The `Peach-Version` response header always shows which API version was used.

## Using an API Version

There are three ways that an API Version might be chosen to handle a particular request.

### By API Key

All [API Keys](/developer-tools/api-keys) have an `apiVersion` field associated with them. If you do not otherwise specify which version to use, the request will be handled by the version associated with the API Key you are using to make the request.


```shell
# The request is handled with the API Version associated with the API Key `5be....572`
curl --request GET --url https://api.peach.finance/api/people \
    --header 'X-API-KEY: 5be....572'
```

[Learn more about setting up and using API Versioning with API Keys](/developer-tools/api-keys).

### By Request Header

You may also specify a specific version per request with a request header. Include a `Peach-Version` header in your request and the API will handle the request with that version


```shell
# The request is handled with the API Version associated with the API Key `5be....572`
curl --request GET --url https://api.peach.finance/api/people \
    --header 'Peach-Version: 2023-11-29' \
    --header 'X-API-KEY: 5be....572'
```

### By Default (Latest non-Beta)

If you do not specify a version by API Key or a header then the default API Version is used.

The default API version is the latest API version which is NOT in beta.

There are two contexts in which a default API version might be used for a request:

1. Unauthenticated requests: A few endpoints at Peach do not require any authentication, and thus there will be no API Key to reference to select a version.
2. JWT Auth Tokens: frontend clients built with Peach generally use [JWT Auth Tokens](https://peach-docs-dev.redocly.app/api-docs/api-public/auth/peach.security.handlers.validate_and_send_token). These tokens *DO NOT* have API Versions associated with them, and so will always use the latest API version unless otherwise specified.


> Note: This means when developing frontend applications for Peach you must pin your client code to use a particular version of the Peach API by specifying a particular API Version using the `Peach-Version` header.


## Next steps

- **[API Keys](/developer-tools/api-keys)** — How API keys are tied to API versions.
- **[How to Upgrade](/developer-tools/how-to-upgrade)** — The procedure for moving to a newer API version.