API Reference

Complete reference for the Mergify REST API


Base URL https://api.mergify.com/v1
Authentication

Endpoints take a Mergify credential as a Bearer token:

  • Application Key: created on your Mergify dashboard, CI keys included
  • User Token: issued by mergify auth login
  • OIDC CI Token: what a GitHub Actions job gets by exchanging its ID token. For one hour, it calls the endpoints of that job's repository that its trust policies grant, CI Reporting by default

The exchange, POST /ci/oidc/exchange, takes no Bearer token: the job sends the ID token GitHub signed for it in the request body. See Application Keys to create a key, API Usage to get a user token, and OIDC Authentication for GitHub Actions to let a job exchange its ID token.

Applications

1 endpoint

Manage your Mergify application details.

GET

User

1 endpoint

Look up the GitHub account a user token belongs to.

GET

OIDC Authentication

9 endpoints

Exchange the ID token of a GitHub Actions job for a Mergify OIDC CI token, write the trust policies that allow it, and read the exchanges.

GET POST PATCH DELETE

Queues

7 endpoints

Configure and inspect merge queues for your repositories.

GET PUT DELETE POST

Merge Queue

23 endpoints

Control merge queue state — pause, unpause, and inspect status.

GET POST PUT DELETE PATCH

Scopes

2 endpoints

See which scopes cover the files of a directory, and simulate a change to them.

GET POST

Pull Requests

3 endpoints

Push scopes and other per-pull-request data to Mergify.

PUT POST

Statistics

21 endpoints

Access merge queue and CI performance statistics.

GET

Simulator

3 endpoints

Simulate Mergify behavior on pull requests and configurations.

POST

Activity Log

3 endpoints

Retrieve and aggregate the timeline of Mergify events for a repository.

GET

Scheduled Freeze

5 endpoints

Schedule merge queue freezes for maintenance or release windows.

GET POST PATCH DELETE

CI Insights

3 endpoints

Access data from CI Insights.

GET

Test Engine

22 endpoints

Access data from Test Engine.

GET POST PATCH DELETE

Products

3 endpoints

Choose the Mergify products enabled on a repository, and the defaults for new repositories.

PUT GET

Roles

4 endpoints

Grant, list and revoke the Mergify roles of your organization members.

GET POST DELETE

Integrations

6 endpoints

List and disconnect the Slack channels of your organization, and manage their notifications.

GET DELETE POST PUT

API Version Preview

4 endpoints

API Version endpoints for the Mergify API.

GET POST

Was this page helpful?