Merge Queue

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


Get branches with active merge queues #

GET /repos/{owner}/{repository}/merge-queue/branches

Get the list of branches that currently have active merge queues

Admin Application Key Mergify User Token GitHub Token
repository string required

The name of the repository

min length: 1 · max length: 100 · pattern: ^[\w\-\.]+$

owner string required

The owner of the repository

min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$

200 Successful Response
branchesstring[]required

List of branches with active merge queues

Example Response
                          {
  "branches": [
    "string"
  ]
}
                        
403 Forbidden
404 Not found
409 Conflict
422 `CONFIGURATION_INVALID`: The repository's Mergify configuration is invalid. `extended_repository` names the repository its `extends` points to when the error is in that repository's configuration file, and is null otherwise, including when the error only appears once the two configurations are merged. The route's other 422s carry no `error_code`.
detailstringrequired
error_code"CI_ADMIN_ROLE_REQUIRED" | "CI_ID_TOKEN_AUDIENCE_REFUSED" | "CI_ID_TOKEN_EXCHANGE_NOT_ENABLED" | "CI_ID_TOKEN_EXPIRED" | "CI_ID_TOKEN_INVALID" | "CI_ID_TOKEN_ISSUER_REFUSED" | "CI_ID_TOKEN_ISSUER_UNAVAILABLE" | "CI_ID_TOKEN_NO_MATCHING_TRUST_POLICY" | "CI_ID_TOKEN_NO_TRUST_POLICY" | "CI_ID_TOKEN_REPOSITORY_NOT_INSTALLED" | "CI_TOKEN_SCOPES_TARGET_REFUSED" | "CI_TRACES_UPLOAD_UNUSABLE" | "CI_TRUST_POLICY_NAME_TAKEN" | "COMMAND_RESTRICTED" | "CONFIGURATION_BRANCH_REFUSED" | "CONFIGURATION_INVALID" | "CONFIGURATION_REFUSED_BY_REPOSITORY_RULES" | "CONFIGURATION_SIGNED_COMMITS_REQUIRED" | "DEFAULT_BRANCH_NOT_FOUND" | "GITHUB_ACCOUNT_SUSPENDED" | "GITHUB_APP_ACCESS_LOST" | "GITHUB_RATE_LIMITED" | "GITHUB_UPSTREAM_REQUEST_FORBIDDEN" | "GITHUB_UPSTREAM_REQUEST_REJECTED" | "GITHUB_UPSTREAM_UNAVAILABLE" | "ID_TOKEN_KEY_ROTATION_REFUSED" | "INTEGRATION_NOT_CONFIGURED" | "IP_ALLOW_LIST_NOT_CONFIGURED" | "MERGE_QUEUE_DISABLED" | "MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN" | "MERGE_QUEUE_SETTING_NOT_AVAILABLE" | "NO_LOGIN_IN_PROGRESS" | "ORGANIZATION_MEMBERS_ONLY" | "PIPELINE_NAME_TAKEN" | "PIPELINE_NOT_FOUND" | "PIPELINE_RUN_NOT_FOUND" | "PIPELINE_SECRETS_KEY_ALREADY_ADDED" | "PIPELINE_SECRETS_KEY_IN_USE" | "PIPELINE_SECRETS_KEY_LIMIT_REACHED" | "PIPELINE_SECRETS_KEY_NOT_ACTIVE" | "PIPELINE_SECRETS_KEY_NOT_FOUND" | "PIPELINE_SECRETS_KEY_REPORTED" | "PIPELINE_SECRET_LIMIT_REACHED" | "PIPELINE_SECRET_NAME_TAKEN" | "PIPELINE_SECRET_NOT_FOUND" | "PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS" | "PIPELINE_SECRET_VERSION_CHANGED" | "PULL_REQUEST_ALREADY_QUEUED" | "PULL_REQUEST_NOT_FOUND" | "PULL_REQUEST_NOT_QUEUEABLE" | "PULL_REQUEST_NOT_QUEUED" | "RETRY_RULE_NOT_FOUND" | "SAML_ENFORCEMENT_NOT_AUTHORIZED" | "SETTING_MANAGED_BY_ENV" | "SETUP_ALREADY_DONE" | "SETUP_TOKEN_MISMATCH" | "SUBSCRIPTION_API_UNAVAILABLE" | "SUBSCRIPTION_INACTIVE" | "SUBSCRIPTION_TOKEN_INVALID" | "TEST_ALREADY_QUARANTINED" | "TEST_BRANCH_NOT_TRACKED" | "TEST_RETRY_NOT_CONFIGURED" | "TEST_STATE_OVERLAP"
Enum: CI_ADMIN_ROLE_REQUIRED CI_ID_TOKEN_AUDIENCE_REFUSED CI_ID_TOKEN_EXCHANGE_NOT_ENABLED CI_ID_TOKEN_EXPIRED CI_ID_TOKEN_INVALID CI_ID_TOKEN_ISSUER_REFUSED CI_ID_TOKEN_ISSUER_UNAVAILABLE CI_ID_TOKEN_NO_MATCHING_TRUST_POLICY CI_ID_TOKEN_NO_TRUST_POLICY CI_ID_TOKEN_REPOSITORY_NOT_INSTALLED CI_TOKEN_SCOPES_TARGET_REFUSED CI_TRACES_UPLOAD_UNUSABLE CI_TRUST_POLICY_NAME_TAKEN COMMAND_RESTRICTED CONFIGURATION_BRANCH_REFUSED CONFIGURATION_INVALID CONFIGURATION_REFUSED_BY_REPOSITORY_RULES CONFIGURATION_SIGNED_COMMITS_REQUIRED DEFAULT_BRANCH_NOT_FOUND GITHUB_ACCOUNT_SUSPENDED GITHUB_APP_ACCESS_LOST GITHUB_RATE_LIMITED GITHUB_UPSTREAM_REQUEST_FORBIDDEN GITHUB_UPSTREAM_REQUEST_REJECTED GITHUB_UPSTREAM_UNAVAILABLE ID_TOKEN_KEY_ROTATION_REFUSED INTEGRATION_NOT_CONFIGURED IP_ALLOW_LIST_NOT_CONFIGURED MERGE_QUEUE_DISABLED MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN MERGE_QUEUE_SETTING_NOT_AVAILABLE NO_LOGIN_IN_PROGRESS ORGANIZATION_MEMBERS_ONLY PIPELINE_NAME_TAKEN PIPELINE_NOT_FOUND PIPELINE_RUN_NOT_FOUND PIPELINE_SECRETS_KEY_ALREADY_ADDED PIPELINE_SECRETS_KEY_IN_USE PIPELINE_SECRETS_KEY_LIMIT_REACHED PIPELINE_SECRETS_KEY_NOT_ACTIVE PIPELINE_SECRETS_KEY_NOT_FOUND PIPELINE_SECRETS_KEY_REPORTED PIPELINE_SECRET_LIMIT_REACHED PIPELINE_SECRET_NAME_TAKEN PIPELINE_SECRET_NOT_FOUND PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS PIPELINE_SECRET_VERSION_CHANGED PULL_REQUEST_ALREADY_QUEUED PULL_REQUEST_NOT_FOUND PULL_REQUEST_NOT_QUEUEABLE PULL_REQUEST_NOT_QUEUED RETRY_RULE_NOT_FOUND SAML_ENFORCEMENT_NOT_AUTHORIZED SETTING_MANAGED_BY_ENV SETUP_ALREADY_DONE SETUP_TOKEN_MISMATCH SUBSCRIPTION_API_UNAVAILABLE SUBSCRIPTION_INACTIVE SUBSCRIPTION_TOKEN_INVALID TEST_ALREADY_QUARANTINED TEST_BRANCH_NOT_TRACKED TEST_RETRY_NOT_CONFIGURED TEST_STATE_OVERLAP
documentation_urlstring
extended_repositorystring | null
Example Response
                          {
  "detail": "string",
  "error_code": "CI_ADMIN_ROLE_REQUIRED",
  "documentation_url": "string",
  "extended_repository": "string"
}
                        
Example Request
curl -X GET "https://api.mergify.com/v1/repos/:owner/:repository/merge-queue/branches" \
  -H "Authorization: Bearer <token>"

Get the current status of the merge queue #

GET /repos/{owner}/{repository}/merge-queue/status

Get the current status of the speculative checks, batches, and queued pull requests in the merge queue

Admin Application Key Mergify User Token GitHub Token
repository string required

The name of the repository

min length: 1 · max length: 100 · pattern: ^[\w\-\.]+$

owner string required

The owner of the repository

min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$

branch string

The name of the branch

200 Successful Response
batchesMergeQueueStatusBatchWithSubBatch[]required
idstring <uuid>required
namestringrequired
parent_idsstring <uuid>[]required
statusBatchStatusrequired
code"running" | "bisecting" | "preparing" | "failed" | "merged" | "waiting_for_merge" | "waiting_for_previous_batches" | "waiting_for_requeue" | "waiting_schedule" | "waiting_for_batch" | "waiting_for_checks_slot" | "frozen"required
Enum: running bisecting preparing failed merged waiting_for_merge waiting_for_previous_batches waiting_for_requeue waiting_schedule waiting_for_batch waiting_for_checks_slot frozen see Batch Status
batch_filled_slotsinteger | null
max_batch_slotsinteger | null
batch_max_start_atstring <date-time> | null
retriesinteger
max_retriesinteger
started_atstring <date-time> | nullrequired
estimated_merge_atstring <date-time> | nullrequired
estimated_ci_finish_atstring <date-time> | nullrequired
ci_finished_atstring <date-time> | nullrequired
scopesstring[]required
queue_rule_namestringrequired
checks_summaryBatchChecksSummaryrequired
passedintegerrequired
totalintegerrequired
pull_requestsMergeQueueStatusPullRequest[]required
numberintegerrequired
min: 1 · max: 9223372036854776000
titlestringrequired
urlstringrequired
authorPullRequestAuthorrequired
idintegerrequired
loginstringrequired
avatar_urlstring | nullrequired

The account's avatar URL, as GitHub reports it. Null when it is not known.

queued_atstring <date-time>required
priority_aliasstringrequired
priority_rule_namestringrequired
labelsstring[]required
scopesstring[]required
queue_state_labelsstring[]required

The names of the labels the merge queue configuration has Mergify add for a pull request's queue state (`merge_queue.queued_label`, `merge_queue.checking_label` and `merge_queue.dequeued_label`), rendered for this pull request. The pull request does not necessarily carry all of them: they are listed so a client can tell them apart from its other labels, since this status already reports the queue state they stand for. Empty when none of these options is set.

all_scopesboolean | null

Whether the pull request impacts every scope (a merge-queue barrier that cannot run in parallel with any other scope). `false` for an ordinary scoped pull request.

github_labelsPullRequestLabel[] | null
idintegerrequired
namestringrequired
colorstringrequired
defaultbooleanrequired
estimated_merge_atstring <date-time> | null

When the pull request is estimated to merge, `null` when it cannot be estimated. Always `null` for a pull request in a batch, which merges at its batch's `estimated_merge_at`, unless it leaves its batch (`leaves_its_batch`).

estimated_ci_finish_atstring <date-time> | null

When the checks the pull request merges after are estimated to end, `null` when they cannot be estimated. Always `null` for a pull request in a batch, whose checks are its batch's (`estimated_ci_finish_at`), unless it leaves its batch (`leaves_its_batch`).

conflict_with_pull_requestsinteger[] | null
conflicts_with_no_pull_request_aheadboolean | null

Set on a waiting pull request held back by a conflict, beside `conflict_with_pull_requests`. `true` when none of the pull requests ahead the merge queue deferred it behind changes a file the conflict stopped on: the conflict is then with the queue's branch, so their leaving the queue does not resolve it, and the pull request is dequeued unless it is updated with that branch. `false` when one of them may cause it. `null` when no conflict holds the pull request back.

batch_reasonBatchReason | null
kind"scope" | "directory" | "queue_order"required
Enum: scope directory queue_order
shared_scopesstring[]required
shared_directoriesstring[]required
peer_pull_request_numbersinteger[]required
affinity_scorenumberrequired
is_frozenboolean | null

Whether an ongoing scheduled freeze holds this pull request's merge, independent of its CI status — it can be running CI and `is_frozen` at once. `false` when no freeze affects it.

dequeue_requestedboolean | null

Whether a manual removal from the queue is pending for this pull request: it was removed via the 'Remove from queue' action / `@mergifyio dequeue` command (or is a stacked pull request that cascade removes with one), and is awaiting completion. The pull request remains listed until it is actually removed. `false` when no manual removal is pending; automatic dequeues (merge, CI failure, push) do not set it.

depends_on_pull_requestsinteger[] | null

Pull request numbers this one is queued behind because it depends on them: the same-repo stack predecessors the merge queue holds it behind (it declared a `Depends-On:` on the stack). It merges after them. `null` when there is no such queued dependency.

leaves_its_batchboolean | null

Whether this pull request leaves its batch to merge without it: the batch waits for a merge schedule that this pull request does not need, so the merge queue requeues this one without the pull requests that schedule holds, and it runs its checks again. Its `estimated_merge_at` and `estimated_ci_finish_at` are then its own, never its batch's, and `null` when they cannot be estimated, as behind a frozen batch; the batch's are those of the pull requests it keeps, `null` when it keeps none. `false` for a pull request that merges with its batch, and for one waiting.

all_scopesboolean | null

Whether the batch impacts every scope (a merge-queue barrier that cannot run in parallel with any other batch). `false` for an ordinary scoped batch.

checks_timeout_atstring <date-time> | null

When the checks will time out and the batch be dequeued. Null when no checks timeout applies, while no checks run (before they first start, and until a new draft's start), and once they concluded: the time the batch waits does not count. Checks that read pending again, or start over on an edit to the batch branch or a new draft, get a whole timeout from then.

intermediate_results_skippedboolean

True when this batch merged (or is set to merge) without its own CI passing, because later downstream batches that include its changes succeeded and tested every scope it touches between them (skip_intermediate_results).

queue_pull_request_numberinteger | null

The number of the pull request the queue checks run on: the draft pull request, or the pull request itself when it is checked in place or the check is `trusted`. Null when they run on a merge queue branch with no draft pull request: `head_sha` and `queue_branch_name` name it then. Null too while the batch's checks have not started, or failed to.

head_shastring | null

The commit the queue check is about: the head of the merge queue branch the checks run on, or of the pull request itself when it is checked in place or the check is `trusted`. A `trusted` check runs no queue CI: that commit's own green CI stands in for it. Null while the batch's checks have not started, or failed to.

queue_branch_namestring | null

The merge queue branch the queue checks run on. Null when the pull request is checked in place, or when the check is `trusted`. Null while the batch's checks have not started, or failed to.

frozen_batch_aheadFrozenBatchAhead | null

The batch ahead a scheduled freeze holds, and with it this batch: this batch merges only once that one has, however green its own checks are. The batch ahead may still be running its checks. `null` when no frozen batch is ahead, including when this batch is frozen itself, which its pull requests' `is_frozen` reports.

idstring <uuid>required

The id of the batch ahead, as `batches` or a bisection's `sub_batches` list it.

pull_request_numbersinteger[]required

The pull requests queued in the batch ahead.

sub_batchesMergeQueueStatusBatchWithSubBatch[] | null
MergeQueueStatusBatchWithSubBatch (circular)
waiting_pull_requestsMergeQueueStatusPullRequest[]required
numberintegerrequired
min: 1 · max: 9223372036854776000
titlestringrequired
urlstringrequired
authorPullRequestAuthorrequired
idintegerrequired
loginstringrequired
avatar_urlstring | nullrequired

The account's avatar URL, as GitHub reports it. Null when it is not known.

queued_atstring <date-time>required
priority_aliasstringrequired
priority_rule_namestringrequired
labelsstring[]required
scopesstring[]required
queue_state_labelsstring[]required

The names of the labels the merge queue configuration has Mergify add for a pull request's queue state (`merge_queue.queued_label`, `merge_queue.checking_label` and `merge_queue.dequeued_label`), rendered for this pull request. The pull request does not necessarily carry all of them: they are listed so a client can tell them apart from its other labels, since this status already reports the queue state they stand for. Empty when none of these options is set.

all_scopesboolean | null

Whether the pull request impacts every scope (a merge-queue barrier that cannot run in parallel with any other scope). `false` for an ordinary scoped pull request.

github_labelsPullRequestLabel[] | null
idintegerrequired
namestringrequired
colorstringrequired
defaultbooleanrequired
estimated_merge_atstring <date-time> | null

When the pull request is estimated to merge, `null` when it cannot be estimated. Always `null` for a pull request in a batch, which merges at its batch's `estimated_merge_at`, unless it leaves its batch (`leaves_its_batch`).

estimated_ci_finish_atstring <date-time> | null

When the checks the pull request merges after are estimated to end, `null` when they cannot be estimated. Always `null` for a pull request in a batch, whose checks are its batch's (`estimated_ci_finish_at`), unless it leaves its batch (`leaves_its_batch`).

conflict_with_pull_requestsinteger[] | null
conflicts_with_no_pull_request_aheadboolean | null

Set on a waiting pull request held back by a conflict, beside `conflict_with_pull_requests`. `true` when none of the pull requests ahead the merge queue deferred it behind changes a file the conflict stopped on: the conflict is then with the queue's branch, so their leaving the queue does not resolve it, and the pull request is dequeued unless it is updated with that branch. `false` when one of them may cause it. `null` when no conflict holds the pull request back.

batch_reasonBatchReason | null
kind"scope" | "directory" | "queue_order"required
Enum: scope directory queue_order
shared_scopesstring[]required
shared_directoriesstring[]required
peer_pull_request_numbersinteger[]required
affinity_scorenumberrequired
is_frozenboolean | null

Whether an ongoing scheduled freeze holds this pull request's merge, independent of its CI status — it can be running CI and `is_frozen` at once. `false` when no freeze affects it.

dequeue_requestedboolean | null

Whether a manual removal from the queue is pending for this pull request: it was removed via the 'Remove from queue' action / `@mergifyio dequeue` command (or is a stacked pull request that cascade removes with one), and is awaiting completion. The pull request remains listed until it is actually removed. `false` when no manual removal is pending; automatic dequeues (merge, CI failure, push) do not set it.

depends_on_pull_requestsinteger[] | null

Pull request numbers this one is queued behind because it depends on them: the same-repo stack predecessors the merge queue holds it behind (it declared a `Depends-On:` on the stack). It merges after them. `null` when there is no such queued dependency.

leaves_its_batchboolean | null

Whether this pull request leaves its batch to merge without it: the batch waits for a merge schedule that this pull request does not need, so the merge queue requeues this one without the pull requests that schedule holds, and it runs its checks again. Its `estimated_merge_at` and `estimated_ci_finish_at` are then its own, never its batch's, and `null` when they cannot be estimated, as behind a frozen batch; the batch's are those of the pull requests it keeps, `null` when it keeps none. `false` for a pull request that merges with its batch, and for one waiting.

mode"serial" | "parallel" | "isolated"required
Enum: serial parallel isolated
forming_batchesMergeQueueStatusFormingBatch[]

Batches still collecting pull requests, which hold no place in the merge order yet; their pull requests are listed in `waiting_pull_requests`.

queue_rule_namestringrequired

The queue rule the batch fills under.

scopesstring[]required

The scopes its pull requests impact, sorted.

all_scopesbooleanrequired

Whether one of its pull requests impacts every scope, which makes it a merge-queue barrier.

pull_request_numbersinteger[]required

Its pull requests, in the order the batch holds them. Each is listed in `waiting_pull_requests` too.

max_batch_slotsintegerrequired

The most pull requests its queue rule batches together.

batch_max_start_atstring <date-time>required

When it stops waiting for more pull requests: its oldest pull request's arrival plus the queue rule's `batch_max_wait_time`. It becomes a batch by then at the latest.

scope_queuesobject
pauseMergeQueuePauseResponse | null
pausedbooleanrequired

Whether the merge queue is currently paused

reasonstring | null

The reason of the merge queue pause

paused_atstring <date-time> | null

The date and time when the merge queue was paused

auto_queueboolean

Whether the repository queues a pull request on its own once it matches its conditions.

check_slotsMergeQueueStatusCheckSlots | null

The check slots and how many are taken. `null` for an empty queue, and while the queue rule at its head is missing from the configuration.

in_useintegerrequired

Slots taken: a batch running its checks holds one, and a bisecting batch holds one per sub-batch it runs or is about to start. It can exceed `capacity` for a moment after the ceiling is lowered.

capacityintegerrequired

How many batches may run their checks at once: `merge_queue.max_parallel_checks`, or 1 when strict branch protection forbids more under the queue rule at the head of the queue.

Example Response
                          {
  "scope_queues": {
    "__default__": [
      "550e8400-e29b-41d4-a716-446655440001",
      "550e8400-e29b-41d4-a716-446655440002"
    ]
  },
  "batches": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440001",
      "parent_ids": [],
      "name": "Batch 1",
      "status": {
        "code": "running"
      },
      "started_at": "2025-11-05T14:05:00Z",
      "estimated_merge_at": "2025-11-05T14:35:00Z",
      "estimated_ci_finish_at": "2025-11-05T14:34:30Z",
      "ci_finished_at": "2025-11-05T14:34:30Z",
      "scopes": [
        "frontend",
        "backend"
      ],
      "queue_rule_name": "default",
      "checks_summary": {
        "passed": 45,
        "total": 67
      },
      "pull_requests": [
        {
          "number": 1421,
          "title": "feat(auth): add \"Reset Password\" flow to login UI",
          "url": "https://github.com/org/repo/pull/1421",
          "author": {
            "id": 123,
            "login": "james"
          },
          "queued_at": "2025-11-05T13:30:00Z",
          "priority_alias": "high",
          "priority_rule_name": "hotfix",
          "labels": [
            "feature",
            "auth"
          ],
          "github_labels": [
            {
              "id": 1,
              "name": "feature",
              "color": "0e8a16",
              "default": false
            },
            {
              "id": 2,
              "name": "auth",
              "color": "1d76db",
              "default": false
            }
          ],
          "scopes": [
            "frontend"
          ]
        }
      ]
    },
    {
      "id": "550e8400-e29b-41d4-a716-446655440002",
      "parent_ids": [
        "550e8400-e29b-41d4-a716-446655440001"
      ],
      "name": "Batch 2",
      "status": {
        "code": "bisecting"
      },
      "started_at": "2025-11-05T13:35:00Z",
      "estimated_merge_at": "2025-11-05T15:35:00Z",
      "estimated_ci_finish_at": "2025-11-05T15:34:30Z",
      "ci_finished_at": "2025-11-05T14:34:30Z",
      "scopes": [
        "frontend"
      ],
      "queue_rule_name": "default",
      "checks_summary": {
        "passed": 15,
        "total": 28
      },
      "sub_batches": [
        {
          "id": "550e8400-e29b-41d4-a716-446655440003",
          "parent_ids": [],
          "name": "Sub Batch 1",
          "status": {
            "code": "merged"
          },
          "started_at": "2025-11-05T13:40:00Z",
          "estimated_merge_at": "2025-11-05T13:50:00Z",
          "estimated_ci_finish_at": "2025-11-05T13:49:30Z",
          "ci_finished_at": "2025-11-05T13:49:30Z",
          "scopes": [
            "frontend"
          ],
          "queue_rule_name": "default",
          "checks_summary": {
            "passed": 15,
            "total": 15
          },
          "pull_requests": []
        },
        {
          "id": "550e8400-e29b-41d4-a716-446655440004",
          "parent_ids": [],
          "name": "Sub Batch 2",
          "status": {
            "code": "running"
          },
          "started_at": "2025-11-05T13:50:00Z",
          "estimated_merge_at": "2025-11-05T14:00:00Z",
          "estimated_ci_finish_at": "2025-11-05T13:59:30Z",
          "ci_finished_at": "2025-11-05T14:34:30Z",
          "scopes": [
            "frontend"
          ],
          "queue_rule_name": "default",
          "checks_summary": {
            "passed": 0,
            "total": 13
          },
          "pull_requests": []
        }
      ],
      "pull_requests": []
    }
  ],
  "forming_batches": [
    {
      "queue_rule_name": "default",
      "scopes": [
        "backend"
      ],
      "all_scopes": false,
      "pull_request_numbers": [
        1440
      ],
      "max_batch_slots": 5,
      "batch_max_start_at": "2025-11-05T14:52:00Z"
    }
  ],
  "waiting_pull_requests": [
    {
      "number": 1440,
      "title": "fix(api): retry the S3 client",
      "url": "https://github.com/org/repo/pull/1440",
      "author": {
        "id": 123,
        "login": "james"
      },
      "queued_at": "2025-11-05T14:42:00Z",
      "priority_alias": "medium",
      "priority_rule_name": "<default>",
      "labels": [],
      "github_labels": [],
      "scopes": [
        "backend"
      ]
    }
  ],
  "auto_queue": false,
  "check_slots": {
    "in_use": 2,
    "capacity": 3
  }
}
                        
