API Versions
How a request to the Mergify API names a dated version, which version it gets when it names none, and how long Mergify serves each one.
The Mergify API is versioned by date. A version sets the operations the API serves and what they accept and return. Mergify adds operations and fields to every version it serves, but a change that would break a caller, such as removing an operation, only comes in a new version: a script keeps working until you move it.
Every version is served at https://api.mergify.com/v1. /v1 is the API’s
address, not its version.
| Version | What it changes |
|---|---|
2026-11-16 |
The initial version: the API as it was before it had versions. |
2026-11-20 |
No longer serves 25 deprecated operations. |
Naming a version
Section titled Naming a versionA request names the version it is written for in its Mergify-Version header,
as a date:
curl -H "Authorization: Bearer <your-application-key>" \ -H "Mergify-Version: 2026-11-16" \ https://api.mergify.com/v1/applicationThe response names the version that served it in the same header,
Mergify-Version: 2026-11-16 here.
A request naming a version Mergify does not serve is refused with 400, error
code API_VERSION_UNKNOWN, and a served_versions field listing the dated
versions it serves: name one of those instead. On an on-premise installation, a client
newer than the installation gets the same 400: upgrade
Mergify, or use an older release of the client.
Which version a request gets
Section titled Which version a request getsAn organization’s version is set by the first request one of its application keys makes without naming a version. It is set to the newest version released when the organization’s oldest application key was created: an organization new to the API starts on the newest version, and one whose keys are older keeps the version its scripts were written against.
To keep a caller on one version whatever the organization’s is, name that version in its requests.
The Mergify CLI and the test framework plugins (pytest-mergify, rspec-mergify, minitest-mergify and the JavaScript reporters) name the version their release was built against, whatever the organization’s version, until you upgrade them. Keep them on their latest release.
Trying the next version
Section titled Trying the next versionName next in the Mergify-Version header to try the version Mergify is
preparing: the breaking changes collected since the newest release. It changes
without notice and is not for production.
How long a version is served
Section titled How long a version is servedMergify serves a version for at least 12 months after the version that supersedes it is released.
Before a version stops being served, every response served at it carries the
date it stops in a Mergify-Version-Sunset header:
Mergify-Version: 2026-11-16Mergify-Version-Sunset: YYYY-MM-DDBefore that date, move its callers: name a newer version in their requests. The Mergify CLI and the test framework plugins warn their users when a response carries this header: upgrade them to a release that names a newer version.
Was this page helpful?
Thanks for your feedback!