Building reliably
Versioning
The API's major version is in the path. Within a major version it only gains things: an integration written against version 1 today keeps working for as long as version 1 exists.
The rule for version 1#
The current version is 1.1, served under /public/v1. Within version 1 the API is additive only.
| Can happen at any time | Will not happen within version 1 |
|---|---|
| A new endpoint | An endpoint removed |
| A new optional request field or parameter | A new required request field or parameter |
| A new field in a response | A response field removed, renamed or changed in type |
| A new value in a response enumeration, such as a status or a severity | An existing value changing its meaning |
| A new error code, webhook event or field in an event | An existing error code or event renamed |
This is enforced, not promised: the contract is frozen as a baseline, and a change that removes a field, changes a type or adds a required input fails the API’s own build.
Because things are added, ignore fields you do not recognise, and handle a status, a severity, an error code or an event type you have not seen before without failing. The SDKs keep unknown fields available rather than dropping them.
The version header#
Every response carries ExportFlow-Api-Version with the revision of the API that answered. The first number is the major version, the one in the path. The second rises when something is added.
ExportFlow-Api-Version: 1.1You do not send a version: the path selects it. The SDKs check the major version on every response and raise an error rather than misread an answer from a different major version.
Deprecation#
If an endpoint is ever to be withdrawn, it is announced at least six months ahead, in the changelog. Until it goes, the endpoint keeps working and answers with two extra headers, so a client can notice without anybody reading an announcement:
ExportFlow-Api-Version: <current version>
Deprecation: <when it was deprecated>
Sunset: <when it stops answering>Log a warning when you see Deprecation on a response. Nothing in version 1 is deprecated today.
A change that cannot be made additively would be a new major version at a new path, /public/v2, with version 1 continuing beside it through its own notice period.
SDK versions#
The SDKs follow semantic versioning, separately from the API. A major SDK version can change the SDK’s own interface; a minor version adds to it; a patch fixes it. Each SDK release says which API version it speaks. See SDK versions.
ExportFlow can set an oldest supported version for each SDK. A request from an older SDK is answered 426 with the code sdk_version_unsupported, and the message says to upgrade. This is used only when an old release has a defect that makes it unsafe to keep serving, and it never applies to requests that do not come from an SDK. A minimum is announced in the changelog before it is applied.
Migration notes#
There are none. Version 1 is the first version of the API, nothing in it is deprecated, and no change so far needs action from an integrator. When one does, the steps will be listed here, by date, with the version they apply from.