403 Forbidden
404 Not found
409 Conflict
422 `CONFIGURATION_INVALID`: The repository's Mergify configuration is invalid. `extended_repository` names the repository its `extends` points to when the error is in that repository's configuration file, and is null otherwise, including when the error only appears once the two configurations are merged. The route's other 422s carry no `error_code`.
detailstringrequired
error_code"CI_ADMIN_ROLE_REQUIRED" | "CI_ID_TOKEN_AUDIENCE_REFUSED" | "CI_ID_TOKEN_EXCHANGE_NOT_ENABLED" | "CI_ID_TOKEN_EXPIRED" | "CI_ID_TOKEN_INVALID" | "CI_ID_TOKEN_ISSUER_REFUSED" | "CI_ID_TOKEN_ISSUER_UNAVAILABLE" | "CI_ID_TOKEN_NO_MATCHING_TRUST_POLICY" | "CI_ID_TOKEN_NO_TRUST_POLICY" | "CI_ID_TOKEN_REPOSITORY_NOT_INSTALLED" | "CI_TOKEN_SCOPES_TARGET_REFUSED" | "CI_TRACES_UPLOAD_UNUSABLE" | "CI_TRUST_POLICY_NAME_TAKEN" | "COMMAND_RESTRICTED" | "CONFIGURATION_BRANCH_REFUSED" | "CONFIGURATION_INVALID" | "CONFIGURATION_REFUSED_BY_REPOSITORY_RULES" | "CONFIGURATION_SIGNED_COMMITS_REQUIRED" | "DEFAULT_BRANCH_NOT_FOUND" | "GITHUB_ACCOUNT_SUSPENDED" | "GITHUB_APP_ACCESS_LOST" | "GITHUB_RATE_LIMITED" | "GITHUB_UPSTREAM_REQUEST_FORBIDDEN" | "GITHUB_UPSTREAM_REQUEST_REJECTED" | "GITHUB_UPSTREAM_UNAVAILABLE" | "ID_TOKEN_KEY_ROTATION_REFUSED" | "INTEGRATION_NOT_CONFIGURED" | "IP_ALLOW_LIST_NOT_CONFIGURED" | "MERGE_QUEUE_DISABLED" | "MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN" | "MERGE_QUEUE_SETTING_NOT_AVAILABLE" | "NO_LOGIN_IN_PROGRESS" | "ORGANIZATION_MEMBERS_ONLY" | "PIPELINE_NAME_TAKEN" | "PIPELINE_NOT_FOUND" | "PIPELINE_RUN_NOT_FOUND" | "PIPELINE_SECRETS_KEY_ALREADY_ADDED" | "PIPELINE_SECRETS_KEY_IN_USE" | "PIPELINE_SECRETS_KEY_LIMIT_REACHED" | "PIPELINE_SECRETS_KEY_NOT_ACTIVE" | "PIPELINE_SECRETS_KEY_NOT_FOUND" | "PIPELINE_SECRETS_KEY_REPORTED" | "PIPELINE_SECRET_LIMIT_REACHED" | "PIPELINE_SECRET_NAME_TAKEN" | "PIPELINE_SECRET_NOT_FOUND" | "PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS" | "PIPELINE_SECRET_VERSION_CHANGED" | "PULL_REQUEST_ALREADY_QUEUED" | "PULL_REQUEST_NOT_FOUND" | "PULL_REQUEST_NOT_QUEUEABLE" | "PULL_REQUEST_NOT_QUEUED" | "RETRY_RULE_NOT_FOUND" | "SAML_ENFORCEMENT_NOT_AUTHORIZED" | "SETTING_MANAGED_BY_ENV" | "SETUP_ALREADY_DONE" | "SETUP_TOKEN_MISMATCH" | "SUBSCRIPTION_API_UNAVAILABLE" | "SUBSCRIPTION_INACTIVE" | "SUBSCRIPTION_TOKEN_INVALID" | "TEST_ALREADY_QUARANTINED" | "TEST_BRANCH_NOT_TRACKED" | "TEST_RETRY_NOT_CONFIGURED" | "TEST_STATE_OVERLAP"
Enum: CI_ADMIN_ROLE_REQUIRED CI_ID_TOKEN_AUDIENCE_REFUSED CI_ID_TOKEN_EXCHANGE_NOT_ENABLED CI_ID_TOKEN_EXPIRED CI_ID_TOKEN_INVALID CI_ID_TOKEN_ISSUER_REFUSED CI_ID_TOKEN_ISSUER_UNAVAILABLE CI_ID_TOKEN_NO_MATCHING_TRUST_POLICY CI_ID_TOKEN_NO_TRUST_POLICY CI_ID_TOKEN_REPOSITORY_NOT_INSTALLED CI_TOKEN_SCOPES_TARGET_REFUSED CI_TRACES_UPLOAD_UNUSABLE CI_TRUST_POLICY_NAME_TAKEN COMMAND_RESTRICTED CONFIGURATION_BRANCH_REFUSED CONFIGURATION_INVALID CONFIGURATION_REFUSED_BY_REPOSITORY_RULES CONFIGURATION_SIGNED_COMMITS_REQUIRED DEFAULT_BRANCH_NOT_FOUND GITHUB_ACCOUNT_SUSPENDED GITHUB_APP_ACCESS_LOST GITHUB_RATE_LIMITED GITHUB_UPSTREAM_REQUEST_FORBIDDEN GITHUB_UPSTREAM_REQUEST_REJECTED GITHUB_UPSTREAM_UNAVAILABLE ID_TOKEN_KEY_ROTATION_REFUSED INTEGRATION_NOT_CONFIGURED IP_ALLOW_LIST_NOT_CONFIGURED MERGE_QUEUE_DISABLED MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN MERGE_QUEUE_SETTING_NOT_AVAILABLE NO_LOGIN_IN_PROGRESS ORGANIZATION_MEMBERS_ONLY PIPELINE_NAME_TAKEN PIPELINE_NOT_FOUND PIPELINE_RUN_NOT_FOUND PIPELINE_SECRETS_KEY_ALREADY_ADDED PIPELINE_SECRETS_KEY_IN_USE PIPELINE_SECRETS_KEY_LIMIT_REACHED PIPELINE_SECRETS_KEY_NOT_ACTIVE PIPELINE_SECRETS_KEY_NOT_FOUND PIPELINE_SECRETS_KEY_REPORTED PIPELINE_SECRET_LIMIT_REACHED PIPELINE_SECRET_NAME_TAKEN PIPELINE_SECRET_NOT_FOUND PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS PIPELINE_SECRET_VERSION_CHANGED PULL_REQUEST_ALREADY_QUEUED PULL_REQUEST_NOT_FOUND PULL_REQUEST_NOT_QUEUEABLE PULL_REQUEST_NOT_QUEUED RETRY_RULE_NOT_FOUND SAML_ENFORCEMENT_NOT_AUTHORIZED SETTING_MANAGED_BY_ENV SETUP_ALREADY_DONE SETUP_TOKEN_MISMATCH SUBSCRIPTION_API_UNAVAILABLE SUBSCRIPTION_INACTIVE SUBSCRIPTION_TOKEN_INVALID TEST_ALREADY_QUARANTINED TEST_BRANCH_NOT_TRACKED TEST_RETRY_NOT_CONFIGURED TEST_STATE_OVERLAP
documentation_urlstring
extended_repositorystring | null
Example Response
                          {
  "detail": "string",
  "error_code": "CI_ADMIN_ROLE_REQUIRED",
  "documentation_url": "string",
  "extended_repository": "string"
}
                        
Example Request
curl -X GET "https://api.mergify.com/v1/repos/:owner/:repository/merge-queue/status" \
  -H "Authorization: Bearer <token>"

Get a pull request in the merge queue #

GET /repos/{owner}/{repository}/merge-queue/pull/{pr_number}

Get details about a specific pull request in the merge queue

Admin Application Key Mergify User Token GitHub Token
pr_number integer required

The pull request number

min: 1 · max: 9223372036854776000

repository string required

The name of the repository

min length: 1 · max length: 100 · pattern: ^[\w\-\.]+$

owner string required

The owner of the repository

min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$

200 Successful Response
numberintegerrequired

The number of the pull request

min: 1 · max: 9223372036854776000
queued_atstring <date-time>required

The timestamp when the pull request entered the queue

estimated_time_of_mergestring <date-time> | nullrequired

The estimated timestamp when this pull request will be merged

positionintegerrequired

The position of the pull request in the queue (0-indexed)

priority_rule_namestringrequired

The name of the priority rule applied to this pull request

queue_rule_namestringrequired

The name of the queue rule

checks_timeout_atstring <date-time> | nullrequired

When the checks of this pull request's batch will time out. Null when no checks timeout applies, while no checks run (before they first start, and until a new draft's start), and once they concluded: the time the batch waits does not count. Checks that read pending again, or start over on an edit to the batch branch or a new draft, get a whole timeout from then.

queue_ruleQueueRulerequired

The queue rule associated to this pull request

namestringrequired

The name of the queue rule

configobjectrequired

The configuration of the queue rule

mergeability_checkMergeQueueMergeabilityCheck | nullrequired

The current state of the mergeability check

check_type"in_place" | "draft_pr" | "branch" | "trusted"required

