API versioning
How the dated Api-Version header works, and how we change the API.
The API has two parts in its version. The URL has a major version: /v1. A dated version selects the details: Api-Version: 2026-11-16. The changelog lists each dated version.
How a request gets its version
- The
Api-Versionrequest header is optional. Its value is a date in the formatYYYY-MM-DD. - The first request of a workspace pins a version. It is the version of the header, or the newest version when there is no header.
- A later request without the header uses the version that the workspace pinned.
- A header on a later request changes that one request. It does not change the pinned version.
- Each response has an
Api-Versionheader with the version that the request used. - An unknown or malformed value returns
400api_version_unsupported. The message lists the known versions. - The events of a webhook have the field
api_version: the version of the workspace when the event was made.
curl https://api.afffast.com/v1/workspace \
-H "Authorization: Bearer $AFFFAST_API_KEY" \
-H "Api-Version: 2026-11-16"What can change inside a version
Inside one dated version, we make additive changes only. You must write your code so that it accepts them:
- A new operation, a new optional parameter or a new field in a response.
- A new value in an enum, for example a new event type or a new network.
- A new error code for a new feature.
A change that breaks a client gets a new dated version. Examples: remove or rename a field, change the type of a field, make an optional parameter required. We keep an old dated version for at least 24 months. The changelog says when we plan to remove a version.
Do not depend on the order of the fields, the text of a message or the length of an ID.
The present versions
The newest version is 2026-11-16. Each version has an entry in the changelog.