Versioning

The API changes by adding to it. When a change would break an app already built on it, it ships as a new version named by its date, and your app keeps getting the version it was built against until you choose to upgrade. The newest version is 2026-11-17.

Your app's version

When you register an app it is pinned to the newest version, and every call it makes gets that version's shapes. Apps registered before dated versioning began are pinned to the first version, 2026-11-17. Your app's version is shown under Your apps, where you can move it once you have tested the newer shapes.

To try a version on one call, send it in the Imprest-Version header. The header wins over the pin for that request. Every response names the version it was served in, in the same header.

Asking for a version
curl https://imprest.ai/api/v1/invoices \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Imprest-Version: 2026-11-17"

A date that isn't a version is refused with 400 and error_code: "invalid_api_version"; error_data.versions lists the versions that exist.

What counts as breaking

Ships in a new version

  • Removing or renaming an endpoint, a field in a response, or a parameter
  • Changing a field's or a parameter's type (an integer becoming a string, an object becoming a list)
  • Making an optional parameter required, or adding a required one
  • No longer accepting a value a parameter accepted

Ships to every version

  • New endpoints
  • New fields in a response
  • New optional parameters
  • New values in a response field that lists values (a new status, a new error_code)
  • Wording changes in error messages and descriptions

So build your client to ignore fields it doesn't know and to handle a status or error code it hasn't seen. Every pull request to Imprest is checked against the published spec, and a breaking change without a new version can't merge.

Retiring a version

Old versions keep working. When one is retired it is given a sunset date at least six months ahead, shown in the changelog below, and from then on every response in it carries a Sunset header with that date (RFC 8594), so you can find the calls that need upgrading in your own logs.

Changelog

  1. 2026-11-17

    November 17, 2026Newest

    The first dated version: every endpoint as it stood when dated versioning began. Apps registered before this date are pinned to it.