The type of queue check: `in_place` (checks run on the pull request itself), `draft_pr` (checks run on a Mergify draft pull request), `branch` (checks run on a merge queue branch, with no draft pull request), or `trusted` (no queue CI run is required: the merge relies on the pull request's own green CI, either because it already contains the base branch tip or because the base commits it is missing do not affect its scopes — the latter is Direct Merge, see https://docs.mergify.com/merge-queue/direct-merge).

Enum: in_place draft_pr branch trusted
queue_pull_request_numberinteger | nullrequired

The number of the pull request the queue checks run on: the draft pull request, or the pull request itself when it is checked in place or the check is `trusted`. Null when they run on a merge queue branch with no draft pull request: `head_sha` and `queue_branch_name` name it then.

started_atstring <date-time> | nullrequired

The timestamp when the checks started for this pull request

ci_ended_atstring <date-time> | nullrequired

The timestamp when the CI ended for this pull request

ci_state"pending" | "success" | "failed"required

The combined state of the CI checks

Enum: pending success failed
statestringrequired

The overall queue check conclusion

checksQueueCheck[]required

The list of pull request checks

namestringrequired

Check name

descriptionstringrequired

Check description

urlstring | nullrequired

Check detail url

details_urlstring | null

External integrator's direct URL (e.g. Jenkins build URL)

state"failure" | "error" | "cancelled" | "action_required" | "timed_out" | "pending" | "neutral" | "skipped" | "stale" | "success"required

Check state

Enum: failure error cancelled action_required timed_out pending neutral skipped stale success
avatar_urlstring | nullrequired

Check avatar_url

conditions_evaluationQueueConditionEvaluationJsonSerialized | nullrequired

The queue rule conditions evaluation

matchbooleanrequired
labelstringrequired
descriptionstring | nullrequired
documentation_urlstring | nullrequired
scheduleScheduleJSON | nullrequired
timezonestringrequired
daysobjectrequired
subconditionsQueueConditionEvaluationJsonSerialized[]required
matchbooleanrequired
labelstringrequired
descriptionstring | nullrequired
documentation_urlstring | nullrequired
scheduleScheduleJSON | nullrequired
timezonestringrequired
daysobjectrequired
subconditionsQueueConditionEvaluationJsonSerialized[]required
QueueConditionEvaluationJsonSerialized (circular)
evaluationsEvaluation[]required
pull_requestintegerrequired
min: 1 · max: 9223372036854776000
matchbooleanrequired
evaluation_errorstring | nullrequired
explanationstring | null
related_checksstring[]required
next_evaluation_atstring <date-time> | nullrequired
evaluationsEvaluation[]required
pull_requestintegerrequired
min: 1 · max: 9223372036854776000
matchbooleanrequired
evaluation_errorstring | nullrequired
explanationstring | null
related_checksstring[]required
next_evaluation_atstring <date-time> | nullrequired
run_idstring <uuid> | nullrequired

The id of the queue check run: the `run_id` of its `action.queue.checks_start` and `action.queue.checks_end` events.

head_shastring | null

The commit the queue check is about: the head of the merge queue branch the checks run on, or of the pull request itself when it is checked in place or the check is `trusted`. A `trusted` check runs no queue CI: that commit's own green CI stands in for it.

queue_branch_namestring | null

The merge queue branch the queue checks run on. Null when the pull request is checked in place, or when the check is `trusted`.

Example Response
                          {
  "number": 1,
  "queued_at": "2024-01-15T09:00:00Z",
  "estimated_time_of_merge": "2024-01-15T09:00:00Z",
  "position": 0,
  "priority_rule_name": "string",
  "queue_rule_name": "string",
  "checks_timeout_at": "2024-01-15T09:00:00Z",
  "queue_rule": {
    "name": "string",
    "config": {}
  },
  "mergeability_check": {
    "check_type": "in_place",
    "queue_pull_request_number": 1,
    "started_at": "2024-01-15T09:00:00Z",
    "ci_ended_at": "2024-01-15T09:00:00Z",
    "ci_state": "pending",
    "state": "string",
    "checks": [
      {}
    ],
    "conditions_evaluation": {
      "match": true,
      "label": "string",
      "description": "string",
      "documentation_url": "string",
      "schedule": {},
      "subconditions": null,
      "evaluations": null
    },
    "run_id": "string",
    "head_sha": "string",
    "queue_branch_name": "string"
  }
}
                        
403 Forbidden
404 `PULL_REQUEST_NOT_QUEUED`: The pull request is not in any merge queue of the repository.
detailstringrequired
error_code"CI_ADMIN_ROLE_REQUIRED" | "CI_ID_TOKEN_AUDIENCE_REFUSED" | "CI_ID_TOKEN_EXCHANGE_NOT_ENABLED" | "CI_ID_TOKEN_EXPIRED" | "CI_ID_TOKEN_INVALID" | "CI_ID_TOKEN_ISSUER_REFUSED" | "CI_ID_TOKEN_ISSUER_UNAVAILABLE" | "CI_ID_TOKEN_NO_MATCHING_TRUST_POLICY" | "CI_ID_TOKEN_NO_TRUST_POLICY" | "CI_ID_TOKEN_REPOSITORY_NOT_INSTALLED" | "CI_TOKEN_SCOPES_TARGET_REFUSED" | "CI_TRACES_UPLOAD_UNUSABLE" | "CI_TRUST_POLICY_NAME_TAKEN" | "COMMAND_RESTRICTED" | "CONFIGURATION_BRANCH_REFUSED" | "CONFIGURATION_INVALID" | "CONFIGURATION_REFUSED_BY_REPOSITORY_RULES" | "CONFIGURATION_SIGNED_COMMITS_REQUIRED" | "DEFAULT_BRANCH_NOT_FOUND" | "GITHUB_ACCOUNT_SUSPENDED" | "GITHUB_APP_ACCESS_LOST" | "GITHUB_RATE_LIMITED" | "GITHUB_UPSTREAM_REQUEST_FORBIDDEN" | "GITHUB_UPSTREAM_REQUEST_REJECTED" | "GITHUB_UPSTREAM_UNAVAILABLE" | "ID_TOKEN_KEY_ROTATION_REFUSED" | "INTEGRATION_NOT_CONFIGURED" | "IP_ALLOW_LIST_NOT_CONFIGURED" | "MERGE_QUEUE_DISABLED" | "MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN" | "MERGE_QUEUE_SETTING_NOT_AVAILABLE" | "NO_LOGIN_IN_PROGRESS" | "ORGANIZATION_MEMBERS_ONLY" | "PIPELINE_NAME_TAKEN" | "PIPELINE_NOT_FOUND" | "PIPELINE_RUN_NOT_FOUND" | "PIPELINE_SECRETS_KEY_ALREADY_ADDED" | "PIPELINE_SECRETS_KEY_IN_USE" | "PIPELINE_SECRETS_KEY_LIMIT_REACHED" | "PIPELINE_SECRETS_KEY_NOT_ACTIVE" | "PIPELINE_SECRETS_KEY_NOT_FOUND" | "PIPELINE_SECRETS_KEY_REPORTED" | "PIPELINE_SECRET_LIMIT_REACHED" | "PIPELINE_SECRET_NAME_TAKEN" | "PIPELINE_SECRET_NOT_FOUND" | "PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS" | "PIPELINE_SECRET_VERSION_CHANGED" | "PULL_REQUEST_ALREADY_QUEUED" | "PULL_REQUEST_NOT_FOUND" | "PULL_REQUEST_NOT_QUEUEABLE" | "PULL_REQUEST_NOT_QUEUED" | "RETRY_RULE_NOT_FOUND" | "SAML_ENFORCEMENT_NOT_AUTHORIZED" | "SETTING_MANAGED_BY_ENV" | "SETUP_ALREADY_DONE" | "SETUP_TOKEN_MISMATCH" | "SUBSCRIPTION_API_UNAVAILABLE" | "SUBSCRIPTION_INACTIVE" | "SUBSCRIPTION_TOKEN_INVALID" | "TEST_ALREADY_QUARANTINED" | "TEST_BRANCH_NOT_TRACKED" | "TEST_RETRY_NOT_CONFIGURED" | "TEST_STATE_OVERLAP"
Enum: CI_ADMIN_ROLE_REQUIRED CI_ID_TOKEN_AUDIENCE_REFUSED CI_ID_TOKEN_EXCHANGE_NOT_ENABLED CI_ID_TOKEN_EXPIRED CI_ID_TOKEN_INVALID CI_ID_TOKEN_ISSUER_REFUSED CI_ID_TOKEN_ISSUER_UNAVAILABLE CI_ID_TOKEN_NO_MATCHING_TRUST_POLICY CI_ID_TOKEN_NO_TRUST_POLICY CI_ID_TOKEN_REPOSITORY_NOT_INSTALLED CI_TOKEN_SCOPES_TARGET_REFUSED CI_TRACES_UPLOAD_UNUSABLE CI_TRUST_POLICY_NAME_TAKEN COMMAND_RESTRICTED CONFIGURATION_BRANCH_REFUSED CONFIGURATION_INVALID CONFIGURATION_REFUSED_BY_REPOSITORY_RULES CONFIGURATION_SIGNED_COMMITS_REQUIRED DEFAULT_BRANCH_NOT_FOUND GITHUB_ACCOUNT_SUSPENDED GITHUB_APP_ACCESS_LOST GITHUB_RATE_LIMITED GITHUB_UPSTREAM_REQUEST_FORBIDDEN GITHUB_UPSTREAM_REQUEST_REJECTED GITHUB_UPSTREAM_UNAVAILABLE ID_TOKEN_KEY_ROTATION_REFUSED INTEGRATION_NOT_CONFIGURED IP_ALLOW_LIST_NOT_CONFIGURED MERGE_QUEUE_DISABLED MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN MERGE_QUEUE_SETTING_NOT_AVAILABLE NO_LOGIN_IN_PROGRESS ORGANIZATION_MEMBERS_ONLY PIPELINE_NAME_TAKEN PIPELINE_NOT_FOUND PIPELINE_RUN_NOT_FOUND PIPELINE_SECRETS_KEY_ALREADY_ADDED PIPELINE_SECRETS_KEY_IN_USE PIPELINE_SECRETS_KEY_LIMIT_REACHED PIPELINE_SECRETS_KEY_NOT_ACTIVE PIPELINE_SECRETS_KEY_NOT_FOUND PIPELINE_SECRETS_KEY_REPORTED PIPELINE_SECRET_LIMIT_REACHED PIPELINE_SECRET_NAME_TAKEN PIPELINE_SECRET_NOT_FOUND PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS PIPELINE_SECRET_VERSION_CHANGED PULL_REQUEST_ALREADY_QUEUED PULL_REQUEST_NOT_FOUND PULL_REQUEST_NOT_QUEUEABLE PULL_REQUEST_NOT_QUEUED RETRY_RULE_NOT_FOUND SAML_ENFORCEMENT_NOT_AUTHORIZED SETTING_MANAGED_BY_ENV SETUP_ALREADY_DONE SETUP_TOKEN_MISMATCH SUBSCRIPTION_API_UNAVAILABLE SUBSCRIPTION_INACTIVE SUBSCRIPTION_TOKEN_INVALID TEST_ALREADY_QUARANTINED TEST_BRANCH_NOT_TRACKED TEST_RETRY_NOT_CONFIGURED TEST_STATE_OVERLAP
documentation_urlstring
Example Response
                          {
  "detail": "string",
  "error_code": "CI_ADMIN_ROLE_REQUIRED",
  "documentation_url": "string"
}
                        
409 Conflict
422 `CONFIGURATION_INVALID`: The repository's Mergify configuration is invalid. `extended_repository` names the repository its `extends` points to when the error is in that repository's configuration file, and is null otherwise, including when the error only appears once the two configurations are merged. The route's other 422s carry no `error_code`.
detailstringrequired
error_code"CI_ADMIN_ROLE_REQUIRED" | "CI_ID_TOKEN_AUDIENCE_REFUSED" | "CI_ID_TOKEN_EXCHANGE_NOT_ENABLED" | "CI_ID_TOKEN_EXPIRED" | "CI_ID_TOKEN_INVALID" | "CI_ID_TOKEN_ISSUER_REFUSED" | "CI_ID_TOKEN_ISSUER_UNAVAILABLE" | "CI_ID_TOKEN_NO_MATCHING_TRUST_POLICY" | "CI_ID_TOKEN_NO_TRUST_POLICY" | "CI_ID_TOKEN_REPOSITORY_NOT_INSTALLED" | "CI_TOKEN_SCOPES_TARGET_REFUSED" | "CI_TRACES_UPLOAD_UNUSABLE" | "CI_TRUST_POLICY_NAME_TAKEN" | "COMMAND_RESTRICTED" | "CONFIGURATION_BRANCH_REFUSED" | "CONFIGURATION_INVALID" | "CONFIGURATION_REFUSED_BY_REPOSITORY_RULES" | "CONFIGURATION_SIGNED_COMMITS_REQUIRED" | "DEFAULT_BRANCH_NOT_FOUND" | "GITHUB_ACCOUNT_SUSPENDED" | "GITHUB_APP_ACCESS_LOST" | "GITHUB_RATE_LIMITED" | "GITHUB_UPSTREAM_REQUEST_FORBIDDEN" | "GITHUB_UPSTREAM_REQUEST_REJECTED" | "GITHUB_UPSTREAM_UNAVAILABLE" | "ID_TOKEN_KEY_ROTATION_REFUSED" | "INTEGRATION_NOT_CONFIGURED" | "IP_ALLOW_LIST_NOT_CONFIGURED" | "MERGE_QUEUE_DISABLED" | "MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN" | "MERGE_QUEUE_SETTING_NOT_AVAILABLE" | "NO_LOGIN_IN_PROGRESS" | "ORGANIZATION_MEMBERS_ONLY" | "PIPELINE_NAME_TAKEN" | "PIPELINE_NOT_FOUND" | "PIPELINE_RUN_NOT_FOUND" | "PIPELINE_SECRETS_KEY_ALREADY_ADDED" | "PIPELINE_SECRETS_KEY_IN_USE" | "PIPELINE_SECRETS_KEY_LIMIT_REACHED" | "PIPELINE_SECRETS_KEY_NOT_ACTIVE" | "PIPELINE_SECRETS_KEY_NOT_FOUND" | "PIPELINE_SECRETS_KEY_REPORTED" | "PIPELINE_SECRET_LIMIT_REACHED" | "PIPELINE_SECRET_NAME_TAKEN" | "PIPELINE_SECRET_NOT_FOUND" | "PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS" | "PIPELINE_SECRET_VERSION_CHANGED" | "PULL_REQUEST_ALREADY_QUEUED" | "PULL_REQUEST_NOT_FOUND" | "PULL_REQUEST_NOT_QUEUEABLE" | "PULL_REQUEST_NOT_QUEUED" | "RETRY_RULE_NOT_FOUND" | "SAML_ENFORCEMENT_NOT_AUTHORIZED" | "SETTING_MANAGED_BY_ENV" | "SETUP_ALREADY_DONE" | "SETUP_TOKEN_MISMATCH" | "SUBSCRIPTION_API_UNAVAILABLE" | "SUBSCRIPTION_INACTIVE" | "SUBSCRIPTION_TOKEN_INVALID" | "TEST_ALREADY_QUARANTINED" | "TEST_BRANCH_NOT_TRACKED" | "TEST_RETRY_NOT_CONFIGURED" | "TEST_STATE_OVERLAP"
Enum: CI_ADMIN_ROLE_REQUIRED CI_ID_TOKEN_AUDIENCE_REFUSED CI_ID_TOKEN_EXCHANGE_NOT_ENABLED CI_ID_TOKEN_EXPIRED CI_ID_TOKEN_INVALID CI_ID_TOKEN_ISSUER_REFUSED CI_ID_TOKEN_ISSUER_UNAVAILABLE CI_ID_TOKEN_NO_MATCHING_TRUST_POLICY CI_ID_TOKEN_NO_TRUST_POLICY CI_ID_TOKEN_REPOSITORY_NOT_INSTALLED CI_TOKEN_SCOPES_TARGET_REFUSED CI_TRACES_UPLOAD_UNUSABLE CI_TRUST_POLICY_NAME_TAKEN COMMAND_RESTRICTED CONFIGURATION_BRANCH_REFUSED CONFIGURATION_INVALID CONFIGURATION_REFUSED_BY_REPOSITORY_RULES CONFIGURATION_SIGNED_COMMITS_REQUIRED DEFAULT_BRANCH_NOT_FOUND GITHUB_ACCOUNT_SUSPENDED GITHUB_APP_ACCESS_LOST GITHUB_RATE_LIMITED GITHUB_UPSTREAM_REQUEST_FORBIDDEN GITHUB_UPSTREAM_REQUEST_REJECTED GITHUB_UPSTREAM_UNAVAILABLE ID_TOKEN_KEY_ROTATION_REFUSED INTEGRATION_NOT_CONFIGURED IP_ALLOW_LIST_NOT_CONFIGURED MERGE_QUEUE_DISABLED MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN MERGE_QUEUE_SETTING_NOT_AVAILABLE NO_LOGIN_IN_PROGRESS ORGANIZATION_MEMBERS_ONLY PIPELINE_NAME_TAKEN PIPELINE_NOT_FOUND PIPELINE_RUN_NOT_FOUND PIPELINE_SECRETS_KEY_ALREADY_ADDED PIPELINE_SECRETS_KEY_IN_USE PIPELINE_SECRETS_KEY_LIMIT_REACHED PIPELINE_SECRETS_KEY_NOT_ACTIVE PIPELINE_SECRETS_KEY_NOT_FOUND PIPELINE_SECRETS_KEY_REPORTED PIPELINE_SECRET_LIMIT_REACHED PIPELINE_SECRET_NAME_TAKEN PIPELINE_SECRET_NOT_FOUND PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS PIPELINE_SECRET_VERSION_CHANGED PULL_REQUEST_ALREADY_QUEUED PULL_REQUEST_NOT_FOUND PULL_REQUEST_NOT_QUEUEABLE PULL_REQUEST_NOT_QUEUED RETRY_RULE_NOT_FOUND SAML_ENFORCEMENT_NOT_AUTHORIZED SETTING_MANAGED_BY_ENV SETUP_ALREADY_DONE SETUP_TOKEN_MISMATCH SUBSCRIPTION_API_UNAVAILABLE SUBSCRIPTION_INACTIVE SUBSCRIPTION_TOKEN_INVALID TEST_ALREADY_QUARANTINED TEST_BRANCH_NOT_TRACKED TEST_RETRY_NOT_CONFIGURED TEST_STATE_OVERLAP
documentation_urlstring
extended_repositorystring | null
Example Response
                          {
  "detail": "string",
  "error_code": "CI_ADMIN_ROLE_REQUIRED",
  "documentation_url": "string",
  "extended_repository": "string"
}
                        
Example Request
curl -X GET "https://api.mergify.com/v1/repos/:owner/:repository/merge-queue/pull/:pr_number" \
  -H "Authorization: Bearer <token>"

Preview the impact of dequeuing a pull request #

GET /repos/{owner}/{repository}/merge-queue/pull/{pr_number}/dequeue-impact

Return how many batches would be interrupted, how many other pull requests would be rechecked, and how many stacked pull requests would also be dequeued if the given pull request is manually dequeued

Admin Application Key Mergify User Token GitHub Token
pr_number integer required

The pull request number

min: 1 · max: 9223372036854776000

repository string required

The name of the repository

min length: 1 · max length: 100 · pattern: ^[\w\-\.]+$

owner string required

The owner of the repository

min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$

200 Successful Response
interrupted_batchesintegerrequired

Number of in-progress batches whose checks would be interrupted and restarted if this pull request is dequeued

rechecked_pull_requestsintegerrequired

Number of other pull requests from the interrupted batches that would be re-embarked and rechecked

cascaded_pull_requestsintegerrequired

Number of queued pull requests stacked on top of this one that would also be dequeued (excludes the dequeued pull request itself)

Example Response
                          {
  "interrupted_batches": 0,
  "rechecked_pull_requests": 0,
  "cascaded_pull_requests": 0
}
                        
403 Forbidden
404 `PULL_REQUEST_NOT_QUEUED`: The pull request is not in any merge queue of the repository.
detailstringrequired
error_code"CI_ADMIN_ROLE_REQUIRED" | "CI_ID_TOKEN_AUDIENCE_REFUSED" | "CI_ID_TOKEN_EXCHANGE_NOT_ENABLED" | "CI_ID_TOKEN_EXPIRED" | "CI_ID_TOKEN_INVALID" | "CI_ID_TOKEN_ISSUER_REFUSED" | "CI_ID_TOKEN_ISSUER_UNAVAILABLE" | "CI_ID_TOKEN_NO_MATCHING_TRUST_POLICY" | "CI_ID_TOKEN_NO_TRUST_POLICY" | "CI_ID_TOKEN_REPOSITORY_NOT_INSTALLED" | "CI_TOKEN_SCOPES_TARGET_REFUSED" | "CI_TRACES_UPLOAD_UNUSABLE" | "CI_TRUST_POLICY_NAME_TAKEN" | "COMMAND_RESTRICTED" | "CONFIGURATION_BRANCH_REFUSED" | "CONFIGURATION_INVALID" | "CONFIGURATION_REFUSED_BY_REPOSITORY_RULES" | "CONFIGURATION_SIGNED_COMMITS_REQUIRED" | "DEFAULT_BRANCH_NOT_FOUND" | "GITHUB_ACCOUNT_SUSPENDED" | "GITHUB_APP_ACCESS_LOST" | "GITHUB_RATE_LIMITED" | "GITHUB_UPSTREAM_REQUEST_FORBIDDEN" | "GITHUB_UPSTREAM_REQUEST_REJECTED" | "GITHUB_UPSTREAM_UNAVAILABLE" | "ID_TOKEN_KEY_ROTATION_REFUSED" | "INTEGRATION_NOT_CONFIGURED" | "IP_ALLOW_LIST_NOT_CONFIGURED" | "MERGE_QUEUE_DISABLED" | "MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN" | "MERGE_QUEUE_SETTING_NOT_AVAILABLE" | "NO_LOGIN_IN_PROGRESS" | "ORGANIZATION_MEMBERS_ONLY" | "PIPELINE_NAME_TAKEN" | "PIPELINE_NOT_FOUND" | "PIPELINE_RUN_NOT_FOUND" | "PIPELINE_SECRETS_KEY_ALREADY_ADDED" | "PIPELINE_SECRETS_KEY_IN_USE" | "PIPELINE_SECRETS_KEY_LIMIT_REACHED" | "PIPELINE_SECRETS_KEY_NOT_ACTIVE" | "PIPELINE_SECRETS_KEY_NOT_FOUND" | "PIPELINE_SECRETS_KEY_REPORTED" | "PIPELINE_SECRET_LIMIT_REACHED" | "PIPELINE_SECRET_NAME_TAKEN" | "PIPELINE_SECRET_NOT_FOUND" | "PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS" | "PIPELINE_SECRET_VERSION_CHANGED" | "PULL_REQUEST_ALREADY_QUEUED" | "PULL_REQUEST_NOT_FOUND" | "PULL_REQUEST_NOT_QUEUEABLE" | "PULL_REQUEST_NOT_QUEUED" | "RETRY_RULE_NOT_FOUND" | "SAML_ENFORCEMENT_NOT_AUTHORIZED" | "SETTING_MANAGED_BY_ENV" | "SETUP_ALREADY_DONE" | "SETUP_TOKEN_MISMATCH" | "SUBSCRIPTION_API_UNAVAILABLE" | "SUBSCRIPTION_INACTIVE" | "SUBSCRIPTION_TOKEN_INVALID" | "TEST_ALREADY_QUARANTINED" | "TEST_BRANCH_NOT_TRACKED" | "TEST_RETRY_NOT_CONFIGURED" | "TEST_STATE_OVERLAP"
Enum: CI_ADMIN_ROLE_REQUIRED CI_ID_TOKEN_AUDIENCE_REFUSED CI_ID_TOKEN_EXCHANGE_NOT_ENABLED CI_ID_TOKEN_EXPIRED CI_ID_TOKEN_INVALID CI_ID_TOKEN_ISSUER_REFUSED CI_ID_TOKEN_ISSUER_UNAVAILABLE CI_ID_TOKEN_NO_MATCHING_TRUST_POLICY CI_ID_TOKEN_NO_TRUST_POLICY CI_ID_TOKEN_REPOSITORY_NOT_INSTALLED CI_TOKEN_SCOPES_TARGET_REFUSED CI_TRACES_UPLOAD_UNUSABLE CI_TRUST_POLICY_NAME_TAKEN COMMAND_RESTRICTED CONFIGURATION_BRANCH_REFUSED CONFIGURATION_INVALID CONFIGURATION_REFUSED_BY_REPOSITORY_RULES CONFIGURATION_SIGNED_COMMITS_REQUIRED DEFAULT_BRANCH_NOT_FOUND GITHUB_ACCOUNT_SUSPENDED GITHUB_APP_ACCESS_LOST GITHUB_RATE_LIMITED GITHUB_UPSTREAM_REQUEST_FORBIDDEN GITHUB_UPSTREAM_REQUEST_REJECTED GITHUB_UPSTREAM_UNAVAILABLE ID_TOKEN_KEY_ROTATION_REFUSED INTEGRATION_NOT_CONFIGURED IP_ALLOW_LIST_NOT_CONFIGURED MERGE_QUEUE_DISABLED MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN MERGE_QUEUE_SETTING_NOT_AVAILABLE NO_LOGIN_IN_PROGRESS ORGANIZATION_MEMBERS_ONLY PIPELINE_NAME_TAKEN PIPELINE_NOT_FOUND PIPELINE_RUN_NOT_FOUND PIPELINE_SECRETS_KEY_ALREADY_ADDED PIPELINE_SECRETS_KEY_IN_USE PIPELINE_SECRETS_KEY_LIMIT_REACHED PIPELINE_SECRETS_KEY_NOT_ACTIVE PIPELINE_SECRETS_KEY_NOT_FOUND PIPELINE_SECRETS_KEY_REPORTED PIPELINE_SECRET_LIMIT_REACHED PIPELINE_SECRET_NAME_TAKEN PIPELINE_SECRET_NOT_FOUND PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS PIPELINE_SECRET_VERSION_CHANGED PULL_REQUEST_ALREADY_QUEUED PULL_REQUEST_NOT_FOUND PULL_REQUEST_NOT_QUEUEABLE PULL_REQUEST_NOT_QUEUED RETRY_RULE_NOT_FOUND SAML_ENFORCEMENT_NOT_AUTHORIZED SETTING_MANAGED_BY_ENV SETUP_ALREADY_DONE SETUP_TOKEN_MISMATCH SUBSCRIPTION_API_UNAVAILABLE SUBSCRIPTION_INACTIVE SUBSCRIPTION_TOKEN_INVALID TEST_ALREADY_QUARANTINED TEST_BRANCH_NOT_TRACKED TEST_RETRY_NOT_CONFIGURED TEST_STATE_OVERLAP
documentation_urlstring
Example Response
                          {
  "detail": "string",
  "error_code": "CI_ADMIN_ROLE_REQUIRED",
  "documentation_url": "string"
}
                        
409 Conflict
422 `CONFIGURATION_INVALID`: The repository's Mergify configuration is invalid. `extended_repository` names the repository its `extends` points to when the error is in that repository's configuration file, and is null otherwise, including when the error only appears once the two configurations are merged. The route's other 422s carry no `error_code`.
detailstringrequired
error_code"CI_ADMIN_ROLE_REQUIRED" | "CI_ID_TOKEN_AUDIENCE_REFUSED" | "CI_ID_TOKEN_EXCHANGE_NOT_ENABLED" | "CI_ID_TOKEN_EXPIRED" | "CI_ID_TOKEN_INVALID" | "CI_ID_TOKEN_ISSUER_REFUSED" | "CI_ID_TOKEN_ISSUER_UNAVAILABLE" | "CI_ID_TOKEN_NO_MATCHING_TRUST_POLICY" | "CI_ID_TOKEN_NO_TRUST_POLICY" | "CI_ID_TOKEN_REPOSITORY_NOT_INSTALLED" | "CI_TOKEN_SCOPES_TARGET_REFUSED" | "CI_TRACES_UPLOAD_UNUSABLE" | "CI_TRUST_POLICY_NAME_TAKEN" | "COMMAND_RESTRICTED" | "CONFIGURATION_BRANCH_REFUSED" | "CONFIGURATION_INVALID" | "CONFIGURATION_REFUSED_BY_REPOSITORY_RULES" | "CONFIGURATION_SIGNED_COMMITS_REQUIRED" | "DEFAULT_BRANCH_NOT_FOUND" | "GITHUB_ACCOUNT_SUSPENDED" | "GITHUB_APP_ACCESS_LOST" | "GITHUB_RATE_LIMITED" | "GITHUB_UPSTREAM_REQUEST_FORBIDDEN" | "GITHUB_UPSTREAM_REQUEST_REJECTED" | "GITHUB_UPSTREAM_UNAVAILABLE" | "ID_TOKEN_KEY_ROTATION_REFUSED" | "INTEGRATION_NOT_CONFIGURED" | "IP_ALLOW_LIST_NOT_CONFIGURED" | "MERGE_QUEUE_DISABLED" | "MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN" | "MERGE_QUEUE_SETTING_NOT_AVAILABLE" | "NO_LOGIN_IN_PROGRESS" | "ORGANIZATION_MEMBERS_ONLY" | "PIPELINE_NAME_TAKEN" | "PIPELINE_NOT_FOUND" | "PIPELINE_RUN_NOT_FOUND" | "PIPELINE_SECRETS_KEY_ALREADY_ADDED" | "PIPELINE_SECRETS_KEY_IN_USE" | "PIPELINE_SECRETS_KEY_LIMIT_REACHED" | "PIPELINE_SECRETS_KEY_NOT_ACTIVE" | "PIPELINE_SECRETS_KEY_NOT_FOUND" | "PIPELINE_SECRETS_KEY_REPORTED" | "PIPELINE_SECRET_LIMIT_REACHED" | "PIPELINE_SECRET_NAME_TAKEN" | "PIPELINE_SECRET_NOT_FOUND" | "PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS" | "PIPELINE_SECRET_VERSION_CHANGED" | "PULL_REQUEST_ALREADY_QUEUED" | "PULL_REQUEST_NOT_FOUND" | "PULL_REQUEST_NOT_QUEUEABLE" | "PULL_REQUEST_NOT_QUEUED" | "RETRY_RULE_NOT_FOUND" | "SAML_ENFORCEMENT_NOT_AUTHORIZED" | "SETTING_MANAGED_BY_ENV" | "SETUP_ALREADY_DONE" | "SETUP_TOKEN_MISMATCH" | "SUBSCRIPTION_API_UNAVAILABLE" | "SUBSCRIPTION_INACTIVE" | "SUBSCRIPTION_TOKEN_INVALID" | "TEST_ALREADY_QUARANTINED" | "TEST_BRANCH_NOT_TRACKED" | "TEST_RETRY_NOT_CONFIGURED" | "TEST_STATE_OVERLAP"
Enum: CI_ADMIN_ROLE_REQUIRED CI_ID_TOKEN_AUDIENCE_REFUSED CI_ID_TOKEN_EXCHANGE_NOT_ENABLED CI_ID_TOKEN_EXPIRED CI_ID_TOKEN_INVALID CI_ID_TOKEN_ISSUER_REFUSED CI_ID_TOKEN_ISSUER_UNAVAILABLE CI_ID_TOKEN_NO_MATCHING_TRUST_POLICY CI_ID_TOKEN_NO_TRUST_POLICY CI_ID_TOKEN_REPOSITORY_NOT_INSTALLED CI_TOKEN_SCOPES_TARGET_REFUSED CI_TRACES_UPLOAD_UNUSABLE CI_TRUST_POLICY_NAME_TAKEN COMMAND_RESTRICTED CONFIGURATION_BRANCH_REFUSED CONFIGURATION_INVALID CONFIGURATION_REFUSED_BY_REPOSITORY_RULES CONFIGURATION_SIGNED_COMMITS_REQUIRED DEFAULT_BRANCH_NOT_FOUND GITHUB_ACCOUNT_SUSPENDED GITHUB_APP_ACCESS_LOST GITHUB_RATE_LIMITED GITHUB_UPSTREAM_REQUEST_FORBIDDEN GITHUB_UPSTREAM_REQUEST_REJECTED GITHUB_UPSTREAM_UNAVAILABLE ID_TOKEN_KEY_ROTATION_REFUSED INTEGRATION_NOT_CONFIGURED IP_ALLOW_LIST_NOT_CONFIGURED MERGE_QUEUE_DISABLED MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN MERGE_QUEUE_SETTING_NOT_AVAILABLE NO_LOGIN_IN_PROGRESS ORGANIZATION_MEMBERS_ONLY PIPELINE_NAME_TAKEN PIPELINE_NOT_FOUND PIPELINE_RUN_NOT_FOUND PIPELINE_SECRETS_KEY_ALREADY_ADDED PIPELINE_SECRETS_KEY_IN_USE PIPELINE_SECRETS_KEY_LIMIT_REACHED PIPELINE_SECRETS_KEY_NOT_ACTIVE PIPELINE_SECRETS_KEY_NOT_FOUND PIPELINE_SECRETS_KEY_REPORTED PIPELINE_SECRET_LIMIT_REACHED PIPELINE_SECRET_NAME_TAKEN PIPELINE_SECRET_NOT_FOUND PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS PIPELINE_SECRET_VERSION_CHANGED PULL_REQUEST_ALREADY_QUEUED PULL_REQUEST_NOT_FOUND PULL_REQUEST_NOT_QUEUEABLE PULL_REQUEST_NOT_QUEUED RETRY_RULE_NOT_FOUND SAML_ENFORCEMENT_NOT_AUTHORIZED SETTING_MANAGED_BY_ENV SETUP_ALREADY_DONE SETUP_TOKEN_MISMATCH SUBSCRIPTION_API_UNAVAILABLE SUBSCRIPTION_INACTIVE SUBSCRIPTION_TOKEN_INVALID TEST_ALREADY_QUARANTINED TEST_BRANCH_NOT_TRACKED TEST_RETRY_NOT_CONFIGURED TEST_STATE_OVERLAP
documentation_urlstring
extended_repositorystring | null
Example Response
                          {
  "detail": "string",
  "error_code": "CI_ADMIN_ROLE_REQUIRED",
  "documentation_url": "string",
  "extended_repository": "string"
}
                        
Example Request
curl -X GET "https://api.mergify.com/v1/repos/:owner/:repository/merge-queue/pull/:pr_number/dequeue-impact" \
  -H "Authorization: Bearer <token>"

Queue a pull request #

POST /repos/{owner}/{repository}/merge-queue/pull/{pr_number}/queue

Add the given pull request to the merge queue, as the `queue` command does: it waits until it matches the `queue_conditions` of a queue rule, then enters the queue under the first one it matches. The request is accepted once checked; the pull request's queue status and the repository's events tell what became of it.

Admin Application Key Mergify User Token GitHub Token
pr_number integer required

The pull request number

min: -2147483648 · max: 2147483647

repository string required

The name of the repository

min length: 1 · max length: 100 · pattern: ^[\w\-\.]+$

owner string required

The owner of the repository

min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$

202 Successful Response
any
403 `COMMAND_RESTRICTED`: The `commands_restrictions` of the configuration do not let the caller run this command on the pull request.
detailstringrequired
error_code"CI_ADMIN_ROLE_REQUIRED" | "CI_ID_TOKEN_AUDIENCE_REFUSED" | "CI_ID_TOKEN_EXCHANGE_NOT_ENABLED" | "CI_ID_TOKEN_EXPIRED" | "CI_ID_TOKEN_INVALID" | "CI_ID_TOKEN_ISSUER_REFUSED" | "CI_ID_TOKEN_ISSUER_UNAVAILABLE" | "CI_ID_TOKEN_NO_MATCHING_TRUST_POLICY" | "CI_ID_TOKEN_NO_TRUST_POLICY" | "CI_ID_TOKEN_REPOSITORY_NOT_INSTALLED" | "CI_TOKEN_SCOPES_TARGET_REFUSED" | "CI_TRACES_UPLOAD_UNUSABLE" | "CI_TRUST_POLICY_NAME_TAKEN" | "COMMAND_RESTRICTED" | "CONFIGURATION_BRANCH_REFUSED" | "CONFIGURATION_INVALID" | "CONFIGURATION_REFUSED_BY_REPOSITORY_RULES" | "CONFIGURATION_SIGNED_COMMITS_REQUIRED" | "DEFAULT_BRANCH_NOT_FOUND" | "GITHUB_ACCOUNT_SUSPENDED" | "GITHUB_APP_ACCESS_LOST" | "GITHUB_RATE_LIMITED" | "GITHUB_UPSTREAM_REQUEST_FORBIDDEN" | "GITHUB_UPSTREAM_REQUEST_REJECTED" | "GITHUB_UPSTREAM_UNAVAILABLE" | "ID_TOKEN_KEY_ROTATION_REFUSED" | "INTEGRATION_NOT_CONFIGURED" | "IP_ALLOW_LIST_NOT_CONFIGURED" | "MERGE_QUEUE_DISABLED" | "MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN" | "MERGE_QUEUE_SETTING_NOT_AVAILABLE" | "NO_LOGIN_IN_PROGRESS" | "ORGANIZATION_MEMBERS_ONLY" | "PIPELINE_NAME_TAKEN" | "PIPELINE_NOT_FOUND" | "PIPELINE_RUN_NOT_FOUND" | "PIPELINE_SECRETS_KEY_ALREADY_ADDED" | "PIPELINE_SECRETS_KEY_IN_USE" | "PIPELINE_SECRETS_KEY_LIMIT_REACHED" | "PIPELINE_SECRETS_KEY_NOT_ACTIVE" | "PIPELINE_SECRETS_KEY_NOT_FOUND" | "PIPELINE_SECRETS_KEY_REPORTED" | "PIPELINE_SECRET_LIMIT_REACHED" | "PIPELINE_SECRET_NAME_TAKEN" | "PIPELINE_SECRET_NOT_FOUND" | "PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS" | "PIPELINE_SECRET_VERSION_CHANGED" | "PULL_REQUEST_ALREADY_QUEUED" | "PULL_REQUEST_NOT_FOUND" | "PULL_REQUEST_NOT_QUEUEABLE" | "PULL_REQUEST_NOT_QUEUED" | "RETRY_RULE_NOT_FOUND" | "SAML_ENFORCEMENT_NOT_AUTHORIZED" | "SETTING_MANAGED_BY_ENV" | "SETUP_ALREADY_DONE" | "SETUP_TOKEN_MISMATCH" | "SUBSCRIPTION_API_UNAVAILABLE" | "SUBSCRIPTION_INACTIVE" | "SUBSCRIPTION_TOKEN_INVALID" | "TEST_ALREADY_QUARANTINED" | "TEST_BRANCH_NOT_TRACKED" | "TEST_RETRY_NOT_CONFIGURED" | "TEST_STATE_OVERLAP"
Enum: CI_ADMIN_ROLE_REQUIRED CI_ID_TOKEN_AUDIENCE_REFUSED CI_ID_TOKEN_EXCHANGE_NOT_ENABLED CI_ID_TOKEN_EXPIRED CI_ID_TOKEN_INVALID CI_ID_TOKEN_ISSUER_REFUSED CI_ID_TOKEN_ISSUER_UNAVAILABLE CI_ID_TOKEN_NO_MATCHING_TRUST_POLICY CI_ID_TOKEN_NO_TRUST_POLICY CI_ID_TOKEN_REPOSITORY_NOT_INSTALLED CI_TOKEN_SCOPES_TARGET_REFUSED CI_TRACES_UPLOAD_UNUSABLE CI_TRUST_POLICY_NAME_TAKEN COMMAND_RESTRICTED CONFIGURATION_BRANCH_REFUSED CONFIGURATION_INVALID CONFIGURATION_REFUSED_BY_REPOSITORY_RULES CONFIGURATION_SIGNED_COMMITS_REQUIRED DEFAULT_BRANCH_NOT_FOUND GITHUB_ACCOUNT_SUSPENDED GITHUB_APP_ACCESS_LOST GITHUB_RATE_LIMITED GITHUB_UPSTREAM_REQUEST_FORBIDDEN GITHUB_UPSTREAM_REQUEST_REJECTED GITHUB_UPSTREAM_UNAVAILABLE ID_TOKEN_KEY_ROTATION_REFUSED INTEGRATION_NOT_CONFIGURED IP_ALLOW_LIST_NOT_CONFIGURED MERGE_QUEUE_DISABLED MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN MERGE_QUEUE_SETTING_NOT_AVAILABLE NO_LOGIN_IN_PROGRESS ORGANIZATION_MEMBERS_ONLY PIPELINE_NAME_TAKEN PIPELINE_NOT_FOUND PIPELINE_RUN_NOT_FOUND PIPELINE_SECRETS_KEY_ALREADY_ADDED PIPELINE_SECRETS_KEY_IN_USE PIPELINE_SECRETS_KEY_LIMIT_REACHED PIPELINE_SECRETS_KEY_NOT_ACTIVE PIPELINE_SECRETS_KEY_NOT_FOUND PIPELINE_SECRETS_KEY_REPORTED PIPELINE_SECRET_LIMIT_REACHED PIPELINE_SECRET_NAME_TAKEN PIPELINE_SECRET_NOT_FOUND PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS PIPELINE_SECRET_VERSION_CHANGED PULL_REQUEST_ALREADY_QUEUED PULL_REQUEST_NOT_FOUND PULL_REQUEST_NOT_QUEUEABLE PULL_REQUEST_NOT_QUEUED RETRY_RULE_NOT_FOUND SAML_ENFORCEMENT_NOT_AUTHORIZED SETTING_MANAGED_BY_ENV SETUP_ALREADY_DONE SETUP_TOKEN_MISMATCH SUBSCRIPTION_API_UNAVAILABLE SUBSCRIPTION_INACTIVE SUBSCRIPTION_TOKEN_INVALID TEST_ALREADY_QUARANTINED TEST_BRANCH_NOT_TRACKED TEST_RETRY_NOT_CONFIGURED TEST_STATE_OVERLAP
documentation_urlstring
Example Response
                          {
  "detail": "string",
  "error_code": "CI_ADMIN_ROLE_REQUIRED",
  "documentation_url": "string"
}
                        
404 `PULL_REQUEST_NOT_FOUND`: The repository has no such pull request.
detailstringrequired
error_code"CI_ADMIN_ROLE_REQUIRED" | "CI_ID_TOKEN_AUDIENCE_REFUSED" | "CI_ID_TOKEN_EXCHANGE_NOT_ENABLED" | "CI_ID_TOKEN_EXPIRED" | "CI_ID_TOKEN_INVALID" | "CI_ID_TOKEN_ISSUER_REFUSED" | "CI_ID_TOKEN_ISSUER_UNAVAILABLE" | "CI_ID_TOKEN_NO_MATCHING_TRUST_POLICY" | "CI_ID_TOKEN_NO_TRUST_POLICY" | "CI_ID_TOKEN_REPOSITORY_NOT_INSTALLED" | "CI_TOKEN_SCOPES_TARGET_REFUSED" | "CI_TRACES_UPLOAD_UNUSABLE" | "CI_TRUST_POLICY_NAME_TAKEN" | "COMMAND_RESTRICTED" | "CONFIGURATION_BRANCH_REFUSED" | "CONFIGURATION_INVALID" | "CONFIGURATION_REFUSED_BY_REPOSITORY_RULES" | "CONFIGURATION_SIGNED_COMMITS_REQUIRED" | "DEFAULT_BRANCH_NOT_FOUND" | "GITHUB_ACCOUNT_SUSPENDED" | "GITHUB_APP_ACCESS_LOST" | "GITHUB_RATE_LIMITED" | "GITHUB_UPSTREAM_REQUEST_FORBIDDEN" | "GITHUB_UPSTREAM_REQUEST_REJECTED" | "GITHUB_UPSTREAM_UNAVAILABLE" | "ID_TOKEN_KEY_ROTATION_REFUSED" | "INTEGRATION_NOT_CONFIGURED" | "IP_ALLOW_LIST_NOT_CONFIGURED" | "MERGE_QUEUE_DISABLED" | "MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN" | "MERGE_QUEUE_SETTING_NOT_AVAILABLE" | "NO_LOGIN_IN_PROGRESS" | "ORGANIZATION_MEMBERS_ONLY" | "PIPELINE_NAME_TAKEN" | "PIPELINE_NOT_FOUND" | "PIPELINE_RUN_NOT_FOUND" | "PIPELINE_SECRETS_KEY_ALREADY_ADDED" | "PIPELINE_SECRETS_KEY_IN_USE" | "PIPELINE_SECRETS_KEY_LIMIT_REACHED" | "PIPELINE_SECRETS_KEY_NOT_ACTIVE" | "PIPELINE_SECRETS_KEY_NOT_FOUND" | "PIPELINE_SECRETS_KEY_REPORTED" | "PIPELINE_SECRET_LIMIT_REACHED" | "PIPELINE_SECRET_NAME_TAKEN" | "PIPELINE_SECRET_NOT_FOUND" | "PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS" | "PIPELINE_SECRET_VERSION_CHANGED" | "PULL_REQUEST_ALREADY_QUEUED" | "PULL_REQUEST_NOT_FOUND" | "PULL_REQUEST_NOT_QUEUEABLE" | "PULL_REQUEST_NOT_QUEUED" | "RETRY_RULE_NOT_FOUND" | "SAML_ENFORCEMENT_NOT_AUTHORIZED" | "SETTING_MANAGED_BY_ENV" | "SETUP_ALREADY_DONE" | "SETUP_TOKEN_MISMATCH" | "SUBSCRIPTION_API_UNAVAILABLE" | "SUBSCRIPTION_INACTIVE" | "SUBSCRIPTION_TOKEN_INVALID" | "TEST_ALREADY_QUARANTINED" | "TEST_BRANCH_NOT_TRACKED" | "TEST_RETRY_NOT_CONFIGURED" | "TEST_STATE_OVERLAP"
Enum: CI_ADMIN_ROLE_REQUIRED CI_ID_TOKEN_AUDIENCE_REFUSED CI_ID_TOKEN_EXCHANGE_NOT_ENABLED CI_ID_TOKEN_EXPIRED CI_ID_TOKEN_INVALID CI_ID_TOKEN_ISSUER_REFUSED CI_ID_TOKEN_ISSUER_UNAVAILABLE CI_ID_TOKEN_NO_MATCHING_TRUST_POLICY CI_ID_TOKEN_NO_TRUST_POLICY CI_ID_TOKEN_REPOSITORY_NOT_INSTALLED CI_TOKEN_SCOPES_TARGET_REFUSED CI_TRACES_UPLOAD_UNUSABLE CI_TRUST_POLICY_NAME_TAKEN COMMAND_RESTRICTED CONFIGURATION_BRANCH_REFUSED CONFIGURATION_INVALID CONFIGURATION_REFUSED_BY_REPOSITORY_RULES CONFIGURATION_SIGNED_COMMITS_REQUIRED DEFAULT_BRANCH_NOT_FOUND GITHUB_ACCOUNT_SUSPENDED GITHUB_APP_ACCESS_LOST GITHUB_RATE_LIMITED GITHUB_UPSTREAM_REQUEST_FORBIDDEN GITHUB_UPSTREAM_REQUEST_REJECTED GITHUB_UPSTREAM_UNAVAILABLE ID_TOKEN_KEY_ROTATION_REFUSED INTEGRATION_NOT_CONFIGURED IP_ALLOW_LIST_NOT_CONFIGURED MERGE_QUEUE_DISABLED MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN MERGE_QUEUE_SETTING_NOT_AVAILABLE NO_LOGIN_IN_PROGRESS ORGANIZATION_MEMBERS_ONLY PIPELINE_NAME_TAKEN PIPELINE_NOT_FOUND PIPELINE_RUN_NOT_FOUND PIPELINE_SECRETS_KEY_ALREADY_ADDED PIPELINE_SECRETS_KEY_IN_USE PIPELINE_SECRETS_KEY_LIMIT_REACHED PIPELINE_SECRETS_KEY_NOT_ACTIVE PIPELINE_SECRETS_KEY_NOT_FOUND PIPELINE_SECRETS_KEY_REPORTED PIPELINE_SECRET_LIMIT_REACHED PIPELINE_SECRET_NAME_TAKEN PIPELINE_SECRET_NOT_FOUND PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS PIPELINE_SECRET_VERSION_CHANGED PULL_REQUEST_ALREADY_QUEUED PULL_REQUEST_NOT_FOUND PULL_REQUEST_NOT_QUEUEABLE PULL_REQUEST_NOT_QUEUED RETRY_RULE_NOT_FOUND SAML_ENFORCEMENT_NOT_AUTHORIZED SETTING_MANAGED_BY_ENV SETUP_ALREADY_DONE SETUP_TOKEN_MISMATCH SUBSCRIPTION_API_UNAVAILABLE SUBSCRIPTION_INACTIVE SUBSCRIPTION_TOKEN_INVALID TEST_ALREADY_QUARANTINED TEST_BRANCH_NOT_TRACKED TEST_RETRY_NOT_CONFIGURED TEST_STATE_OVERLAP
documentation_urlstring
Example Response
                          {
  "detail": "string",
  "error_code": "CI_ADMIN_ROLE_REQUIRED",
  "documentation_url": "string"
}
                        
409 `PULL_REQUEST_NOT_QUEUEABLE`: The pull request cannot be queued: it is closed, merged or locked, or it is a pull request the merge queue opened itself. `PULL_REQUEST_ALREADY_QUEUED`: The pull request is already in a merge queue of the repository. `MERGE_QUEUE_DISABLED`: The merge queue is not enabled on the repository.
detailstringrequired
error_code"CI_ADMIN_ROLE_REQUIRED" | "CI_ID_TOKEN_AUDIENCE_REFUSED" | "CI_ID_TOKEN_EXCHANGE_NOT_ENABLED" | "CI_ID_TOKEN_EXPIRED" | "CI_ID_TOKEN_INVALID" | "CI_ID_TOKEN_ISSUER_REFUSED" | "CI_ID_TOKEN_ISSUER_UNAVAILABLE" | "CI_ID_TOKEN_NO_MATCHING_TRUST_POLICY" | "CI_ID_TOKEN_NO_TRUST_POLICY" | "CI_ID_TOKEN_REPOSITORY_NOT_INSTALLED" | "CI_TOKEN_SCOPES_TARGET_REFUSED" | "CI_TRACES_UPLOAD_UNUSABLE" | "CI_TRUST_POLICY_NAME_TAKEN" | "COMMAND_RESTRICTED" | "CONFIGURATION_BRANCH_REFUSED" | "CONFIGURATION_INVALID" | "CONFIGURATION_REFUSED_BY_REPOSITORY_RULES" | "CONFIGURATION_SIGNED_COMMITS_REQUIRED" | "DEFAULT_BRANCH_NOT_FOUND" | "GITHUB_ACCOUNT_SUSPENDED" | "GITHUB_APP_ACCESS_LOST" | "GITHUB_RATE_LIMITED" | "GITHUB_UPSTREAM_REQUEST_FORBIDDEN" | "GITHUB_UPSTREAM_REQUEST_REJECTED" | "GITHUB_UPSTREAM_UNAVAILABLE" | "ID_TOKEN_KEY_ROTATION_REFUSED" | "INTEGRATION_NOT_CONFIGURED" | "IP_ALLOW_LIST_NOT_CONFIGURED" | "MERGE_QUEUE_DISABLED" | "MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN" | "MERGE_QUEUE_SETTING_NOT_AVAILABLE" | "NO_LOGIN_IN_PROGRESS" | "ORGANIZATION_MEMBERS_ONLY" | "PIPELINE_NAME_TAKEN" | "PIPELINE_NOT_FOUND" | "PIPELINE_RUN_NOT_FOUND" | "PIPELINE_SECRETS_KEY_ALREADY_ADDED" | "PIPELINE_SECRETS_KEY_IN_USE" | "PIPELINE_SECRETS_KEY_LIMIT_REACHED" | "PIPELINE_SECRETS_KEY_NOT_ACTIVE" | "PIPELINE_SECRETS_KEY_NOT_FOUND" | "PIPELINE_SECRETS_KEY_REPORTED" | "PIPELINE_SECRET_LIMIT_REACHED" | "PIPELINE_SECRET_NAME_TAKEN" | "PIPELINE_SECRET_NOT_FOUND" | "PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS" | "PIPELINE_SECRET_VERSION_CHANGED" | "PULL_REQUEST_ALREADY_QUEUED" | "PULL_REQUEST_NOT_FOUND" | "PULL_REQUEST_NOT_QUEUEABLE" | "PULL_REQUEST_NOT_QUEUED" | "RETRY_RULE_NOT_FOUND" | "SAML_ENFORCEMENT_NOT_AUTHORIZED" | "SETTING_MANAGED_BY_ENV" | "SETUP_ALREADY_DONE" | "SETUP_TOKEN_MISMATCH" | "SUBSCRIPTION_API_UNAVAILABLE" | "SUBSCRIPTION_INACTIVE" | "SUBSCRIPTION_TOKEN_INVALID" | "TEST_ALREADY_QUARANTINED" | "TEST_BRANCH_NOT_TRACKED" | "TEST_RETRY_NOT_CONFIGURED" | "TEST_STATE_OVERLAP"
Enum: CI_ADMIN_ROLE_REQUIRED CI_ID_TOKEN_AUDIENCE_REFUSED CI_ID_TOKEN_EXCHANGE_NOT_ENABLED CI_ID_TOKEN_EXPIRED CI_ID_TOKEN_INVALID CI_ID_TOKEN_ISSUER_REFUSED CI_ID_TOKEN_ISSUER_UNAVAILABLE CI_ID_TOKEN_NO_MATCHING_TRUST_POLICY CI_ID_TOKEN_NO_TRUST_POLICY CI_ID_TOKEN_REPOSITORY_NOT_INSTALLED CI_TOKEN_SCOPES_TARGET_REFUSED CI_TRACES_UPLOAD_UNUSABLE CI_TRUST_POLICY_NAME_TAKEN COMMAND_RESTRICTED CONFIGURATION_BRANCH_REFUSED CONFIGURATION_INVALID CONFIGURATION_REFUSED_BY_REPOSITORY_RULES CONFIGURATION_SIGNED_COMMITS_REQUIRED DEFAULT_BRANCH_NOT_FOUND GITHUB_ACCOUNT_SUSPENDED GITHUB_APP_ACCESS_LOST GITHUB_RATE_LIMITED GITHUB_UPSTREAM_REQUEST_FORBIDDEN GITHUB_UPSTREAM_REQUEST_REJECTED GITHUB_UPSTREAM_UNAVAILABLE ID_TOKEN_KEY_ROTATION_REFUSED INTEGRATION_NOT_CONFIGURED IP_ALLOW_LIST_NOT_CONFIGURED MERGE_QUEUE_DISABLED MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN MERGE_QUEUE_SETTING_NOT_AVAILABLE NO_LOGIN_IN_PROGRESS ORGANIZATION_MEMBERS_ONLY PIPELINE_NAME_TAKEN PIPELINE_NOT_FOUND PIPELINE_RUN_NOT_FOUND PIPELINE_SECRETS_KEY_ALREADY_ADDED PIPELINE_SECRETS_KEY_IN_USE PIPELINE_SECRETS_KEY_LIMIT_REACHED PIPELINE_SECRETS_KEY_NOT_ACTIVE PIPELINE_SECRETS_KEY_NOT_FOUND PIPELINE_SECRETS_KEY_REPORTED PIPELINE_SECRET_LIMIT_REACHED PIPELINE_SECRET_NAME_TAKEN PIPELINE_SECRET_NOT_FOUND PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS PIPELINE_SECRET_VERSION_CHANGED PULL_REQUEST_ALREADY_QUEUED PULL_REQUEST_NOT_FOUND PULL_REQUEST_NOT_QUEUEABLE PULL_REQUEST_NOT_QUEUED RETRY_RULE_NOT_FOUND SAML_ENFORCEMENT_NOT_AUTHORIZED SETTING_MANAGED_BY_ENV SETUP_ALREADY_DONE SETUP_TOKEN_MISMATCH SUBSCRIPTION_API_UNAVAILABLE SUBSCRIPTION_INACTIVE SUBSCRIPTION_TOKEN_INVALID TEST_ALREADY_QUARANTINED TEST_BRANCH_NOT_TRACKED TEST_RETRY_NOT_CONFIGURED TEST_STATE_OVERLAP
documentation_urlstring
Example Response
                          {
  "detail": "string",
  "error_code": "CI_ADMIN_ROLE_REQUIRED",
  "documentation_url": "string"
}
                        
422 `CONFIGURATION_INVALID`: The repository's Mergify configuration is invalid. `extended_repository` names the repository its `extends` points to when the error is in that repository's configuration file, and is null otherwise, including when the error only appears once the two configurations are merged. The route's other 422s carry no `error_code`.
detailstringrequired
error_code"CI_ADMIN_ROLE_REQUIRED" | "CI_ID_TOKEN_AUDIENCE_REFUSED" | "CI_ID_TOKEN_EXCHANGE_NOT_ENABLED" | "CI_ID_TOKEN_EXPIRED" | "CI_ID_TOKEN_INVALID" | "CI_ID_TOKEN_ISSUER_REFUSED" | "CI_ID_TOKEN_ISSUER_UNAVAILABLE" | "CI_ID_TOKEN_NO_MATCHING_TRUST_POLICY" | "CI_ID_TOKEN_NO_TRUST_POLICY" | "CI_ID_TOKEN_REPOSITORY_NOT_INSTALLED" | "CI_TOKEN_SCOPES_TARGET_REFUSED" | "CI_TRACES_UPLOAD_UNUSABLE" | "CI_TRUST_POLICY_NAME_TAKEN" | "COMMAND_RESTRICTED" | "CONFIGURATION_BRANCH_REFUSED" | "CONFIGURATION_INVALID" | "CONFIGURATION_REFUSED_BY_REPOSITORY_RULES" | "CONFIGURATION_SIGNED_COMMITS_REQUIRED" | "DEFAULT_BRANCH_NOT_FOUND" | "GITHUB_ACCOUNT_SUSPENDED" | "GITHUB_APP_ACCESS_LOST" | "GITHUB_RATE_LIMITED" | "GITHUB_UPSTREAM_REQUEST_FORBIDDEN" | "GITHUB_UPSTREAM_REQUEST_REJECTED" | "GITHUB_UPSTREAM_UNAVAILABLE" | "ID_TOKEN_KEY_ROTATION_REFUSED" | "INTEGRATION_NOT_CONFIGURED" | "IP_ALLOW_LIST_NOT_CONFIGURED" | "MERGE_QUEUE_DISABLED" | "MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN" | "MERGE_QUEUE_SETTING_NOT_AVAILABLE" | "NO_LOGIN_IN_PROGRESS" | "ORGANIZATION_MEMBERS_ONLY" | "PIPELINE_NAME_TAKEN" | "PIPELINE_NOT_FOUND" | "PIPELINE_RUN_NOT_FOUND" | "PIPELINE_SECRETS_KEY_ALREADY_ADDED" | "PIPELINE_SECRETS_KEY_IN_USE" | "PIPELINE_SECRETS_KEY_LIMIT_REACHED" | "PIPELINE_SECRETS_KEY_NOT_ACTIVE" | "PIPELINE_SECRETS_KEY_NOT_FOUND" | "PIPELINE_SECRETS_KEY_REPORTED" | "PIPELINE_SECRET_LIMIT_REACHED" | "PIPELINE_SECRET_NAME_TAKEN" | "PIPELINE_SECRET_NOT_FOUND" | "PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS" | "PIPELINE_SECRET_VERSION_CHANGED" | "PULL_REQUEST_ALREADY_QUEUED" | "PULL_REQUEST_NOT_FOUND" | "PULL_REQUEST_NOT_QUEUEABLE" | "PULL_REQUEST_NOT_QUEUED" | "RETRY_RULE_NOT_FOUND" | "SAML_ENFORCEMENT_NOT_AUTHORIZED" | "SETTING_MANAGED_BY_ENV" | "SETUP_ALREADY_DONE" | "SETUP_TOKEN_MISMATCH" | "SUBSCRIPTION_API_UNAVAILABLE" | "SUBSCRIPTION_INACTIVE" | "SUBSCRIPTION_TOKEN_INVALID" | "TEST_ALREADY_QUARANTINED" | "TEST_BRANCH_NOT_TRACKED" | "TEST_RETRY_NOT_CONFIGURED" | "TEST_STATE_OVERLAP"
Enum: CI_ADMIN_ROLE_REQUIRED CI_ID_TOKEN_AUDIENCE_REFUSED CI_ID_TOKEN_EXCHANGE_NOT_ENABLED CI_ID_TOKEN_EXPIRED CI_ID_TOKEN_INVALID CI_ID_TOKEN_ISSUER_REFUSED CI_ID_TOKEN_ISSUER_UNAVAILABLE CI_ID_TOKEN_NO_MATCHING_TRUST_POLICY CI_ID_TOKEN_NO_TRUST_POLICY CI_ID_TOKEN_REPOSITORY_NOT_INSTALLED CI_TOKEN_SCOPES_TARGET_REFUSED CI_TRACES_UPLOAD_UNUSABLE CI_TRUST_POLICY_NAME_TAKEN COMMAND_RESTRICTED CONFIGURATION_BRANCH_REFUSED CONFIGURATION_INVALID CONFIGURATION_REFUSED_BY_REPOSITORY_RULES CONFIGURATION_SIGNED_COMMITS_REQUIRED DEFAULT_BRANCH_NOT_FOUND GITHUB_ACCOUNT_SUSPENDED GITHUB_APP_ACCESS_LOST GITHUB_RATE_LIMITED GITHUB_UPSTREAM_REQUEST_FORBIDDEN GITHUB_UPSTREAM_REQUEST_REJECTED GITHUB_UPSTREAM_UNAVAILABLE ID_TOKEN_KEY_ROTATION_REFUSED INTEGRATION_NOT_CONFIGURED IP_ALLOW_LIST_NOT_CONFIGURED MERGE_QUEUE_DISABLED MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN MERGE_QUEUE_SETTING_NOT_AVAILABLE NO_LOGIN_IN_PROGRESS ORGANIZATION_MEMBERS_ONLY PIPELINE_NAME_TAKEN PIPELINE_NOT_FOUND PIPELINE_RUN_NOT_FOUND PIPELINE_SECRETS_KEY_ALREADY_ADDED PIPELINE_SECRETS_KEY_IN_USE PIPELINE_SECRETS_KEY_LIMIT_REACHED PIPELINE_SECRETS_KEY_NOT_ACTIVE PIPELINE_SECRETS_KEY_NOT_FOUND PIPELINE_SECRETS_KEY_REPORTED PIPELINE_SECRET_LIMIT_REACHED PIPELINE_SECRET_NAME_TAKEN PIPELINE_SECRET_NOT_FOUND PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS PIPELINE_SECRET_VERSION_CHANGED PULL_REQUEST_ALREADY_QUEUED PULL_REQUEST_NOT_FOUND PULL_REQUEST_NOT_QUEUEABLE PULL_REQUEST_NOT_QUEUED RETRY_RULE_NOT_FOUND SAML_ENFORCEMENT_NOT_AUTHORIZED SETTING_MANAGED_BY_ENV SETUP_ALREADY_DONE SETUP_TOKEN_MISMATCH SUBSCRIPTION_API_UNAVAILABLE SUBSCRIPTION_INACTIVE SUBSCRIPTION_TOKEN_INVALID TEST_ALREADY_QUARANTINED TEST_BRANCH_NOT_TRACKED TEST_RETRY_NOT_CONFIGURED TEST_STATE_OVERLAP
documentation_urlstring
extended_repositorystring | null
Example Response
                          {
  "detail": "string",
  "error_code": "CI_ADMIN_ROLE_REQUIRED",
  "documentation_url": "string",
  "extended_repository": "string"
}
                        
Example Request
curl -X POST "https://api.mergify.com/v1/repos/:owner/:repository/merge-queue/pull/:pr_number/queue" \
  -H "Authorization: Bearer <token>"

Dequeue a pull request from the merge queue #

POST /repos/{owner}/{repository}/merge-queue/pull/{pr_number}/dequeue

Manually remove the given pull request (and its queued stack successors) from the merge queue, or cancel its queue request while it waits for the queue conditions of its queue rule

Admin Application Key Mergify User Token GitHub Token
pr_number integer required

The pull request number

min: -2147483648 · max: 2147483647

repository string required

The name of the repository

min length: 1 · max length: 100 · pattern: ^[\w\-\.]+$

owner string required

The owner of the repository

min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$

204 Successful Response
403 `COMMAND_RESTRICTED`: The `commands_restrictions` of the configuration do not let the caller run this command on the pull request.
detailstringrequired
error_code"CI_ADMIN_ROLE_REQUIRED" | "CI_ID_TOKEN_AUDIENCE_REFUSED" | "CI_ID_TOKEN_EXCHANGE_NOT_ENABLED" | "CI_ID_TOKEN_EXPIRED" | "CI_ID_TOKEN_INVALID" | "CI_ID_TOKEN_ISSUER_REFUSED" | "CI_ID_TOKEN_ISSUER_UNAVAILABLE" | "CI_ID_TOKEN_NO_MATCHING_TRUST_POLICY" | "CI_ID_TOKEN_NO_TRUST_POLICY" | "CI_ID_TOKEN_REPOSITORY_NOT_INSTALLED" | "CI_TOKEN_SCOPES_TARGET_REFUSED" | "CI_TRACES_UPLOAD_UNUSABLE" | "CI_TRUST_POLICY_NAME_TAKEN" | "COMMAND_RESTRICTED" | "CONFIGURATION_BRANCH_REFUSED" | "CONFIGURATION_INVALID" | "CONFIGURATION_REFUSED_BY_REPOSITORY_RULES" | "CONFIGURATION_SIGNED_COMMITS_REQUIRED" | "DEFAULT_BRANCH_NOT_FOUND" | "GITHUB_ACCOUNT_SUSPENDED" | "GITHUB_APP_ACCESS_LOST" | "GITHUB_RATE_LIMITED" | "GITHUB_UPSTREAM_REQUEST_FORBIDDEN" | "GITHUB_UPSTREAM_REQUEST_REJECTED" | "GITHUB_UPSTREAM_UNAVAILABLE" | "ID_TOKEN_KEY_ROTATION_REFUSED" | "INTEGRATION_NOT_CONFIGURED" | "IP_ALLOW_LIST_NOT_CONFIGURED" | "MERGE_QUEUE_DISABLED" | "MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN" | "MERGE_QUEUE_SETTING_NOT_AVAILABLE" | "NO_LOGIN_IN_PROGRESS" | "ORGANIZATION_MEMBERS_ONLY" | "PIPELINE_NAME_TAKEN" | "PIPELINE_NOT_FOUND" | "PIPELINE_RUN_NOT_FOUND" | "PIPELINE_SECRETS_KEY_ALREADY_ADDED" | "PIPELINE_SECRETS_KEY_IN_USE" | "PIPELINE_SECRETS_KEY_LIMIT_REACHED" | "PIPELINE_SECRETS_KEY_NOT_ACTIVE" | "PIPELINE_SECRETS_KEY_NOT_FOUND" | "PIPELINE_SECRETS_KEY_REPORTED" | "PIPELINE_SECRET_LIMIT_REACHED" | "PIPELINE_SECRET_NAME_TAKEN" | "PIPELINE_SECRET_NOT_FOUND" | "PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS" | "PIPELINE_SECRET_VERSION_CHANGED" | "PULL_REQUEST_ALREADY_QUEUED" | "PULL_REQUEST_NOT_FOUND" | "PULL_REQUEST_NOT_QUEUEABLE" | "PULL_REQUEST_NOT_QUEUED" | "RETRY_RULE_NOT_FOUND" | "SAML_ENFORCEMENT_NOT_AUTHORIZED" | "SETTING_MANAGED_BY_ENV" | "SETUP_ALREADY_DONE" | "SETUP_TOKEN_MISMATCH" | "SUBSCRIPTION_API_UNAVAILABLE" | "SUBSCRIPTION_INACTIVE" | "SUBSCRIPTION_TOKEN_INVALID" | "TEST_ALREADY_QUARANTINED" | "TEST_BRANCH_NOT_TRACKED" | "TEST_RETRY_NOT_CONFIGURED" | "TEST_STATE_OVERLAP"
Enum: CI_ADMIN_ROLE_REQUIRED CI_ID_TOKEN_AUDIENCE_REFUSED CI_ID_TOKEN_EXCHANGE_NOT_ENABLED CI_ID_TOKEN_EXPIRED CI_ID_TOKEN_INVALID CI_ID_TOKEN_ISSUER_REFUSED CI_ID_TOKEN_ISSUER_UNAVAILABLE CI_ID_TOKEN_NO_MATCHING_TRUST_POLICY CI_ID_TOKEN_NO_TRUST_POLICY CI_ID_TOKEN_REPOSITORY_NOT_INSTALLED CI_TOKEN_SCOPES_TARGET_REFUSED CI_TRACES_UPLOAD_UNUSABLE CI_TRUST_POLICY_NAME_TAKEN COMMAND_RESTRICTED CONFIGURATION_BRANCH_REFUSED CONFIGURATION_INVALID CONFIGURATION_REFUSED_BY_REPOSITORY_RULES CONFIGURATION_SIGNED_COMMITS_REQUIRED DEFAULT_BRANCH_NOT_FOUND GITHUB_ACCOUNT_SUSPENDED GITHUB_APP_ACCESS_LOST GITHUB_RATE_LIMITED GITHUB_UPSTREAM_REQUEST_FORBIDDEN GITHUB_UPSTREAM_REQUEST_REJECTED GITHUB_UPSTREAM_UNAVAILABLE ID_TOKEN_KEY_ROTATION_REFUSED INTEGRATION_NOT_CONFIGURED IP_ALLOW_LIST_NOT_CONFIGURED MERGE_QUEUE_DISABLED MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN MERGE_QUEUE_SETTING_NOT_AVAILABLE NO_LOGIN_IN_PROGRESS ORGANIZATION_MEMBERS_ONLY PIPELINE_NAME_TAKEN PIPELINE_NOT_FOUND PIPELINE_RUN_NOT_FOUND PIPELINE_SECRETS_KEY_ALREADY_ADDED PIPELINE_SECRETS_KEY_IN_USE PIPELINE_SECRETS_KEY_LIMIT_REACHED PIPELINE_SECRETS_KEY_NOT_ACTIVE PIPELINE_SECRETS_KEY_NOT_FOUND PIPELINE_SECRETS_KEY_REPORTED PIPELINE_SECRET_LIMIT_REACHED PIPELINE_SECRET_NAME_TAKEN PIPELINE_SECRET_NOT_FOUND PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS PIPELINE_SECRET_VERSION_CHANGED PULL_REQUEST_ALREADY_QUEUED PULL_REQUEST_NOT_FOUND PULL_REQUEST_NOT_QUEUEABLE PULL_REQUEST_NOT_QUEUED RETRY_RULE_NOT_FOUND SAML_ENFORCEMENT_NOT_AUTHORIZED SETTING_MANAGED_BY_ENV SETUP_ALREADY_DONE SETUP_TOKEN_MISMATCH SUBSCRIPTION_API_UNAVAILABLE SUBSCRIPTION_INACTIVE SUBSCRIPTION_TOKEN_INVALID TEST_ALREADY_QUARANTINED TEST_BRANCH_NOT_TRACKED TEST_RETRY_NOT_CONFIGURED TEST_STATE_OVERLAP
documentation_urlstring
Example Response
                          {
  "detail": "string",
  "error_code": "CI_ADMIN_ROLE_REQUIRED",
  "documentation_url": "string"
}
                        
404 `PULL_REQUEST_NOT_QUEUED`: The pull request is not in any merge queue of the repository.
detailstringrequired
error_code"CI_ADMIN_ROLE_REQUIRED" | "CI_ID_TOKEN_AUDIENCE_REFUSED" | "CI_ID_TOKEN_EXCHANGE_NOT_ENABLED" | "CI_ID_TOKEN_EXPIRED" | "CI_ID_TOKEN_INVALID" | "CI_ID_TOKEN_ISSUER_REFUSED" | "CI_ID_TOKEN_ISSUER_UNAVAILABLE" | "CI_ID_TOKEN_NO_MATCHING_TRUST_POLICY" | "CI_ID_TOKEN_NO_TRUST_POLICY" | "CI_ID_TOKEN_REPOSITORY_NOT_INSTALLED" | "CI_TOKEN_SCOPES_TARGET_REFUSED" | "CI_TRACES_UPLOAD_UNUSABLE" | "CI_TRUST_POLICY_NAME_TAKEN" | "COMMAND_RESTRICTED" | "CONFIGURATION_BRANCH_REFUSED" | "CONFIGURATION_INVALID" | "CONFIGURATION_REFUSED_BY_REPOSITORY_RULES" | "CONFIGURATION_SIGNED_COMMITS_REQUIRED" | "DEFAULT_BRANCH_NOT_FOUND" | "GITHUB_ACCOUNT_SUSPENDED" | "GITHUB_APP_ACCESS_LOST" | "GITHUB_RATE_LIMITED" | "GITHUB_UPSTREAM_REQUEST_FORBIDDEN" | "GITHUB_UPSTREAM_REQUEST_REJECTED" | "GITHUB_UPSTREAM_UNAVAILABLE" | "ID_TOKEN_KEY_ROTATION_REFUSED" | "INTEGRATION_NOT_CONFIGURED" | "IP_ALLOW_LIST_NOT_CONFIGURED" | "MERGE_QUEUE_DISABLED" | "MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN" | "MERGE_QUEUE_SETTING_NOT_AVAILABLE" | "NO_LOGIN_IN_PROGRESS" | "ORGANIZATION_MEMBERS_ONLY" | "PIPELINE_NAME_TAKEN" | "PIPELINE_NOT_FOUND" | "PIPELINE_RUN_NOT_FOUND" | "PIPELINE_SECRETS_KEY_ALREADY_ADDED" | "PIPELINE_SECRETS_KEY_IN_USE" | "PIPELINE_SECRETS_KEY_LIMIT_REACHED" | "PIPELINE_SECRETS_KEY_NOT_ACTIVE" | "PIPELINE_SECRETS_KEY_NOT_FOUND" | "PIPELINE_SECRETS_KEY_REPORTED" | "PIPELINE_SECRET_LIMIT_REACHED" | "PIPELINE_SECRET_NAME_TAKEN" | "PIPELINE_SECRET_NOT_FOUND" | "PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS" | "PIPELINE_SECRET_VERSION_CHANGED" | "PULL_REQUEST_ALREADY_QUEUED" | "PULL_REQUEST_NOT_FOUND" | "PULL_REQUEST_NOT_QUEUEABLE" | "PULL_REQUEST_NOT_QUEUED" | "RETRY_RULE_NOT_FOUND" | "SAML_ENFORCEMENT_NOT_AUTHORIZED" | "SETTING_MANAGED_BY_ENV" | "SETUP_ALREADY_DONE" | "SETUP_TOKEN_MISMATCH" | "SUBSCRIPTION_API_UNAVAILABLE" | "SUBSCRIPTION_INACTIVE" | "SUBSCRIPTION_TOKEN_INVALID" | "TEST_ALREADY_QUARANTINED" | "TEST_BRANCH_NOT_TRACKED" | "TEST_RETRY_NOT_CONFIGURED" | "TEST_STATE_OVERLAP"
Enum: CI_ADMIN_ROLE_REQUIRED CI_ID_TOKEN_AUDIENCE_REFUSED CI_ID_TOKEN_EXCHANGE_NOT_ENABLED CI_ID_TOKEN_EXPIRED CI_ID_TOKEN_INVALID CI_ID_TOKEN_ISSUER_REFUSED CI_ID_TOKEN_ISSUER_UNAVAILABLE CI_ID_TOKEN_NO_MATCHING_TRUST_POLICY CI_ID_TOKEN_NO_TRUST_POLICY CI_ID_TOKEN_REPOSITORY_NOT_INSTALLED CI_TOKEN_SCOPES_TARGET_REFUSED CI_TRACES_UPLOAD_UNUSABLE CI_TRUST_POLICY_NAME_TAKEN COMMAND_RESTRICTED CONFIGURATION_BRANCH_REFUSED CONFIGURATION_INVALID CONFIGURATION_REFUSED_BY_REPOSITORY_RULES CONFIGURATION_SIGNED_COMMITS_REQUIRED DEFAULT_BRANCH_NOT_FOUND GITHUB_ACCOUNT_SUSPENDED GITHUB_APP_ACCESS_LOST GITHUB_RATE_LIMITED GITHUB_UPSTREAM_REQUEST_FORBIDDEN GITHUB_UPSTREAM_REQUEST_REJECTED GITHUB_UPSTREAM_UNAVAILABLE ID_TOKEN_KEY_ROTATION_REFUSED INTEGRATION_NOT_CONFIGURED IP_ALLOW_LIST_NOT_CONFIGURED MERGE_QUEUE_DISABLED MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN MERGE_QUEUE_SETTING_NOT_AVAILABLE NO_LOGIN_IN_PROGRESS ORGANIZATION_MEMBERS_ONLY PIPELINE_NAME_TAKEN PIPELINE_NOT_FOUND PIPELINE_RUN_NOT_FOUND PIPELINE_SECRETS_KEY_ALREADY_ADDED PIPELINE_SECRETS_KEY_IN_USE PIPELINE_SECRETS_KEY_LIMIT_REACHED PIPELINE_SECRETS_KEY_NOT_ACTIVE PIPELINE_SECRETS_KEY_NOT_FOUND PIPELINE_SECRETS_KEY_REPORTED PIPELINE_SECRET_LIMIT_REACHED PIPELINE_SECRET_NAME_TAKEN PIPELINE_SECRET_NOT_FOUND PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS PIPELINE_SECRET_VERSION_CHANGED PULL_REQUEST_ALREADY_QUEUED PULL_REQUEST_NOT_FOUND PULL_REQUEST_NOT_QUEUEABLE PULL_REQUEST_NOT_QUEUED RETRY_RULE_NOT_FOUND SAML_ENFORCEMENT_NOT_AUTHORIZED SETTING_MANAGED_BY_ENV SETUP_ALREADY_DONE SETUP_TOKEN_MISMATCH SUBSCRIPTION_API_UNAVAILABLE SUBSCRIPTION_INACTIVE SUBSCRIPTION_TOKEN_INVALID TEST_ALREADY_QUARANTINED TEST_BRANCH_NOT_TRACKED TEST_RETRY_NOT_CONFIGURED TEST_STATE_OVERLAP
documentation_urlstring
Example Response
                          {
  "detail": "string",
  "error_code": "CI_ADMIN_ROLE_REQUIRED",
  "documentation_url": "string"
}
                        
409 Conflict
422 `CONFIGURATION_INVALID`: The repository's Mergify configuration is invalid. `extended_repository` names the repository its `extends` points to when the error is in that repository's configuration file, and is null otherwise, including when the error only appears once the two configurations are merged. The route's other 422s carry no `error_code`.
detailstringrequired
error_code"CI_ADMIN_ROLE_REQUIRED" | "CI_ID_TOKEN_AUDIENCE_REFUSED" | "CI_ID_TOKEN_EXCHANGE_NOT_ENABLED" | "CI_ID_TOKEN_EXPIRED" | "CI_ID_TOKEN_INVALID" | "CI_ID_TOKEN_ISSUER_REFUSED" | "CI_ID_TOKEN_ISSUER_UNAVAILABLE" | "CI_ID_TOKEN_NO_MATCHING_TRUST_POLICY" | "CI_ID_TOKEN_NO_TRUST_POLICY" | "CI_ID_TOKEN_REPOSITORY_NOT_INSTALLED" | "CI_TOKEN_SCOPES_TARGET_REFUSED" | "CI_TRACES_UPLOAD_UNUSABLE" | "CI_TRUST_POLICY_NAME_TAKEN" | "COMMAND_RESTRICTED" | "CONFIGURATION_BRANCH_REFUSED" | "CONFIGURATION_INVALID" | "CONFIGURATION_REFUSED_BY_REPOSITORY_RULES" | "CONFIGURATION_SIGNED_COMMITS_REQUIRED" | "DEFAULT_BRANCH_NOT_FOUND" | "GITHUB_ACCOUNT_SUSPENDED" | "GITHUB_APP_ACCESS_LOST" | "GITHUB_RATE_LIMITED" | "GITHUB_UPSTREAM_REQUEST_FORBIDDEN" | "GITHUB_UPSTREAM_REQUEST_REJECTED" | "GITHUB_UPSTREAM_UNAVAILABLE" | "ID_TOKEN_KEY_ROTATION_REFUSED" | "INTEGRATION_NOT_CONFIGURED" | "IP_ALLOW_LIST_NOT_CONFIGURED" | "MERGE_QUEUE_DISABLED" | "MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN" | "MERGE_QUEUE_SETTING_NOT_AVAILABLE" | "NO_LOGIN_IN_PROGRESS" | "ORGANIZATION_MEMBERS_ONLY" | "PIPELINE_NAME_TAKEN" | "PIPELINE_NOT_FOUND" | "PIPELINE_RUN_NOT_FOUND" | "PIPELINE_SECRETS_KEY_ALREADY_ADDED" | "PIPELINE_SECRETS_KEY_IN_USE" | "PIPELINE_SECRETS_KEY_LIMIT_REACHED" | "PIPELINE_SECRETS_KEY_NOT_ACTIVE" | "PIPELINE_SECRETS_KEY_NOT_FOUND" | "PIPELINE_SECRETS_KEY_REPORTED" | "PIPELINE_SECRET_LIMIT_REACHED" | "PIPELINE_SECRET_NAME_TAKEN" | "PIPELINE_SECRET_NOT_FOUND" | "PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS" | "PIPELINE_SECRET_VERSION_CHANGED" | "PULL_REQUEST_ALREADY_QUEUED" | "PULL_REQUEST_NOT_FOUND" | "PULL_REQUEST_NOT_QUEUEABLE" | "PULL_REQUEST_NOT_QUEUED" | "RETRY_RULE_NOT_FOUND" | "SAML_ENFORCEMENT_NOT_AUTHORIZED" | "SETTING_MANAGED_BY_ENV" | "SETUP_ALREADY_DONE" | "SETUP_TOKEN_MISMATCH" | "SUBSCRIPTION_API_UNAVAILABLE" | "SUBSCRIPTION_INACTIVE" | "SUBSCRIPTION_TOKEN_INVALID" | "TEST_ALREADY_QUARANTINED" | "TEST_BRANCH_NOT_TRACKED" | "TEST_RETRY_NOT_CONFIGURED" | "TEST_STATE_OVERLAP"
Enum: CI_ADMIN_ROLE_REQUIRED CI_ID_TOKEN_AUDIENCE_REFUSED CI_ID_TOKEN_EXCHANGE_NOT_ENABLED CI_ID_TOKEN_EXPIRED CI_ID_TOKEN_INVALID CI_ID_TOKEN_ISSUER_REFUSED CI_ID_TOKEN_ISSUER_UNAVAILABLE CI_ID_TOKEN_NO_MATCHING_TRUST_POLICY CI_ID_TOKEN_NO_TRUST_POLICY CI_ID_TOKEN_REPOSITORY_NOT_INSTALLED CI_TOKEN_SCOPES_TARGET_REFUSED CI_TRACES_UPLOAD_UNUSABLE CI_TRUST_POLICY_NAME_TAKEN COMMAND_RESTRICTED CONFIGURATION_BRANCH_REFUSED CONFIGURATION_INVALID CONFIGURATION_REFUSED_BY_REPOSITORY_RULES CONFIGURATION_SIGNED_COMMITS_REQUIRED DEFAULT_BRANCH_NOT_FOUND GITHUB_ACCOUNT_SUSPENDED GITHUB_APP_ACCESS_LOST GITHUB_RATE_LIMITED GITHUB_UPSTREAM_REQUEST_FORBIDDEN GITHUB_UPSTREAM_REQUEST_REJECTED GITHUB_UPSTREAM_UNAVAILABLE ID_TOKEN_KEY_ROTATION_REFUSED INTEGRATION_NOT_CONFIGURED IP_ALLOW_LIST_NOT_CONFIGURED MERGE_QUEUE_DISABLED MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN MERGE_QUEUE_SETTING_NOT_AVAILABLE NO_LOGIN_IN_PROGRESS ORGANIZATION_MEMBERS_ONLY PIPELINE_NAME_TAKEN PIPELINE_NOT_FOUND PIPELINE_RUN_NOT_FOUND PIPELINE_SECRETS_KEY_ALREADY_ADDED PIPELINE_SECRETS_KEY_IN_USE PIPELINE_SECRETS_KEY_LIMIT_REACHED PIPELINE_SECRETS_KEY_NOT_ACTIVE PIPELINE_SECRETS_KEY_NOT_FOUND PIPELINE_SECRETS_KEY_REPORTED PIPELINE_SECRET_LIMIT_REACHED PIPELINE_SECRET_NAME_TAKEN PIPELINE_SECRET_NOT_FOUND PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS PIPELINE_SECRET_VERSION_CHANGED PULL_REQUEST_ALREADY_QUEUED PULL_REQUEST_NOT_FOUND PULL_REQUEST_NOT_QUEUEABLE PULL_REQUEST_NOT_QUEUED RETRY_RULE_NOT_FOUND SAML_ENFORCEMENT_NOT_AUTHORIZED SETTING_MANAGED_BY_ENV SETUP_ALREADY_DONE SETUP_TOKEN_MISMATCH SUBSCRIPTION_API_UNAVAILABLE SUBSCRIPTION_INACTIVE SUBSCRIPTION_TOKEN_INVALID TEST_ALREADY_QUARANTINED TEST_BRANCH_NOT_TRACKED TEST_RETRY_NOT_CONFIGURED TEST_STATE_OVERLAP
documentation_urlstring
extended_repositorystring | null
Example Response
                          {
  "detail": "string",
  "error_code": "CI_ADMIN_ROLE_REQUIRED",
  "documentation_url": "string",
  "extended_repository": "string"
}
                        
Example Request
curl -X POST "https://api.mergify.com/v1/repos/:owner/:repository/merge-queue/pull/:pr_number/dequeue" \
  -H "Authorization: Bearer <token>"

Pause the merge queue #

PUT /repos/{owner}/{repository}/merge-queue/pause

Pause the merge of the requested repository

Admin Application Key Mergify User Token GitHub Token
repository string required

The name of the repository

min length: 1 · max length: 100 · pattern: ^[\w\-\.]+$

owner string required

The owner of the repository

min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$

reasonstringrequired

The reason of the merge queue pause

max length: 255
200 Successful Response
pausedbooleanrequired

Whether the merge queue is currently paused

reasonstring | null

The reason of the merge queue pause

paused_atstring <date-time> | null

The date and time when the merge queue was paused

Example Response
                          {
  "paused": true,
  "reason": "string",
  "paused_at": "2024-01-15T09:00:00Z"
}
                        
403 Forbidden
404 Not found
409 Conflict
422 `CONFIGURATION_INVALID`: The repository's Mergify configuration is invalid. `extended_repository` names the repository its `extends` points to when the error is in that repository's configuration file, and is null otherwise, including when the error only appears once the two configurations are merged. The route's other 422s carry no `error_code`.
detailstringrequired
error_code"CI_ADMIN_ROLE_REQUIRED" | "CI_ID_TOKEN_AUDIENCE_REFUSED" | "CI_ID_TOKEN_EXCHANGE_NOT_ENABLED" | "CI_ID_TOKEN_EXPIRED" | "CI_ID_TOKEN_INVALID" | "CI_ID_TOKEN_ISSUER_REFUSED" | "CI_ID_TOKEN_ISSUER_UNAVAILABLE" | "CI_ID_TOKEN_NO_MATCHING_TRUST_POLICY" | "CI_ID_TOKEN_NO_TRUST_POLICY" | "CI_ID_TOKEN_REPOSITORY_NOT_INSTALLED" | "CI_TOKEN_SCOPES_TARGET_REFUSED" | "CI_TRACES_UPLOAD_UNUSABLE" | "CI_TRUST_POLICY_NAME_TAKEN" | "COMMAND_RESTRICTED" | "CONFIGURATION_BRANCH_REFUSED" | "CONFIGURATION_INVALID" | "CONFIGURATION_REFUSED_BY_REPOSITORY_RULES" | "CONFIGURATION_SIGNED_COMMITS_REQUIRED" | "DEFAULT_BRANCH_NOT_FOUND" | "GITHUB_ACCOUNT_SUSPENDED" | "GITHUB_APP_ACCESS_LOST" | "GITHUB_RATE_LIMITED" | "GITHUB_UPSTREAM_REQUEST_FORBIDDEN" | "GITHUB_UPSTREAM_REQUEST_REJECTED" | "GITHUB_UPSTREAM_UNAVAILABLE" | "ID_TOKEN_KEY_ROTATION_REFUSED" | "INTEGRATION_NOT_CONFIGURED" | "IP_ALLOW_LIST_NOT_CONFIGURED" | "MERGE_QUEUE_DISABLED" | "MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN" | "MERGE_QUEUE_SETTING_NOT_AVAILABLE" | "NO_LOGIN_IN_PROGRESS" | "ORGANIZATION_MEMBERS_ONLY" | "PIPELINE_NAME_TAKEN" | "PIPELINE_NOT_FOUND" | "PIPELINE_RUN_NOT_FOUND" | "PIPELINE_SECRETS_KEY_ALREADY_ADDED" | "PIPELINE_SECRETS_KEY_IN_USE" | "PIPELINE_SECRETS_KEY_LIMIT_REACHED" | "PIPELINE_SECRETS_KEY_NOT_ACTIVE" | "PIPELINE_SECRETS_KEY_NOT_FOUND" | "PIPELINE_SECRETS_KEY_REPORTED" | "PIPELINE_SECRET_LIMIT_REACHED" | "PIPELINE_SECRET_NAME_TAKEN" | "PIPELINE_SECRET_NOT_FOUND" | "PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS" | "PIPELINE_SECRET_VERSION_CHANGED" | "PULL_REQUEST_ALREADY_QUEUED" | "PULL_REQUEST_NOT_FOUND" | "PULL_REQUEST_NOT_QUEUEABLE" | "PULL_REQUEST_NOT_QUEUED" | "RETRY_RULE_NOT_FOUND" | "SAML_ENFORCEMENT_NOT_AUTHORIZED" | "SETTING_MANAGED_BY_ENV" | "SETUP_ALREADY_DONE" | "SETUP_TOKEN_MISMATCH" | "SUBSCRIPTION_API_UNAVAILABLE" | "SUBSCRIPTION_INACTIVE" | "SUBSCRIPTION_TOKEN_INVALID" | "TEST_ALREADY_QUARANTINED" | "TEST_BRANCH_NOT_TRACKED" | "TEST_RETRY_NOT_CONFIGURED" | "TEST_STATE_OVERLAP"
Enum: CI_ADMIN_ROLE_REQUIRED CI_ID_TOKEN_AUDIENCE_REFUSED CI_ID_TOKEN_EXCHANGE_NOT_ENABLED CI_ID_TOKEN_EXPIRED CI_ID_TOKEN_INVALID CI_ID_TOKEN_ISSUER_REFUSED CI_ID_TOKEN_ISSUER_UNAVAILABLE CI_ID_TOKEN_NO_MATCHING_TRUST_POLICY CI_ID_TOKEN_NO_TRUST_POLICY CI_ID_TOKEN_REPOSITORY_NOT_INSTALLED CI_TOKEN_SCOPES_TARGET_REFUSED CI_TRACES_UPLOAD_UNUSABLE CI_TRUST_POLICY_NAME_TAKEN COMMAND_RESTRICTED CONFIGURATION_BRANCH_REFUSED CONFIGURATION_INVALID CONFIGURATION_REFUSED_BY_REPOSITORY_RULES CONFIGURATION_SIGNED_COMMITS_REQUIRED DEFAULT_BRANCH_NOT_FOUND GITHUB_ACCOUNT_SUSPENDED GITHUB_APP_ACCESS_LOST GITHUB_RATE_LIMITED GITHUB_UPSTREAM_REQUEST_FORBIDDEN GITHUB_UPSTREAM_REQUEST_REJECTED GITHUB_UPSTREAM_UNAVAILABLE ID_TOKEN_KEY_ROTATION_REFUSED INTEGRATION_NOT_CONFIGURED IP_ALLOW_LIST_NOT_CONFIGURED MERGE_QUEUE_DISABLED MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN MERGE_QUEUE_SETTING_NOT_AVAILABLE NO_LOGIN_IN_PROGRESS ORGANIZATION_MEMBERS_ONLY PIPELINE_NAME_TAKEN PIPELINE_NOT_FOUND PIPELINE_RUN_NOT_FOUND PIPELINE_SECRETS_KEY_ALREADY_ADDED PIPELINE_SECRETS_KEY_IN_USE PIPELINE_SECRETS_KEY_LIMIT_REACHED PIPELINE_SECRETS_KEY_NOT_ACTIVE PIPELINE_SECRETS_KEY_NOT_FOUND PIPELINE_SECRETS_KEY_REPORTED PIPELINE_SECRET_LIMIT_REACHED PIPELINE_SECRET_NAME_TAKEN PIPELINE_SECRET_NOT_FOUND PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS PIPELINE_SECRET_VERSION_CHANGED PULL_REQUEST_ALREADY_QUEUED PULL_REQUEST_NOT_FOUND PULL_REQUEST_NOT_QUEUEABLE PULL_REQUEST_NOT_QUEUED RETRY_RULE_NOT_FOUND SAML_ENFORCEMENT_NOT_AUTHORIZED SETTING_MANAGED_BY_ENV SETUP_ALREADY_DONE SETUP_TOKEN_MISMATCH SUBSCRIPTION_API_UNAVAILABLE SUBSCRIPTION_INACTIVE SUBSCRIPTION_TOKEN_INVALID TEST_ALREADY_QUARANTINED TEST_BRANCH_NOT_TRACKED TEST_RETRY_NOT_CONFIGURED TEST_STATE_OVERLAP
documentation_urlstring
extended_repositorystring | null
Example Response
                          {
  "detail": "string",
  "error_code": "CI_ADMIN_ROLE_REQUIRED",
  "documentation_url": "string",
  "extended_repository": "string"
}
                        
Example Request
curl -X PUT "https://api.mergify.com/v1/repos/:owner/:repository/merge-queue/pause" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
  "reason": "string"
}'

