# Versioning

> How the Duty API is versioned, which changes can happen within a version and how a version is retired.

The version is part of every path: `/v1/tickets`. Every response names the version that answered in the `API-Version` header.

## Within a version

A version only grows. These changes can ship at any time:

- new endpoints;
- new optional fields in request bodies and new query parameters;
- new fields in responses;
- new error keys, new webhook events, and new values of open lists such as statuses (each workspace defines its own).

Write your integration so that it ignores fields and values it doesn't know. Anything else is a breaking change and ships as a new version.

## Retiring a version

When a new version replaces one, the old one keeps working for a period announced in advance. Meanwhile each of its responses carries:

```http
Deprecation: @1798761600
Sunset: Wed, 30 Jun 2027 00:00:00 UTC
Link: </v2/docs>; rel="successor-version"
```

- `Deprecation`: when the version was deprecated.
- `Sunset`: the date it stops answering.
- `Link`: the version that replaces it.

Log these headers when you see them so your team hears about the change early. After the sunset date, the old version answers `API_VERSION_UNSUPPORTED` with the list of versions available.

The current version is **v1**, with no retirement planned.
