# Versions

> How the API, the webhook and the SDKs are versioned.

## Versions

The API is versioned in its path: every route starts with `/v1`. Within a version, only routes
and optional fields are added; a change that could break your system comes as a new version.

A webhook's `resource_url` names the version your integration is set to, today `/v1`, and an event
keeps the URL it was sent with. You can also build the URL from the event's ids, with the routes on
[the read API](/docs/webhooks/catch-up#the-read-api), so an event you stored still reads once you
have moved to a newer version.

The webhook is versioned by its event types. An event type only gains optional fields. A change
that could break your receiver comes as a new event type, sent beside the old one until you have
moved to it; the old one stops only after the [changelog](/docs/changelog) has announced it.

While both are sent, each fact comes twice, under two `event_id`s. Handle it once: skip an event
whose fact you have already handled, whichever of the two types brought it. A fact is its id and
what happened: the `checkup_id` of a completed checkup, the `patient_id` of a registered member.

So that new fields never break you:

- Ignore fields you do not know.
- Keep codes you do not know, such as a new biomarker.
- Answer `2xx` to a webhook event you do not handle.

## The SDKs

Each SDK has its own version, and these pages say which one they describe: Web SDK 0.8.0 and
the Flutter SDK's packages 0.6.0, tagged `v0.6.0`. The Web SDK's script
is pinned to its version, but its checkup is always YOU(th)'s current release, which the checkup
names in its `ready` message. The Web SDK's messages carry their own version, `v`, which changes
only when a message changes in a way that could break your page. In both SDKs, each result names the model that produced it and that model's version: a face
video model's version is fixed by the SDK release that measured, and the service names the version
of a voice or a selfie result. See [What a biomarker holds](/docs/sdks/results#what-a-biomarker-holds).

Before an SDK reaches 1.0, a release can rename or remove something; each such change is announced
in the [changelog](/docs/changelog), with what to do. New biomarkers, fields and codes can arrive in any release, so read
[results](/docs/sdks/results#write-for-what-can-change) as that page says. Pin the Flutter packages
to a release, and upgrade on purpose.

A few SDK pages are marked Preview: what such a page describes is not live yet, and a change can
break it until it is. Each change is listed in the [changelog](/docs/changelog).