Unpause merge queue #

DELETE /repos/{owner}/{repository}/merge-queue/pause

Unpause the merge queue of the requested repository

Admin Application Key Mergify User Token GitHub Token
repository string required

The name of the repository

min length: 1 · max length: 100 · pattern: ^[\w\-\.]+$

owner string required

The owner of the repository

min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$

204 Successful Response
403 Forbidden
404 Not found
409 Conflict
422 `CONFIGURATION_INVALID`: The repository's Mergify configuration is invalid. `extended_repository` names the repository its `extends` points to when the error is in that repository's configuration file, and is null otherwise, including when the error only appears once the two configurations are merged. The route's other 422s carry no `error_code`.
detailstringrequired
error_code"CI_ADMIN_ROLE_REQUIRED" | "CI_ID_TOKEN_AUDIENCE_REFUSED" | "CI_ID_TOKEN_EXCHANGE_NOT_ENABLED" | "CI_ID_TOKEN_EXPIRED" | "CI_ID_TOKEN_INVALID" | "CI_ID_TOKEN_ISSUER_REFUSED" | "CI_ID_TOKEN_ISSUER_UNAVAILABLE" | "CI_ID_TOKEN_NO_MATCHING_TRUST_POLICY" | "CI_ID_TOKEN_NO_TRUST_POLICY" | "CI_ID_TOKEN_REPOSITORY_NOT_INSTALLED" | "CI_TOKEN_SCOPES_TARGET_REFUSED" | "CI_TRACES_UPLOAD_UNUSABLE" | "CI_TRUST_POLICY_NAME_TAKEN" | "COMMAND_RESTRICTED" | "CONFIGURATION_BRANCH_REFUSED" | "CONFIGURATION_INVALID" | "CONFIGURATION_REFUSED_BY_REPOSITORY_RULES" | "CONFIGURATION_SIGNED_COMMITS_REQUIRED" | "DEFAULT_BRANCH_NOT_FOUND" | "GITHUB_ACCOUNT_SUSPENDED" | "GITHUB_APP_ACCESS_LOST" | "GITHUB_RATE_LIMITED" | "GITHUB_UPSTREAM_REQUEST_FORBIDDEN" | "GITHUB_UPSTREAM_REQUEST_REJECTED" | "GITHUB_UPSTREAM_UNAVAILABLE" | "ID_TOKEN_KEY_ROTATION_REFUSED" | "INTEGRATION_NOT_CONFIGURED" | "IP_ALLOW_LIST_NOT_CONFIGURED" | "MERGE_QUEUE_DISABLED" | "MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN" | "MERGE_QUEUE_SETTING_NOT_AVAILABLE" | "NO_LOGIN_IN_PROGRESS" | "ORGANIZATION_MEMBERS_ONLY" | "PIPELINE_NAME_TAKEN" | "PIPELINE_NOT_FOUND" | "PIPELINE_RUN_NOT_FOUND" | "PIPELINE_SECRETS_KEY_ALREADY_ADDED" | "PIPELINE_SECRETS_KEY_IN_USE" | "PIPELINE_SECRETS_KEY_LIMIT_REACHED" | "PIPELINE_SECRETS_KEY_NOT_ACTIVE" | "PIPELINE_SECRETS_KEY_NOT_FOUND" | "PIPELINE_SECRETS_KEY_REPORTED" | "PIPELINE_SECRET_LIMIT_REACHED" | "PIPELINE_SECRET_NAME_TAKEN" | "PIPELINE_SECRET_NOT_FOUND" | "PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS" | "PIPELINE_SECRET_VERSION_CHANGED" | "PULL_REQUEST_ALREADY_QUEUED" | "PULL_REQUEST_NOT_FOUND" | "PULL_REQUEST_NOT_QUEUEABLE" | "PULL_REQUEST_NOT_QUEUED" | "RETRY_RULE_NOT_FOUND" | "SAML_ENFORCEMENT_NOT_AUTHORIZED" | "SETTING_MANAGED_BY_ENV" | "SETUP_ALREADY_DONE" | "SETUP_TOKEN_MISMATCH" | "SUBSCRIPTION_API_UNAVAILABLE" | "SUBSCRIPTION_INACTIVE" | "SUBSCRIPTION_TOKEN_INVALID" | "TEST_ALREADY_QUARANTINED" | "TEST_BRANCH_NOT_TRACKED" | "TEST_RETRY_NOT_CONFIGURED" | "TEST_STATE_OVERLAP"
Enum: CI_ADMIN_ROLE_REQUIRED CI_ID_TOKEN_AUDIENCE_REFUSED CI_ID_TOKEN_EXCHANGE_NOT_ENABLED CI_ID_TOKEN_EXPIRED CI_ID_TOKEN_INVALID CI_ID_TOKEN_ISSUER_REFUSED CI_ID_TOKEN_ISSUER_UNAVAILABLE CI_ID_TOKEN_NO_MATCHING_TRUST_POLICY CI_ID_TOKEN_NO_TRUST_POLICY CI_ID_TOKEN_REPOSITORY_NOT_INSTALLED CI_TOKEN_SCOPES_TARGET_REFUSED CI_TRACES_UPLOAD_UNUSABLE CI_TRUST_POLICY_NAME_TAKEN COMMAND_RESTRICTED CONFIGURATION_BRANCH_REFUSED CONFIGURATION_INVALID CONFIGURATION_REFUSED_BY_REPOSITORY_RULES CONFIGURATION_SIGNED_COMMITS_REQUIRED DEFAULT_BRANCH_NOT_FOUND GITHUB_ACCOUNT_SUSPENDED GITHUB_APP_ACCESS_LOST GITHUB_RATE_LIMITED GITHUB_UPSTREAM_REQUEST_FORBIDDEN GITHUB_UPSTREAM_REQUEST_REJECTED GITHUB_UPSTREAM_UNAVAILABLE ID_TOKEN_KEY_ROTATION_REFUSED INTEGRATION_NOT_CONFIGURED IP_ALLOW_LIST_NOT_CONFIGURED MERGE_QUEUE_DISABLED MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN MERGE_QUEUE_SETTING_NOT_AVAILABLE NO_LOGIN_IN_PROGRESS ORGANIZATION_MEMBERS_ONLY PIPELINE_NAME_TAKEN PIPELINE_NOT_FOUND PIPELINE_RUN_NOT_FOUND PIPELINE_SECRETS_KEY_ALREADY_ADDED PIPELINE_SECRETS_KEY_IN_USE PIPELINE_SECRETS_KEY_LIMIT_REACHED PIPELINE_SECRETS_KEY_NOT_ACTIVE PIPELINE_SECRETS_KEY_NOT_FOUND PIPELINE_SECRETS_KEY_REPORTED PIPELINE_SECRET_LIMIT_REACHED PIPELINE_SECRET_NAME_TAKEN PIPELINE_SECRET_NOT_FOUND PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS PIPELINE_SECRET_VERSION_CHANGED PULL_REQUEST_ALREADY_QUEUED PULL_REQUEST_NOT_FOUND PULL_REQUEST_NOT_QUEUEABLE PULL_REQUEST_NOT_QUEUED RETRY_RULE_NOT_FOUND SAML_ENFORCEMENT_NOT_AUTHORIZED SETTING_MANAGED_BY_ENV SETUP_ALREADY_DONE SETUP_TOKEN_MISMATCH SUBSCRIPTION_API_UNAVAILABLE SUBSCRIPTION_INACTIVE SUBSCRIPTION_TOKEN_INVALID TEST_ALREADY_QUARANTINED TEST_BRANCH_NOT_TRACKED TEST_RETRY_NOT_CONFIGURED TEST_STATE_OVERLAP
documentation_urlstring
extended_repositorystring | null
Example Response
                          {
  "detail": "string",
  "error_code": "CI_ADMIN_ROLE_REQUIRED",
  "documentation_url": "string",
  "extended_repository": "string"
}
                        
