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.
There are three ways that an API Version might be chosen to handle a particular request.
All 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.
# 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.
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
# 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'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:
- 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.
- JWT Auth Tokens: frontend clients built with Peach generally use JWT Auth Tokens. 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-Versionheader.
- API Keys — How API keys are tied to API versions.
- How to Upgrade — The procedure for moving to a newer API version.