# Versioning

Source: https://developers.newjune.co/versioning

> What v1 promises, what can change without notice, and how breaking changes will arrive.

The version is in the path: every endpoint lives under `/v1`. Version 1 is in **preview** while the first integrations come online, but its contract already holds.

## What v1 promises

Within v1 we only make **additive** changes, and we may make them without notice:

- New endpoints and new resources.
- New optional query parameters.
- New fields on existing objects.
- New values in enums (for example a new round `status`).
- New error codes.
- Longer or reworded descriptions and error messages.

Write clients that tolerate these:

- Ignore fields you do not recognize.
- Handle enum values you do not recognize, for example by treating them as "other".
- Branch on `error.type` as a fallback when `error.code` is new to you.
- Never depend on the order of fields in an object.

## What would be breaking

These changes never happen within v1:

- Removing or renaming an endpoint, field, query parameter, or error code.
- Changing a field's type, its unit, or whether it can be null.
- Changing what an existing enum value or error code means.
- Changing the order of a list, the list envelope, or the error envelope.
- Making an optional parameter required, or narrowing the values a parameter accepts.

A breaking change ships as a new version (`/v2`). v1 keeps working alongside it, and the [changelog](https://developers.newjune.co/changelog) will announce the new version and the date v1 stops working, with time to migrate.

## Staying current

- The [changelog](https://developers.newjune.co/changelog) lists every change to the API.
- The OpenAPI document at [`/openapi.json`](https://developers.newjune.co/openapi.json) always describes the current API. Diff it to spot additions.