Example Request
curl -X DELETE "https://api.mergify.com/v1/repos/:owner/:repository/merge-queue/pause" \
  -H "Authorization: Bearer <token>"

Get merge queue pause data #

GET /repos/{owner}/{repository}/merge-queue/pause

Checks if the merge queue is paused and returns the pause data

Admin Application Key Mergify User Token GitHub Token
repository string required

The name of the repository

min length: 1 · max length: 100 · pattern: ^[\w\-\.]+$

owner string required

The owner of the repository

min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$

200 Successful Response
pausedbooleanrequired

Whether the merge queue is currently paused

reasonstring | null

The reason of the merge queue pause

paused_atstring <date-time> | null

The date and time when the merge queue was paused

Example Response
                          {
  "paused": true,
  "reason": "string",
  "paused_at": "2024-01-15T09:00:00Z"
}
                        
403 Forbidden
404 Not found
409 Conflict
422 `CONFIGURATION_INVALID`: The repository's Mergify configuration is invalid. `extended_repository` names the repository its `extends` points to when the error is in that repository's configuration file, and is null otherwise, including when the error only appears once the two configurations are merged. The route's other 422s carry no `error_code`.
detailstringrequired
error_code"CI_ADMIN_ROLE_REQUIRED" | "CI_ID_TOKEN_AUDIENCE_REFUSED" | "CI_ID_TOKEN_EXCHANGE_NOT_ENABLED" | "CI_ID_TOKEN_EXPIRED" | "CI_ID_TOKEN_INVALID" | "CI_ID_TOKEN_ISSUER_REFUSED" | "CI_ID_TOKEN_ISSUER_UNAVAILABLE" | "CI_ID_TOKEN_NO_MATCHING_TRUST_POLICY" | "CI_ID_TOKEN_NO_TRUST_POLICY" | "CI_ID_TOKEN_REPOSITORY_NOT_INSTALLED" | "CI_TOKEN_SCOPES_TARGET_REFUSED" | "CI_TRACES_UPLOAD_UNUSABLE" | "CI_TRUST_POLICY_NAME_TAKEN" | "COMMAND_RESTRICTED" | "CONFIGURATION_BRANCH_REFUSED" | "CONFIGURATION_INVALID" | "CONFIGURATION_REFUSED_BY_REPOSITORY_RULES" | "CONFIGURATION_SIGNED_COMMITS_REQUIRED" | "DEFAULT_BRANCH_NOT_FOUND" | "GITHUB_ACCOUNT_SUSPENDED" | "GITHUB_APP_ACCESS_LOST" | "GITHUB_RATE_LIMITED" | "GITHUB_UPSTREAM_REQUEST_FORBIDDEN" | "GITHUB_UPSTREAM_REQUEST_REJECTED" | "GITHUB_UPSTREAM_UNAVAILABLE" | "ID_TOKEN_KEY_ROTATION_REFUSED" | "INTEGRATION_NOT_CONFIGURED" | "IP_ALLOW_LIST_NOT_CONFIGURED" | "MERGE_QUEUE_DISABLED" | "MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN" | "MERGE_QUEUE_SETTING_NOT_AVAILABLE" | "NO_LOGIN_IN_PROGRESS" | "ORGANIZATION_MEMBERS_ONLY" | "PIPELINE_NAME_TAKEN" | "PIPELINE_NOT_FOUND" | "PIPELINE_RUN_NOT_FOUND" | "PIPELINE_SECRETS_KEY_ALREADY_ADDED" | "PIPELINE_SECRETS_KEY_IN_USE" | "PIPELINE_SECRETS_KEY_LIMIT_REACHED" | "PIPELINE_SECRETS_KEY_NOT_ACTIVE" | "PIPELINE_SECRETS_KEY_NOT_FOUND" | "PIPELINE_SECRETS_KEY_REPORTED" | "PIPELINE_SECRET_LIMIT_REACHED" | "PIPELINE_SECRET_NAME_TAKEN" | "PIPELINE_SECRET_NOT_FOUND" | "PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS" | "PIPELINE_SECRET_VERSION_CHANGED" | "PULL_REQUEST_ALREADY_QUEUED" | "PULL_REQUEST_NOT_FOUND" | "PULL_REQUEST_NOT_QUEUEABLE" | "PULL_REQUEST_NOT_QUEUED" | "RETRY_RULE_NOT_FOUND" | "SAML_ENFORCEMENT_NOT_AUTHORIZED" | "SETTING_MANAGED_BY_ENV" | "SETUP_ALREADY_DONE" | "SETUP_TOKEN_MISMATCH" | "SUBSCRIPTION_API_UNAVAILABLE" | "SUBSCRIPTION_INACTIVE" | "SUBSCRIPTION_TOKEN_INVALID" | "TEST_ALREADY_QUARANTINED" | "TEST_BRANCH_NOT_TRACKED" | "TEST_RETRY_NOT_CONFIGURED" | "TEST_STATE_OVERLAP"
Enum: CI_ADMIN_ROLE_REQUIRED CI_ID_TOKEN_AUDIENCE_REFUSED CI_ID_TOKEN_EXCHANGE_NOT_ENABLED CI_ID_TOKEN_EXPIRED CI_ID_TOKEN_INVALID CI_ID_TOKEN_ISSUER_REFUSED CI_ID_TOKEN_ISSUER_UNAVAILABLE CI_ID_TOKEN_NO_MATCHING_TRUST_POLICY CI_ID_TOKEN_NO_TRUST_POLICY CI_ID_TOKEN_REPOSITORY_NOT_INSTALLED CI_TOKEN_SCOPES_TARGET_REFUSED CI_TRACES_UPLOAD_UNUSABLE CI_TRUST_POLICY_NAME_TAKEN COMMAND_RESTRICTED CONFIGURATION_BRANCH_REFUSED CONFIGURATION_INVALID CONFIGURATION_REFUSED_BY_REPOSITORY_RULES CONFIGURATION_SIGNED_COMMITS_REQUIRED DEFAULT_BRANCH_NOT_FOUND GITHUB_ACCOUNT_SUSPENDED GITHUB_APP_ACCESS_LOST GITHUB_RATE_LIMITED GITHUB_UPSTREAM_REQUEST_FORBIDDEN GITHUB_UPSTREAM_REQUEST_REJECTED GITHUB_UPSTREAM_UNAVAILABLE ID_TOKEN_KEY_ROTATION_REFUSED INTEGRATION_NOT_CONFIGURED IP_ALLOW_LIST_NOT_CONFIGURED MERGE_QUEUE_DISABLED MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN MERGE_QUEUE_SETTING_NOT_AVAILABLE NO_LOGIN_IN_PROGRESS ORGANIZATION_MEMBERS_ONLY PIPELINE_NAME_TAKEN PIPELINE_NOT_FOUND PIPELINE_RUN_NOT_FOUND PIPELINE_SECRETS_KEY_ALREADY_ADDED PIPELINE_SECRETS_KEY_IN_USE PIPELINE_SECRETS_KEY_LIMIT_REACHED PIPELINE_SECRETS_KEY_NOT_ACTIVE PIPELINE_SECRETS_KEY_NOT_FOUND PIPELINE_SECRETS_KEY_REPORTED PIPELINE_SECRET_LIMIT_REACHED PIPELINE_SECRET_NAME_TAKEN PIPELINE_SECRET_NOT_FOUND PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS PIPELINE_SECRET_VERSION_CHANGED PULL_REQUEST_ALREADY_QUEUED PULL_REQUEST_NOT_FOUND PULL_REQUEST_NOT_QUEUEABLE PULL_REQUEST_NOT_QUEUED RETRY_RULE_NOT_FOUND SAML_ENFORCEMENT_NOT_AUTHORIZED SETTING_MANAGED_BY_ENV SETUP_ALREADY_DONE SETUP_TOKEN_MISMATCH SUBSCRIPTION_API_UNAVAILABLE SUBSCRIPTION_INACTIVE SUBSCRIPTION_TOKEN_INVALID TEST_ALREADY_QUARANTINED TEST_BRANCH_NOT_TRACKED TEST_RETRY_NOT_CONFIGURED TEST_STATE_OVERLAP
documentation_urlstring
extended_repositorystring | null
Example Response
                          {
  "detail": "string",
  "error_code": "CI_ADMIN_ROLE_REQUIRED",
  "documentation_url": "string",
  "extended_repository": "string"
}
                        
