> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flowengineering.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Check whether a branch is ready to merge

> Lists every blocker, not only the first. The merge gates an ordinary merge by the caller checks: variant, editor groups, branch checks, designated and required reviewers, review policy approvals, blocking item checks and stage gates. The review page holds that the merge itself does not enforce: draft state, a merge already queued or running, and no changes. The advisory merge conflict preview; the merge runs its own exact conflict check. A gate that cannot be judged yet (a scan still running or too large) is listed under `unknown`, and `ready` is true only when both lists are empty. This read enforces nothing; the merge re-checks its own gates.



## OpenAPI

````yaml /openapi/customer-api.json get /project/{projectId}/branch/{id}/merge-readiness
openapi: 3.0.0
info:
  contact: {}
  description: >-
    Flow customer API reference. Start with the [quickstart](/api/quickstart)
    and [authentication guide](/api/authentication).
  title: Customer API
  version: 1.0.0
servers:
  - description: Flow API
    url: '{baseUrl}'
    variables:
      baseUrl:
        default: https://backend.branch.flowengineering.com
security: []
tags:
  - name: Audit
  - name: Automations
  - name: Branches
  - name: Comments
  - name: Convert
  - name: Data Model
  - name: Diagrams
  - name: Entities
  - name: Events
  - name: Files
  - name: Import
  - name: Notifications
  - name: Persistent agents
  - name: Projects
  - name: ReqIF
  - name: ReqIF Import
  - name: Review policy
  - name: Shared Access Grants
  - name: User Groups
  - name: Users
  - name: Views
paths:
  /project/{projectId}/branch/{id}/merge-readiness:
    get:
      tags:
        - Branches
      summary: Check whether a branch is ready to merge
      description: >-
        Lists every blocker, not only the first. The merge gates an ordinary
        merge by the caller checks: variant, editor groups, branch checks,
        designated and required reviewers, review policy approvals, blocking
        item checks and stage gates. The review page holds that the merge itself
        does not enforce: draft state, a merge already queued or running, and no
        changes. The advisory merge conflict preview; the merge runs its own
        exact conflict check. A gate that cannot be judged yet (a scan still
        running or too large) is listed under `unknown`, and `ready` is true
        only when both lists are empty. This read enforces nothing; the merge
        re-checks its own gates.
      operationId: BranchController_mergeReadiness
      parameters:
        - in: path
          name: projectId
          required: true
          schema:
            description: >-
              Project UUID, not a slug. Resolve a slug with GET
              /project/slug/{slug} using the same workspace and credentials,
              then pass the returned id.
            type: string
        - in: path
          name: id
          required: true
          schema:
            type: string
        - description: Workspace identifier
          in: header
          name: customer
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MergeReadinessResponseDto'
          description: ''
      security:
        - api-key: []
        - bearer: []
components:
  schemas:
    MergeReadinessResponseDto:
      properties:
        blockers:
          items:
            $ref: '#/components/schemas/MergeReadinessBlockerDto'
          type: array
        ready:
          description: >-
            True only when no gate blocks the merge and every gate could be
            judged.
          type: boolean
        unknown:
          items:
            $ref: '#/components/schemas/MergeReadinessUnknownDto'
          type: array
      required:
        - ready
        - blockers
        - unknown
      type: object
    MergeReadinessBlockerDto:
      properties:
        items:
          description: Ids of the items this blocker names.
          items:
            type: string
          type: array
        kind:
          enum:
            - not_ready_for_review
            - variant
            - editor_groups
            - merge_in_progress
            - no_changes
            - checks
            - designated_reviewers
            - required_reviewers
            - review_policy_items
            - min_approvals
            - item_checks
            - stage_gates
            - conflicts
          type: string
        message:
          description: Why this gate blocks the merge.
          type: string
        people:
          description: Ids of the users whose action clears this blocker.
          items:
            type: string
          type: array
      required:
        - kind
        - message
      type: object
    MergeReadinessUnknownDto:
      properties:
        kind:
          enum:
            - no_changes
            - reviewers
            - item_checks
            - stage_gates
            - conflicts
          type: string
        reason:
          description: >-
            Why this gate cannot be judged yet, for example a scan that is still
            running or too large.
          type: string
      required:
        - kind
        - reason
      type: object
  securitySchemes:
    api-key:
      in: header
      name: X-API-Key
      type: apiKey
    bearer:
      bearerFormat: JWT
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.