Example Request
curl -X GET "https://api.mergify.com/v1/repos/:owner/:repository/merge-queue/pause" \
  -H "Authorization: Bearer <token>"

Get the merge queue settings of a repository #

GET /repos/{owner}/{repository}/merge-queue/settings

Get what the repository sets of the merge queue settings of its base branches: a base branch may override each value, and a value the repository leaves `null` comes from its organization

Admin Application Key Mergify User Token GitHub Token
repository string required

The name of the repository

min length: 1 · max length: 100 · pattern: ^[\w\-\.]+$

owner string required

The owner of the repository

min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$

200 Successful Response
batch_pull_requestboolean | null

Whether the merge queue opens a draft pull request to check a batch. When `false`, Mergify pushes the batch to its queue branch and reads the CI of that branch's head commit, with no pull request: the CI of the base branch must run on a `push` to the branches under the `queue_branch_prefix` of your queue rules (`mergify/merge-queue/` by default). A queue rule that uses `merge_method: fast-forward`, `queue_branch_merge_method: fast-forward` or `allow_queue_branch_edit`, or `merge_method: merge-batch` outside the `serial` mode, needs a draft pull request: unless its checks run in place, Mergify does not queue a pull request for such a rule on a base branch where this is `false`. `null` leaves it to the level above.

Example Response
                          {
  "batch_pull_request": true
}
                        
403 Forbidden
404 Not found
409 Conflict
422 Unprocessable entity
Example Request
curl -X GET "https://api.mergify.com/v1/repos/:owner/:repository/merge-queue/settings" \
  -H "Authorization: Bearer <token>"

Update the merge queue settings of a repository #

PUT /repos/{owner}/{repository}/merge-queue/settings

Replace what the repository sets of the merge queue settings of its base branches. Requires the admin role.

Admin Application Key Mergify User Token GitHub Token
repository string required

The name of the repository

min length: 1 · max length: 100 · pattern: ^[\w\-\.]+$

owner string required

The owner of the repository

min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$

batch_pull_requestboolean | null

Whether the merge queue opens a draft pull request to check a batch. When `false`, Mergify pushes the batch to its queue branch and reads the CI of that branch's head commit, with no pull request: the CI of the base branch must run on a `push` to the branches under the `queue_branch_prefix` of your queue rules (`mergify/merge-queue/` by default). A queue rule that uses `merge_method: fast-forward`, `queue_branch_merge_method: fast-forward` or `allow_queue_branch_edit`, or `merge_method: merge-batch` outside the `serial` mode, needs a draft pull request: unless its checks run in place, Mergify does not queue a pull request for such a rule on a base branch where this is `false`. `null` leaves it to the level above.

200 Successful Response
batch_pull_requestboolean | null

Whether the merge queue opens a draft pull request to check a batch. When `false`, Mergify pushes the batch to its queue branch and reads the CI of that branch's head commit, with no pull request: the CI of the base branch must run on a `push` to the branches under the `queue_branch_prefix` of your queue rules (`mergify/merge-queue/` by default). A queue rule that uses `merge_method: fast-forward`, `queue_branch_merge_method: fast-forward` or `allow_queue_branch_edit`, or `merge_method: merge-batch` outside the `serial` mode, needs a draft pull request: unless its checks run in place, Mergify does not queue a pull request for such a rule on a base branch where this is `false`. `null` leaves it to the level above.

Example Response
                          {
  "batch_pull_request": true
}
                        
403 `MERGE_QUEUE_SETTING_NOT_AVAILABLE`: `batch_pull_request: false` is not available to this organization yet. Contact Mergify Support to have it enabled for your organization.
detailstringrequired
error_code"CI_ADMIN_ROLE_REQUIRED" | "CI_ID_TOKEN_AUDIENCE_REFUSED" | "CI_ID_TOKEN_EXCHANGE_NOT_ENABLED" | "CI_ID_TOKEN_EXPIRED" | "CI_ID_TOKEN_INVALID" | "CI_ID_TOKEN_ISSUER_REFUSED" | "CI_ID_TOKEN_ISSUER_UNAVAILABLE" | "CI_ID_TOKEN_NO_MATCHING_TRUST_POLICY" | "CI_ID_TOKEN_NO_TRUST_POLICY" | "CI_ID_TOKEN_REPOSITORY_NOT_INSTALLED" | "CI_TOKEN_SCOPES_TARGET_REFUSED" | "CI_TRACES_UPLOAD_UNUSABLE" | "CI_TRUST_POLICY_NAME_TAKEN" | "COMMAND_RESTRICTED" | "CONFIGURATION_BRANCH_REFUSED" | "CONFIGURATION_INVALID" | "CONFIGURATION_REFUSED_BY_REPOSITORY_RULES" | "CONFIGURATION_SIGNED_COMMITS_REQUIRED" | "DEFAULT_BRANCH_NOT_FOUND" | "GITHUB_ACCOUNT_SUSPENDED" | "GITHUB_APP_ACCESS_LOST" | "GITHUB_RATE_LIMITED" | "GITHUB_UPSTREAM_REQUEST_FORBIDDEN" | "GITHUB_UPSTREAM_REQUEST_REJECTED" | "GITHUB_UPSTREAM_UNAVAILABLE" | "ID_TOKEN_KEY_ROTATION_REFUSED" | "INTEGRATION_NOT_CONFIGURED" | "IP_ALLOW_LIST_NOT_CONFIGURED" | "MERGE_QUEUE_DISABLED" | "MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN" | "MERGE_QUEUE_SETTING_NOT_AVAILABLE" | "NO_LOGIN_IN_PROGRESS" | "ORGANIZATION_MEMBERS_ONLY" | "PIPELINE_NAME_TAKEN" | "PIPELINE_NOT_FOUND" | "PIPELINE_RUN_NOT_FOUND" | "PIPELINE_SECRETS_KEY_ALREADY_ADDED" | "PIPELINE_SECRETS_KEY_IN_USE" | "PIPELINE_SECRETS_KEY_LIMIT_REACHED" | "PIPELINE_SECRETS_KEY_NOT_ACTIVE" | "PIPELINE_SECRETS_KEY_NOT_FOUND" | "PIPELINE_SECRETS_KEY_REPORTED" | "PIPELINE_SECRET_LIMIT_REACHED" | "PIPELINE_SECRET_NAME_TAKEN" | "PIPELINE_SECRET_NOT_FOUND" | "PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS" | "PIPELINE_SECRET_VERSION_CHANGED" | "PULL_REQUEST_ALREADY_QUEUED" | "PULL_REQUEST_NOT_FOUND" | "PULL_REQUEST_NOT_QUEUEABLE" | "PULL_REQUEST_NOT_QUEUED" | "RETRY_RULE_NOT_FOUND" | "SAML_ENFORCEMENT_NOT_AUTHORIZED" | "SETTING_MANAGED_BY_ENV" | "SETUP_ALREADY_DONE" | "SETUP_TOKEN_MISMATCH" | "SUBSCRIPTION_API_UNAVAILABLE" | "SUBSCRIPTION_INACTIVE" | "SUBSCRIPTION_TOKEN_INVALID" | "TEST_ALREADY_QUARANTINED" | "TEST_BRANCH_NOT_TRACKED" | "TEST_RETRY_NOT_CONFIGURED" | "TEST_STATE_OVERLAP"
Enum: CI_ADMIN_ROLE_REQUIRED CI_ID_TOKEN_AUDIENCE_REFUSED CI_ID_TOKEN_EXCHANGE_NOT_ENABLED CI_ID_TOKEN_EXPIRED CI_ID_TOKEN_INVALID CI_ID_TOKEN_ISSUER_REFUSED CI_ID_TOKEN_ISSUER_UNAVAILABLE CI_ID_TOKEN_NO_MATCHING_TRUST_POLICY CI_ID_TOKEN_NO_TRUST_POLICY CI_ID_TOKEN_REPOSITORY_NOT_INSTALLED CI_TOKEN_SCOPES_TARGET_REFUSED CI_TRACES_UPLOAD_UNUSABLE CI_TRUST_POLICY_NAME_TAKEN COMMAND_RESTRICTED CONFIGURATION_BRANCH_REFUSED CONFIGURATION_INVALID CONFIGURATION_REFUSED_BY_REPOSITORY_RULES CONFIGURATION_SIGNED_COMMITS_REQUIRED DEFAULT_BRANCH_NOT_FOUND GITHUB_ACCOUNT_SUSPENDED GITHUB_APP_ACCESS_LOST GITHUB_RATE_LIMITED GITHUB_UPSTREAM_REQUEST_FORBIDDEN GITHUB_UPSTREAM_REQUEST_REJECTED GITHUB_UPSTREAM_UNAVAILABLE ID_TOKEN_KEY_ROTATION_REFUSED INTEGRATION_NOT_CONFIGURED IP_ALLOW_LIST_NOT_CONFIGURED MERGE_QUEUE_DISABLED MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN MERGE_QUEUE_SETTING_NOT_AVAILABLE NO_LOGIN_IN_PROGRESS ORGANIZATION_MEMBERS_ONLY PIPELINE_NAME_TAKEN PIPELINE_NOT_FOUND PIPELINE_RUN_NOT_FOUND PIPELINE_SECRETS_KEY_ALREADY_ADDED PIPELINE_SECRETS_KEY_IN_USE PIPELINE_SECRETS_KEY_LIMIT_REACHED PIPELINE_SECRETS_KEY_NOT_ACTIVE PIPELINE_SECRETS_KEY_NOT_FOUND PIPELINE_SECRETS_KEY_REPORTED PIPELINE_SECRET_LIMIT_REACHED PIPELINE_SECRET_NAME_TAKEN PIPELINE_SECRET_NOT_FOUND PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS PIPELINE_SECRET_VERSION_CHANGED PULL_REQUEST_ALREADY_QUEUED PULL_REQUEST_NOT_FOUND PULL_REQUEST_NOT_QUEUEABLE PULL_REQUEST_NOT_QUEUED RETRY_RULE_NOT_FOUND SAML_ENFORCEMENT_NOT_AUTHORIZED SETTING_MANAGED_BY_ENV SETUP_ALREADY_DONE SETUP_TOKEN_MISMATCH SUBSCRIPTION_API_UNAVAILABLE SUBSCRIPTION_INACTIVE SUBSCRIPTION_TOKEN_INVALID TEST_ALREADY_QUARANTINED TEST_BRANCH_NOT_TRACKED TEST_RETRY_NOT_CONFIGURED TEST_STATE_OVERLAP
documentation_urlstring
Example Response
                          {
  "detail": "string",
  "error_code": "CI_ADMIN_ROLE_REQUIRED",
  "documentation_url": "string"
}
                        
404 Not found
409 Conflict
422 Unprocessable entity
Example Request
curl -X PUT "https://api.mergify.com/v1/repos/:owner/:repository/merge-queue/settings" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
  "batch_pull_request": true
}'

Reset the merge queue settings of a repository #

DELETE /repos/{owner}/{repository}/merge-queue/settings

Unset every merge queue setting of the repository, which its base branches then take from the organization. Requires the admin role.

Admin Application Key Mergify User Token GitHub Token
repository string required

The name of the repository

min length: 1 · max length: 100 · pattern: ^[\w\-\.]+$

owner string required

The owner of the repository

min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$

204 Successful Response
403 Forbidden
404 Not found
409 Conflict
422 Unprocessable entity
Example Request
curl -X DELETE "https://api.mergify.com/v1/repos/:owner/:repository/merge-queue/settings" \
  -H "Authorization: Bearer <token>"

List the merge queue settings of the base branches #

GET /repos/{owner}/{repository}/merge-queue/settings/branches

List each base branch name and pattern of the repository that sets a merge queue setting

Admin Application Key Mergify User Token GitHub Token
repository string required

The name of the repository

min length: 1 · max length: 100 · pattern: ^[\w\-\.]+$

owner string required

The owner of the repository

min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$

200 Successful Response
branchesMergeQueueBranchLevelSettings[]required

Each base branch name and pattern of the repository that sets a value, in alphabetical order. A base branch's value comes from the narrowest level setting it: the branch, then the repository, then the organization, then the default. At the branch level, an entry naming the branch exactly comes before every pattern; between patterns, the one with the longest literal prefix (what comes before its first wildcard) comes first, then the longest pattern, then alphabetical order.

batch_pull_requestboolean | null

Whether the merge queue opens a draft pull request to check a batch. When `false`, Mergify pushes the batch to its queue branch and reads the CI of that branch's head commit, with no pull request: the CI of the base branch must run on a `push` to the branches under the `queue_branch_prefix` of your queue rules (`mergify/merge-queue/` by default). A queue rule that uses `merge_method: fast-forward`, `queue_branch_merge_method: fast-forward` or `allow_queue_branch_edit`, or `merge_method: merge-batch` outside the `serial` mode, needs a draft pull request: unless its checks run in place, Mergify does not queue a pull request for such a rule on a base branch where this is `false`. `null` leaves it to the level above.

branchstringrequired

The base branch name or pattern

is_patternbooleanrequired

Whether `branch` is a glob pattern rather than a name

Example Response
                          {
  "branches": [
    {
      "batch_pull_request": true,
      "branch": "string",
      "is_pattern": true
    }
  ]
}
                        
403 Forbidden
404 Not found
409 Conflict
422 Unprocessable entity
Example Request
curl -X GET "https://api.mergify.com/v1/repos/:owner/:repository/merge-queue/settings/branches" \
  -H "Authorization: Bearer <token>"

Get the merge queue settings of a base branch name or pattern #

GET /repos/{owner}/{repository}/merge-queue/settings/branches/{branch}

Get what a base branch name or pattern sets of the merge queue settings: every value `null` when it sets none. What a base branch ends up with is `GET /repos/{owner}/{repository}/branches/{branch}/merge-queue/settings`.

Admin Application Key Mergify User Token GitHub Token
branch string required

A base branch name, or a glob pattern matching base branch names as the `*=` condition operator does (`release/*`, `stable/**`). A literal `{`, `}` or `,` in a branch name is escaped with `\`.

min length: 1 · max length: 255

repository string required

The name of the repository

min length: 1 · max length: 100 · pattern: ^[\w\-\.]+$

owner string required

The owner of the repository

min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$

200 Successful Response
batch_pull_requestboolean | null

Whether the merge queue opens a draft pull request to check a batch. When `false`, Mergify pushes the batch to its queue branch and reads the CI of that branch's head commit, with no pull request: the CI of the base branch must run on a `push` to the branches under the `queue_branch_prefix` of your queue rules (`mergify/merge-queue/` by default). A queue rule that uses `merge_method: fast-forward`, `queue_branch_merge_method: fast-forward` or `allow_queue_branch_edit`, or `merge_method: merge-batch` outside the `serial` mode, needs a draft pull request: unless its checks run in place, Mergify does not queue a pull request for such a rule on a base branch where this is `false`. `null` leaves it to the level above.

Example Response
                          {
  "batch_pull_request": true
}
                        
403 Forbidden
404 Not found
409 Conflict
422 Unprocessable entity
Example Request
curl -X GET "https://api.mergify.com/v1/repos/:owner/:repository/merge-queue/settings/branches/:branch" \
  -H "Authorization: Bearer <token>"

Update the merge queue settings of a base branch name or pattern #

PUT /repos/{owner}/{repository}/merge-queue/settings/branches/{branch}

Replace what a base branch name or pattern sets of the merge queue settings. The branches need not exist yet. Requires the admin role.

Admin Application Key Mergify User Token GitHub Token
branch string required

A base branch name, or a glob pattern matching base branch names as the `*=` condition operator does (`release/*`, `stable/**`). A literal `{`, `}` or `,` in a branch name is escaped with `\`.

min length: 1 · max length: 255

repository string required

The name of the repository

min length: 1 · max length: 100 · pattern: ^[\w\-\.]+$

owner string required

The owner of the repository

min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$

batch_pull_requestboolean | null

Whether the merge queue opens a draft pull request to check a batch. When `false`, Mergify pushes the batch to its queue branch and reads the CI of that branch's head commit, with no pull request: the CI of the base branch must run on a `push` to the branches under the `queue_branch_prefix` of your queue rules (`mergify/merge-queue/` by default). A queue rule that uses `merge_method: fast-forward`, `queue_branch_merge_method: fast-forward` or `allow_queue_branch_edit`, or `merge_method: merge-batch` outside the `serial` mode, needs a draft pull request: unless its checks run in place, Mergify does not queue a pull request for such a rule on a base branch where this is `false`. `null` leaves it to the level above.

200 Successful Response
batch_pull_requestboolean | null

Whether the merge queue opens a draft pull request to check a batch. When `false`, Mergify pushes the batch to its queue branch and reads the CI of that branch's head commit, with no pull request: the CI of the base branch must run on a `push` to the branches under the `queue_branch_prefix` of your queue rules (`mergify/merge-queue/` by default). A queue rule that uses `merge_method: fast-forward`, `queue_branch_merge_method: fast-forward` or `allow_queue_branch_edit`, or `merge_method: merge-batch` outside the `serial` mode, needs a draft pull request: unless its checks run in place, Mergify does not queue a pull request for such a rule on a base branch where this is `false`. `null` leaves it to the level above.

Example Response
                          {
  "batch_pull_request": true
}
                        
403 `MERGE_QUEUE_SETTING_NOT_AVAILABLE`: `batch_pull_request: false` is not available to this organization yet. Contact Mergify Support to have it enabled for your organization.
detailstringrequired
error_code"CI_ADMIN_ROLE_REQUIRED" | "CI_ID_TOKEN_AUDIENCE_REFUSED" | "CI_ID_TOKEN_EXCHANGE_NOT_ENABLED" | "CI_ID_TOKEN_EXPIRED" | "CI_ID_TOKEN_INVALID" | "CI_ID_TOKEN_ISSUER_REFUSED" | "CI_ID_TOKEN_ISSUER_UNAVAILABLE" | "CI_ID_TOKEN_NO_MATCHING_TRUST_POLICY" | "CI_ID_TOKEN_NO_TRUST_POLICY" | "CI_ID_TOKEN_REPOSITORY_NOT_INSTALLED" | "CI_TOKEN_SCOPES_TARGET_REFUSED" | "CI_TRACES_UPLOAD_UNUSABLE" | "CI_TRUST_POLICY_NAME_TAKEN" | "COMMAND_RESTRICTED" | "CONFIGURATION_BRANCH_REFUSED" | "CONFIGURATION_INVALID" | "CONFIGURATION_REFUSED_BY_REPOSITORY_RULES" | "CONFIGURATION_SIGNED_COMMITS_REQUIRED" | "DEFAULT_BRANCH_NOT_FOUND" | "GITHUB_ACCOUNT_SUSPENDED" | "GITHUB_APP_ACCESS_LOST" | "GITHUB_RATE_LIMITED" | "GITHUB_UPSTREAM_REQUEST_FORBIDDEN" | "GITHUB_UPSTREAM_REQUEST_REJECTED" | "GITHUB_UPSTREAM_UNAVAILABLE" | "ID_TOKEN_KEY_ROTATION_REFUSED" | "INTEGRATION_NOT_CONFIGURED" | "IP_ALLOW_LIST_NOT_CONFIGURED" | "MERGE_QUEUE_DISABLED" | "MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN" | "MERGE_QUEUE_SETTING_NOT_AVAILABLE" | "NO_LOGIN_IN_PROGRESS" | "ORGANIZATION_MEMBERS_ONLY" | "PIPELINE_NAME_TAKEN" | "PIPELINE_NOT_FOUND" | "PIPELINE_RUN_NOT_FOUND" | "PIPELINE_SECRETS_KEY_ALREADY_ADDED" | "PIPELINE_SECRETS_KEY_IN_USE" | "PIPELINE_SECRETS_KEY_LIMIT_REACHED" | "PIPELINE_SECRETS_KEY_NOT_ACTIVE" | "PIPELINE_SECRETS_KEY_NOT_FOUND" | "PIPELINE_SECRETS_KEY_REPORTED" | "PIPELINE_SECRET_LIMIT_REACHED" | "PIPELINE_SECRET_NAME_TAKEN" | "PIPELINE_SECRET_NOT_FOUND" | "PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS" | "PIPELINE_SECRET_VERSION_CHANGED" | "PULL_REQUEST_ALREADY_QUEUED" | "PULL_REQUEST_NOT_FOUND" | "PULL_REQUEST_NOT_QUEUEABLE" | "PULL_REQUEST_NOT_QUEUED" | "RETRY_RULE_NOT_FOUND" | "SAML_ENFORCEMENT_NOT_AUTHORIZED" | "SETTING_MANAGED_BY_ENV" | "SETUP_ALREADY_DONE" | "SETUP_TOKEN_MISMATCH" | "SUBSCRIPTION_API_UNAVAILABLE" | "SUBSCRIPTION_INACTIVE" | "SUBSCRIPTION_TOKEN_INVALID" | "TEST_ALREADY_QUARANTINED" | "TEST_BRANCH_NOT_TRACKED" | "TEST_RETRY_NOT_CONFIGURED" | "TEST_STATE_OVERLAP"
Enum: CI_ADMIN_ROLE_REQUIRED CI_ID_TOKEN_AUDIENCE_REFUSED CI_ID_TOKEN_EXCHANGE_NOT_ENABLED CI_ID_TOKEN_EXPIRED CI_ID_TOKEN_INVALID CI_ID_TOKEN_ISSUER_REFUSED CI_ID_TOKEN_ISSUER_UNAVAILABLE CI_ID_TOKEN_NO_MATCHING_TRUST_POLICY CI_ID_TOKEN_NO_TRUST_POLICY CI_ID_TOKEN_REPOSITORY_NOT_INSTALLED CI_TOKEN_SCOPES_TARGET_REFUSED CI_TRACES_UPLOAD_UNUSABLE CI_TRUST_POLICY_NAME_TAKEN COMMAND_RESTRICTED CONFIGURATION_BRANCH_REFUSED CONFIGURATION_INVALID CONFIGURATION_REFUSED_BY_REPOSITORY_RULES CONFIGURATION_SIGNED_COMMITS_REQUIRED DEFAULT_BRANCH_NOT_FOUND GITHUB_ACCOUNT_SUSPENDED GITHUB_APP_ACCESS_LOST GITHUB_RATE_LIMITED GITHUB_UPSTREAM_REQUEST_FORBIDDEN GITHUB_UPSTREAM_REQUEST_REJECTED GITHUB_UPSTREAM_UNAVAILABLE ID_TOKEN_KEY_ROTATION_REFUSED INTEGRATION_NOT_CONFIGURED IP_ALLOW_LIST_NOT_CONFIGURED MERGE_QUEUE_DISABLED MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN MERGE_QUEUE_SETTING_NOT_AVAILABLE NO_LOGIN_IN_PROGRESS ORGANIZATION_MEMBERS_ONLY PIPELINE_NAME_TAKEN PIPELINE_NOT_FOUND PIPELINE_RUN_NOT_FOUND PIPELINE_SECRETS_KEY_ALREADY_ADDED PIPELINE_SECRETS_KEY_IN_USE PIPELINE_SECRETS_KEY_LIMIT_REACHED PIPELINE_SECRETS_KEY_NOT_ACTIVE PIPELINE_SECRETS_KEY_NOT_FOUND PIPELINE_SECRETS_KEY_REPORTED PIPELINE_SECRET_LIMIT_REACHED PIPELINE_SECRET_NAME_TAKEN PIPELINE_SECRET_NOT_FOUND PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS PIPELINE_SECRET_VERSION_CHANGED PULL_REQUEST_ALREADY_QUEUED PULL_REQUEST_NOT_FOUND PULL_REQUEST_NOT_QUEUEABLE PULL_REQUEST_NOT_QUEUED RETRY_RULE_NOT_FOUND SAML_ENFORCEMENT_NOT_AUTHORIZED SETTING_MANAGED_BY_ENV SETUP_ALREADY_DONE SETUP_TOKEN_MISMATCH SUBSCRIPTION_API_UNAVAILABLE SUBSCRIPTION_INACTIVE SUBSCRIPTION_TOKEN_INVALID TEST_ALREADY_QUARANTINED TEST_BRANCH_NOT_TRACKED TEST_RETRY_NOT_CONFIGURED TEST_STATE_OVERLAP
documentation_urlstring
Example Response
                          {
  "detail": "string",
  "error_code": "CI_ADMIN_ROLE_REQUIRED",
  "documentation_url": "string"
}
                        
404 Not found
409 Conflict
422 `MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN`: The base branch pattern is not a valid glob pattern.
detailstringrequired
error_code"CI_ADMIN_ROLE_REQUIRED" | "CI_ID_TOKEN_AUDIENCE_REFUSED" | "CI_ID_TOKEN_EXCHANGE_NOT_ENABLED" | "CI_ID_TOKEN_EXPIRED" | "CI_ID_TOKEN_INVALID" | "CI_ID_TOKEN_ISSUER_REFUSED" | "CI_ID_TOKEN_ISSUER_UNAVAILABLE" | "CI_ID_TOKEN_NO_MATCHING_TRUST_POLICY" | "CI_ID_TOKEN_NO_TRUST_POLICY" | "CI_ID_TOKEN_REPOSITORY_NOT_INSTALLED" | "CI_TOKEN_SCOPES_TARGET_REFUSED" | "CI_TRACES_UPLOAD_UNUSABLE" | "CI_TRUST_POLICY_NAME_TAKEN" | "COMMAND_RESTRICTED" | "CONFIGURATION_BRANCH_REFUSED" | "CONFIGURATION_INVALID" | "CONFIGURATION_REFUSED_BY_REPOSITORY_RULES" | "CONFIGURATION_SIGNED_COMMITS_REQUIRED" | "DEFAULT_BRANCH_NOT_FOUND" | "GITHUB_ACCOUNT_SUSPENDED" | "GITHUB_APP_ACCESS_LOST" | "GITHUB_RATE_LIMITED" | "GITHUB_UPSTREAM_REQUEST_FORBIDDEN" | "GITHUB_UPSTREAM_REQUEST_REJECTED" | "GITHUB_UPSTREAM_UNAVAILABLE" | "ID_TOKEN_KEY_ROTATION_REFUSED" | "INTEGRATION_NOT_CONFIGURED" | "IP_ALLOW_LIST_NOT_CONFIGURED" | "MERGE_QUEUE_DISABLED" | "MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN" | "MERGE_QUEUE_SETTING_NOT_AVAILABLE" | "NO_LOGIN_IN_PROGRESS" | "ORGANIZATION_MEMBERS_ONLY" | "PIPELINE_NAME_TAKEN" | "PIPELINE_NOT_FOUND" | "PIPELINE_RUN_NOT_FOUND" | "PIPELINE_SECRETS_KEY_ALREADY_ADDED" | "PIPELINE_SECRETS_KEY_IN_USE" | "PIPELINE_SECRETS_KEY_LIMIT_REACHED" | "PIPELINE_SECRETS_KEY_NOT_ACTIVE" | "PIPELINE_SECRETS_KEY_NOT_FOUND" | "PIPELINE_SECRETS_KEY_REPORTED" | "PIPELINE_SECRET_LIMIT_REACHED" | "PIPELINE_SECRET_NAME_TAKEN" | "PIPELINE_SECRET_NOT_FOUND" | "PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS" | "PIPELINE_SECRET_VERSION_CHANGED" | "PULL_REQUEST_ALREADY_QUEUED" | "PULL_REQUEST_NOT_FOUND" | "PULL_REQUEST_NOT_QUEUEABLE" | "PULL_REQUEST_NOT_QUEUED" | "RETRY_RULE_NOT_FOUND" | "SAML_ENFORCEMENT_NOT_AUTHORIZED" | "SETTING_MANAGED_BY_ENV" | "SETUP_ALREADY_DONE" | "SETUP_TOKEN_MISMATCH" | "SUBSCRIPTION_API_UNAVAILABLE" | "SUBSCRIPTION_INACTIVE" | "SUBSCRIPTION_TOKEN_INVALID" | "TEST_ALREADY_QUARANTINED" | "TEST_BRANCH_NOT_TRACKED" | "TEST_RETRY_NOT_CONFIGURED" | "TEST_STATE_OVERLAP"
Enum: CI_ADMIN_ROLE_REQUIRED CI_ID_TOKEN_AUDIENCE_REFUSED CI_ID_TOKEN_EXCHANGE_NOT_ENABLED CI_ID_TOKEN_EXPIRED CI_ID_TOKEN_INVALID CI_ID_TOKEN_ISSUER_REFUSED CI_ID_TOKEN_ISSUER_UNAVAILABLE CI_ID_TOKEN_NO_MATCHING_TRUST_POLICY CI_ID_TOKEN_NO_TRUST_POLICY CI_ID_TOKEN_REPOSITORY_NOT_INSTALLED CI_TOKEN_SCOPES_TARGET_REFUSED CI_TRACES_UPLOAD_UNUSABLE CI_TRUST_POLICY_NAME_TAKEN COMMAND_RESTRICTED CONFIGURATION_BRANCH_REFUSED CONFIGURATION_INVALID CONFIGURATION_REFUSED_BY_REPOSITORY_RULES CONFIGURATION_SIGNED_COMMITS_REQUIRED DEFAULT_BRANCH_NOT_FOUND GITHUB_ACCOUNT_SUSPENDED GITHUB_APP_ACCESS_LOST GITHUB_RATE_LIMITED GITHUB_UPSTREAM_REQUEST_FORBIDDEN GITHUB_UPSTREAM_REQUEST_REJECTED GITHUB_UPSTREAM_UNAVAILABLE ID_TOKEN_KEY_ROTATION_REFUSED INTEGRATION_NOT_CONFIGURED IP_ALLOW_LIST_NOT_CONFIGURED MERGE_QUEUE_DISABLED MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN MERGE_QUEUE_SETTING_NOT_AVAILABLE NO_LOGIN_IN_PROGRESS ORGANIZATION_MEMBERS_ONLY PIPELINE_NAME_TAKEN PIPELINE_NOT_FOUND PIPELINE_RUN_NOT_FOUND PIPELINE_SECRETS_KEY_ALREADY_ADDED PIPELINE_SECRETS_KEY_IN_USE PIPELINE_SECRETS_KEY_LIMIT_REACHED PIPELINE_SECRETS_KEY_NOT_ACTIVE PIPELINE_SECRETS_KEY_NOT_FOUND PIPELINE_SECRETS_KEY_REPORTED PIPELINE_SECRET_LIMIT_REACHED PIPELINE_SECRET_NAME_TAKEN PIPELINE_SECRET_NOT_FOUND PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS PIPELINE_SECRET_VERSION_CHANGED PULL_REQUEST_ALREADY_QUEUED PULL_REQUEST_NOT_FOUND PULL_REQUEST_NOT_QUEUEABLE PULL_REQUEST_NOT_QUEUED RETRY_RULE_NOT_FOUND SAML_ENFORCEMENT_NOT_AUTHORIZED SETTING_MANAGED_BY_ENV SETUP_ALREADY_DONE SETUP_TOKEN_MISMATCH SUBSCRIPTION_API_UNAVAILABLE SUBSCRIPTION_INACTIVE SUBSCRIPTION_TOKEN_INVALID TEST_ALREADY_QUARANTINED TEST_BRANCH_NOT_TRACKED TEST_RETRY_NOT_CONFIGURED TEST_STATE_OVERLAP
documentation_urlstring
Example Response
                          {
  "detail": "string",
  "error_code": "CI_ADMIN_ROLE_REQUIRED",
  "documentation_url": "string"
}
                        
Example Request
curl -X PUT "https://api.mergify.com/v1/repos/:owner/:repository/merge-queue/settings/branches/:branch" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
  "batch_pull_request": true
}'

Reset the merge queue settings of a base branch name or pattern #

DELETE /repos/{owner}/{repository}/merge-queue/settings/branches/{branch}

Unset every merge queue setting of a base branch name or pattern: the branches it named take them from the next pattern matching them, then from the repository. Requires the admin role.

Admin Application Key Mergify User Token GitHub Token
branch string required

A base branch name, or a glob pattern matching base branch names as the `*=` condition operator does (`release/*`, `stable/**`). A literal `{`, `}` or `,` in a branch name is escaped with `\`.

min length: 1 · max length: 255

repository string required

The name of the repository

min length: 1 · max length: 100 · pattern: ^[\w\-\.]+$

owner string required

The owner of the repository

min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$

204 Successful Response
403 Forbidden
404 Not found
409 Conflict
422 Unprocessable entity
Example Request
curl -X DELETE "https://api.mergify.com/v1/repos/:owner/:repository/merge-queue/settings/branches/:branch" \
  -H "Authorization: Bearer <token>"

Get the merge queue settings a base branch uses #

GET /repos/{owner}/{repository}/branches/{branch}/merge-queue/settings

Get the merge queue settings of a base branch once its levels are resolved, each with the level, and the branch name or pattern, it comes from

Admin Application Key Mergify User Token GitHub Token
branch string required

The name of the base branch

min length: 1 · max length: 255

repository string required

The name of the repository

min length: 1 · max length: 100 · pattern: ^[\w\-\.]+$

owner string required

The owner of the repository

min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$

200 Successful Response
branchstringrequired

The name of the base branch

settingsMergeQueueEffectiveValuesrequired

What the merge queue of this base branch uses

batch_pull_requestbooleanrequired

Whether the merge queue opens a draft pull request to check a batch. When `false`, Mergify pushes the batch to its queue branch and reads the CI of that branch's head commit, with no pull request: the CI of the base branch must run on a `push` to the branches under the `queue_branch_prefix` of your queue rules (`mergify/merge-queue/` by default). A queue rule that uses `merge_method: fast-forward`, `queue_branch_merge_method: fast-forward` or `allow_queue_branch_edit`, or `merge_method: merge-batch` outside the `serial` mode, needs a draft pull request: unless its checks run in place, Mergify does not queue a pull request for such a rule on a base branch where this is `false`.

sourcesMergeQueueEffectiveSourcesrequired

Where each value comes from. A base branch's value comes from the narrowest level setting it: the branch, then the repository, then the organization, then the default. At the branch level, an entry naming the branch exactly comes before every pattern; between patterns, the one with the longest literal prefix (what comes before its first wildcard) comes first, then the longest pattern, then alphabetical order.

batch_pull_requestMergeQueueSettingSourcerequired
level"branch" | "repository" | "organization" | "default"required

The level the value comes from

Enum: branch repository organization default
branchstring | nullrequired

The base branch name or pattern that supplied the value, for the `branch` level; `null` otherwise

Example Response
                          {
  "branch": "string",
  "settings": {
    "batch_pull_request": true
  },
  "sources": {
    "batch_pull_request": {
      "level": "branch",
      "branch": "string"
    }
  }
}
                        
403 Forbidden
404 Not found
409 Conflict
422 Unprocessable entity
Example Request
curl -X GET "https://api.mergify.com/v1/repos/:owner/:repository/branches/:branch/merge-queue/settings" \
  -H "Authorization: Bearer <token>"

List the pull requests nobody has queued #

GET /repos/{owner}/{repository}/merge-queue/unqueued-pulls

List the open pull requests of a branch that nobody has queued and whose merge queue check reports them ready to queue or waiting for their queue conditions. A pull request the merge queue dequeued keeps the check that says why until its next push, and is not listed until then.

Admin Application Key Mergify User Token GitHub Token
repository string required

The name of the repository

min length: 1 · max length: 100 · pattern: ^[\w\-\.]+$

owner string required

The owner of the repository

min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$

branch string required

The base branch of the pull requests

min length: 1 · max length: 255

state "ready" | "waiting_for_conditions"

Only list the pull requests in this state

cursor string

The opaque cursor of the current page. Must be extracted from RFC 5988 pagination links to get the previous/next pages

per_page integer

The number of items per page

min: 1 · max: 100

200 Successful Response
sizeintegerrequired

The number of items in this page

per_pageintegerrequired

The number of items per page

pull_requestsUnqueuedPullRequest[]required

The pull requests of this page, ordered by number, oldest first

numberintegerrequired

The number of the pull request

min: 1 · max: 9223372036854776000
titlestringrequired

The title of the pull request

urlstringrequired

The URL of the pull request

authorPullRequestAuthorrequired

The author of the pull request

idintegerrequired
loginstringrequired
avatar_urlstring | nullrequired

The account's avatar URL, as GitHub reports it. Null when it is not known.

state"ready" | "waiting_for_conditions"required

`ready` when the pull request matches its queue conditions, so queuing it lets it enter the merge queue at once; `waiting_for_conditions` when it does not match them yet.

Enum: ready waiting_for_conditions
countsUnqueuedPullRequestCountsrequired

How many pull requests of the branch are in each state, over every page and whatever the `state` filter

readyinteger

How many pull requests are ready to queue

waiting_for_conditionsinteger

How many pull requests are waiting for their queue conditions

auto_queuebooleanrequired

Whether the repository queues a pull request on its own once it matches its conditions. None is then listed `ready`: a `waiting_for_conditions` one is queued without anyone once it matches, or can be queued by hand before.

Example Response
                          {
  "size": 0,
  "per_page": 0,
  "pull_requests": [
    {
      "number": 1,
      "title": "string",
      "url": "string",
      "author": {},
      "state": "ready"
    }
  ],
  "counts": {
    "ready": 0,
    "waiting_for_conditions": 0
  },
  "auto_queue": true
}
                        
403 Forbidden
404 Not found
409 Conflict
422 `CONFIGURATION_INVALID`: The repository's Mergify configuration is invalid. `extended_repository` names the repository its `extends` points to when the error is in that repository's configuration file, and is null otherwise, including when the error only appears once the two configurations are merged. The route's other 422s carry no `error_code`.
detailstringrequired
error_code"CI_ADMIN_ROLE_REQUIRED" | "CI_ID_TOKEN_AUDIENCE_REFUSED" | "CI_ID_TOKEN_EXCHANGE_NOT_ENABLED" | "CI_ID_TOKEN_EXPIRED" | "CI_ID_TOKEN_INVALID" | "CI_ID_TOKEN_ISSUER_REFUSED" | "CI_ID_TOKEN_ISSUER_UNAVAILABLE" | "CI_ID_TOKEN_NO_MATCHING_TRUST_POLICY" | "CI_ID_TOKEN_NO_TRUST_POLICY" | "CI_ID_TOKEN_REPOSITORY_NOT_INSTALLED" | "CI_TOKEN_SCOPES_TARGET_REFUSED" | "CI_TRACES_UPLOAD_UNUSABLE" | "CI_TRUST_POLICY_NAME_TAKEN" | "COMMAND_RESTRICTED" | "CONFIGURATION_BRANCH_REFUSED" | "CONFIGURATION_INVALID" | "CONFIGURATION_REFUSED_BY_REPOSITORY_RULES" | "CONFIGURATION_SIGNED_COMMITS_REQUIRED" | "DEFAULT_BRANCH_NOT_FOUND" | "GITHUB_ACCOUNT_SUSPENDED" | "GITHUB_APP_ACCESS_LOST" | "GITHUB_RATE_LIMITED" | "GITHUB_UPSTREAM_REQUEST_FORBIDDEN" | "GITHUB_UPSTREAM_REQUEST_REJECTED" | "GITHUB_UPSTREAM_UNAVAILABLE" | "ID_TOKEN_KEY_ROTATION_REFUSED" | "INTEGRATION_NOT_CONFIGURED" | "IP_ALLOW_LIST_NOT_CONFIGURED" | "MERGE_QUEUE_DISABLED" | "MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN" | "MERGE_QUEUE_SETTING_NOT_AVAILABLE" | "NO_LOGIN_IN_PROGRESS" | "ORGANIZATION_MEMBERS_ONLY" | "PIPELINE_NAME_TAKEN" | "PIPELINE_NOT_FOUND" | "PIPELINE_RUN_NOT_FOUND" | "PIPELINE_SECRETS_KEY_ALREADY_ADDED" | "PIPELINE_SECRETS_KEY_IN_USE" | "PIPELINE_SECRETS_KEY_LIMIT_REACHED" | "PIPELINE_SECRETS_KEY_NOT_ACTIVE" | "PIPELINE_SECRETS_KEY_NOT_FOUND" | "PIPELINE_SECRETS_KEY_REPORTED" | "PIPELINE_SECRET_LIMIT_REACHED" | "PIPELINE_SECRET_NAME_TAKEN" | "PIPELINE_SECRET_NOT_FOUND" | "PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS" | "PIPELINE_SECRET_VERSION_CHANGED" | "PULL_REQUEST_ALREADY_QUEUED" | "PULL_REQUEST_NOT_FOUND" | "PULL_REQUEST_NOT_QUEUEABLE" | "PULL_REQUEST_NOT_QUEUED" | "RETRY_RULE_NOT_FOUND" | "SAML_ENFORCEMENT_NOT_AUTHORIZED" | "SETTING_MANAGED_BY_ENV" | "SETUP_ALREADY_DONE" | "SETUP_TOKEN_MISMATCH" | "SUBSCRIPTION_API_UNAVAILABLE" | "SUBSCRIPTION_INACTIVE" | "SUBSCRIPTION_TOKEN_INVALID" | "TEST_ALREADY_QUARANTINED" | "TEST_BRANCH_NOT_TRACKED" | "TEST_RETRY_NOT_CONFIGURED" | "TEST_STATE_OVERLAP"
Enum: CI_ADMIN_ROLE_REQUIRED CI_ID_TOKEN_AUDIENCE_REFUSED CI_ID_TOKEN_EXCHANGE_NOT_ENABLED CI_ID_TOKEN_EXPIRED CI_ID_TOKEN_INVALID CI_ID_TOKEN_ISSUER_REFUSED CI_ID_TOKEN_ISSUER_UNAVAILABLE CI_ID_TOKEN_NO_MATCHING_TRUST_POLICY CI_ID_TOKEN_NO_TRUST_POLICY CI_ID_TOKEN_REPOSITORY_NOT_INSTALLED CI_TOKEN_SCOPES_TARGET_REFUSED CI_TRACES_UPLOAD_UNUSABLE CI_TRUST_POLICY_NAME_TAKEN COMMAND_RESTRICTED CONFIGURATION_BRANCH_REFUSED CONFIGURATION_INVALID CONFIGURATION_REFUSED_BY_REPOSITORY_RULES CONFIGURATION_SIGNED_COMMITS_REQUIRED DEFAULT_BRANCH_NOT_FOUND GITHUB_ACCOUNT_SUSPENDED GITHUB_APP_ACCESS_LOST GITHUB_RATE_LIMITED GITHUB_UPSTREAM_REQUEST_FORBIDDEN GITHUB_UPSTREAM_REQUEST_REJECTED GITHUB_UPSTREAM_UNAVAILABLE ID_TOKEN_KEY_ROTATION_REFUSED INTEGRATION_NOT_CONFIGURED IP_ALLOW_LIST_NOT_CONFIGURED MERGE_QUEUE_DISABLED MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN MERGE_QUEUE_SETTING_NOT_AVAILABLE NO_LOGIN_IN_PROGRESS ORGANIZATION_MEMBERS_ONLY PIPELINE_NAME_TAKEN PIPELINE_NOT_FOUND PIPELINE_RUN_NOT_FOUND PIPELINE_SECRETS_KEY_ALREADY_ADDED PIPELINE_SECRETS_KEY_IN_USE PIPELINE_SECRETS_KEY_LIMIT_REACHED PIPELINE_SECRETS_KEY_NOT_ACTIVE PIPELINE_SECRETS_KEY_NOT_FOUND PIPELINE_SECRETS_KEY_REPORTED PIPELINE_SECRET_LIMIT_REACHED PIPELINE_SECRET_NAME_TAKEN PIPELINE_SECRET_NOT_FOUND PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS PIPELINE_SECRET_VERSION_CHANGED PULL_REQUEST_ALREADY_QUEUED PULL_REQUEST_NOT_FOUND PULL_REQUEST_NOT_QUEUEABLE PULL_REQUEST_NOT_QUEUED RETRY_RULE_NOT_FOUND SAML_ENFORCEMENT_NOT_AUTHORIZED SETTING_MANAGED_BY_ENV SETUP_ALREADY_DONE SETUP_TOKEN_MISMATCH SUBSCRIPTION_API_UNAVAILABLE SUBSCRIPTION_INACTIVE SUBSCRIPTION_TOKEN_INVALID TEST_ALREADY_QUARANTINED TEST_BRANCH_NOT_TRACKED TEST_RETRY_NOT_CONFIGURED TEST_STATE_OVERLAP
documentation_urlstring
extended_repositorystring | null
Example Response
                          {
  "detail": "string",
  "error_code": "CI_ADMIN_ROLE_REQUIRED",
  "documentation_url": "string",
  "extended_repository": "string"
}
                        
Example Request
curl -X GET "https://api.mergify.com/v1/repos/:owner/:repository/merge-queue/unqueued-pulls" \
  -H "Authorization: Bearer <token>"

Get the merge queue settings of an organization #

GET /orgs/{owner}/merge-queue/settings

Get what the organization sets of the merge queue settings of its repositories: a repository or a base branch may override each value

Admin Application Key Mergify User Token GitHub Token
owner string required

The owner of the repository

min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$

200 Successful Response
batch_pull_requestboolean | null

Whether the merge queue opens a draft pull request to check a batch. When `false`, Mergify pushes the batch to its queue branch and reads the CI of that branch's head commit, with no pull request: the CI of the base branch must run on a `push` to the branches under the `queue_branch_prefix` of your queue rules (`mergify/merge-queue/` by default). A queue rule that uses `merge_method: fast-forward`, `queue_branch_merge_method: fast-forward` or `allow_queue_branch_edit`, or `merge_method: merge-batch` outside the `serial` mode, needs a draft pull request: unless its checks run in place, Mergify does not queue a pull request for such a rule on a base branch where this is `false`. `null` leaves it to the level above.

Example Response
                          {
  "batch_pull_request": true
}
                        
403 Forbidden
404 Not found
409 Conflict
422 Unprocessable entity
Example Request
curl -X GET "https://api.mergify.com/v1/orgs/:owner/merge-queue/settings" \
  -H "Authorization: Bearer <token>"

Update the merge queue settings of an organization #

PUT /orgs/{owner}/merge-queue/settings

Replace what the organization sets of the merge queue settings of its repositories. Each repository's merge queue applies them on its next pass. Requires the organization admin role.

Admin Application Key Mergify User Token GitHub Token
owner string required

The owner of the repository

min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$

batch_pull_requestboolean | null

Whether the merge queue opens a draft pull request to check a batch. When `false`, Mergify pushes the batch to its queue branch and reads the CI of that branch's head commit, with no pull request: the CI of the base branch must run on a `push` to the branches under the `queue_branch_prefix` of your queue rules (`mergify/merge-queue/` by default). A queue rule that uses `merge_method: fast-forward`, `queue_branch_merge_method: fast-forward` or `allow_queue_branch_edit`, or `merge_method: merge-batch` outside the `serial` mode, needs a draft pull request: unless its checks run in place, Mergify does not queue a pull request for such a rule on a base branch where this is `false`. `null` leaves it to the level above.

200 Successful Response
batch_pull_requestboolean | null

Whether the merge queue opens a draft pull request to check a batch. When `false`, Mergify pushes the batch to its queue branch and reads the CI of that branch's head commit, with no pull request: the CI of the base branch must run on a `push` to the branches under the `queue_branch_prefix` of your queue rules (`mergify/merge-queue/` by default). A queue rule that uses `merge_method: fast-forward`, `queue_branch_merge_method: fast-forward` or `allow_queue_branch_edit`, or `merge_method: merge-batch` outside the `serial` mode, needs a draft pull request: unless its checks run in place, Mergify does not queue a pull request for such a rule on a base branch where this is `false`. `null` leaves it to the level above.

Example Response
                          {
  "batch_pull_request": true
}
                        
403 `MERGE_QUEUE_SETTING_NOT_AVAILABLE`: `batch_pull_request: false` is not available to this organization yet. Contact Mergify Support to have it enabled for your organization.
detailstringrequired
error_code"CI_ADMIN_ROLE_REQUIRED" | "CI_ID_TOKEN_AUDIENCE_REFUSED" | "CI_ID_TOKEN_EXCHANGE_NOT_ENABLED" | "CI_ID_TOKEN_EXPIRED" | "CI_ID_TOKEN_INVALID" | "CI_ID_TOKEN_ISSUER_REFUSED" | "CI_ID_TOKEN_ISSUER_UNAVAILABLE" | "CI_ID_TOKEN_NO_MATCHING_TRUST_POLICY" | "CI_ID_TOKEN_NO_TRUST_POLICY" | "CI_ID_TOKEN_REPOSITORY_NOT_INSTALLED" | "CI_TOKEN_SCOPES_TARGET_REFUSED" | "CI_TRACES_UPLOAD_UNUSABLE" | "CI_TRUST_POLICY_NAME_TAKEN" | "COMMAND_RESTRICTED" | "CONFIGURATION_BRANCH_REFUSED" | "CONFIGURATION_INVALID" | "CONFIGURATION_REFUSED_BY_REPOSITORY_RULES" | "CONFIGURATION_SIGNED_COMMITS_REQUIRED" | "DEFAULT_BRANCH_NOT_FOUND" | "GITHUB_ACCOUNT_SUSPENDED" | "GITHUB_APP_ACCESS_LOST" | "GITHUB_RATE_LIMITED" | "GITHUB_UPSTREAM_REQUEST_FORBIDDEN" | "GITHUB_UPSTREAM_REQUEST_REJECTED" | "GITHUB_UPSTREAM_UNAVAILABLE" | "ID_TOKEN_KEY_ROTATION_REFUSED" | "INTEGRATION_NOT_CONFIGURED" | "IP_ALLOW_LIST_NOT_CONFIGURED" | "MERGE_QUEUE_DISABLED" | "MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN" | "MERGE_QUEUE_SETTING_NOT_AVAILABLE" | "NO_LOGIN_IN_PROGRESS" | "ORGANIZATION_MEMBERS_ONLY" | "PIPELINE_NAME_TAKEN" | "PIPELINE_NOT_FOUND" | "PIPELINE_RUN_NOT_FOUND" | "PIPELINE_SECRETS_KEY_ALREADY_ADDED" | "PIPELINE_SECRETS_KEY_IN_USE" | "PIPELINE_SECRETS_KEY_LIMIT_REACHED" | "PIPELINE_SECRETS_KEY_NOT_ACTIVE" | "PIPELINE_SECRETS_KEY_NOT_FOUND" | "PIPELINE_SECRETS_KEY_REPORTED" | "PIPELINE_SECRET_LIMIT_REACHED" | "PIPELINE_SECRET_NAME_TAKEN" | "PIPELINE_SECRET_NOT_FOUND" | "PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS" | "PIPELINE_SECRET_VERSION_CHANGED" | "PULL_REQUEST_ALREADY_QUEUED" | "PULL_REQUEST_NOT_FOUND" | "PULL_REQUEST_NOT_QUEUEABLE" | "PULL_REQUEST_NOT_QUEUED" | "RETRY_RULE_NOT_FOUND" | "SAML_ENFORCEMENT_NOT_AUTHORIZED" | "SETTING_MANAGED_BY_ENV" | "SETUP_ALREADY_DONE" | "SETUP_TOKEN_MISMATCH" | "SUBSCRIPTION_API_UNAVAILABLE" | "SUBSCRIPTION_INACTIVE" | "SUBSCRIPTION_TOKEN_INVALID" | "TEST_ALREADY_QUARANTINED" | "TEST_BRANCH_NOT_TRACKED" | "TEST_RETRY_NOT_CONFIGURED" | "TEST_STATE_OVERLAP"
Enum: CI_ADMIN_ROLE_REQUIRED CI_ID_TOKEN_AUDIENCE_REFUSED CI_ID_TOKEN_EXCHANGE_NOT_ENABLED CI_ID_TOKEN_EXPIRED CI_ID_TOKEN_INVALID CI_ID_TOKEN_ISSUER_REFUSED CI_ID_TOKEN_ISSUER_UNAVAILABLE CI_ID_TOKEN_NO_MATCHING_TRUST_POLICY CI_ID_TOKEN_NO_TRUST_POLICY CI_ID_TOKEN_REPOSITORY_NOT_INSTALLED CI_TOKEN_SCOPES_TARGET_REFUSED CI_TRACES_UPLOAD_UNUSABLE CI_TRUST_POLICY_NAME_TAKEN COMMAND_RESTRICTED CONFIGURATION_BRANCH_REFUSED CONFIGURATION_INVALID CONFIGURATION_REFUSED_BY_REPOSITORY_RULES CONFIGURATION_SIGNED_COMMITS_REQUIRED DEFAULT_BRANCH_NOT_FOUND GITHUB_ACCOUNT_SUSPENDED GITHUB_APP_ACCESS_LOST GITHUB_RATE_LIMITED GITHUB_UPSTREAM_REQUEST_FORBIDDEN GITHUB_UPSTREAM_REQUEST_REJECTED GITHUB_UPSTREAM_UNAVAILABLE ID_TOKEN_KEY_ROTATION_REFUSED INTEGRATION_NOT_CONFIGURED IP_ALLOW_LIST_NOT_CONFIGURED MERGE_QUEUE_DISABLED MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN MERGE_QUEUE_SETTING_NOT_AVAILABLE NO_LOGIN_IN_PROGRESS ORGANIZATION_MEMBERS_ONLY PIPELINE_NAME_TAKEN PIPELINE_NOT_FOUND PIPELINE_RUN_NOT_FOUND PIPELINE_SECRETS_KEY_ALREADY_ADDED PIPELINE_SECRETS_KEY_IN_USE PIPELINE_SECRETS_KEY_LIMIT_REACHED PIPELINE_SECRETS_KEY_NOT_ACTIVE PIPELINE_SECRETS_KEY_NOT_FOUND PIPELINE_SECRETS_KEY_REPORTED PIPELINE_SECRET_LIMIT_REACHED PIPELINE_SECRET_NAME_TAKEN PIPELINE_SECRET_NOT_FOUND PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS PIPELINE_SECRET_VERSION_CHANGED PULL_REQUEST_ALREADY_QUEUED PULL_REQUEST_NOT_FOUND PULL_REQUEST_NOT_QUEUEABLE PULL_REQUEST_NOT_QUEUED RETRY_RULE_NOT_FOUND SAML_ENFORCEMENT_NOT_AUTHORIZED SETTING_MANAGED_BY_ENV SETUP_ALREADY_DONE SETUP_TOKEN_MISMATCH SUBSCRIPTION_API_UNAVAILABLE SUBSCRIPTION_INACTIVE SUBSCRIPTION_TOKEN_INVALID TEST_ALREADY_QUARANTINED TEST_BRANCH_NOT_TRACKED TEST_RETRY_NOT_CONFIGURED TEST_STATE_OVERLAP
documentation_urlstring
Example Response
                          {
  "detail": "string",
  "error_code": "CI_ADMIN_ROLE_REQUIRED",
  "documentation_url": "string"
}
                        
404 Not found
409 Conflict
422 Unprocessable entity
Example Request
curl -X PUT "https://api.mergify.com/v1/orgs/:owner/merge-queue/settings" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
  "batch_pull_request": true
}'

Reset the merge queue settings of an organization #

DELETE /orgs/{owner}/merge-queue/settings

Unset every merge queue setting of the organization, which its repositories then take from the defaults. Requires the organization admin role.

Admin Application Key Mergify User Token GitHub Token
owner string required

The owner of the repository

min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$

204 Successful Response
403 Forbidden
404 Not found
409 Conflict
422 Unprocessable entity
Example Request
curl -X DELETE "https://api.mergify.com/v1/orgs/:owner/merge-queue/settings" \
  -H "Authorization: Bearer <token>"

Was this page helpful?