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

# Merge Pull Request

> Merge a pull request into its target branch.

Yertle only supports **fast-forward merges**: the target branch is
advanced to the source branch's head commit — no merge commit is
created, history stays linear. If a fast-forward is not possible
(target has diverged), the call fails with 400 and the author must
rebase the source branch before retrying.

On success, the PR is marked merged and the returned `merge_commit`
is the same commit as the source branch's head at merge time.



## OpenAPI

````yaml post /orgs/{org_id}/nodes/{node_id}/pull-requests/{pr_number}/merge
openapi: 3.1.0
info:
  title: Flow API
  description: Content-addressing backend with Git-like versioning
  version: 1.0.0
servers:
  - url: https://api.yertle.com
    description: Production
security: []
paths:
  /orgs/{org_id}/nodes/{node_id}/pull-requests/{pr_number}/merge:
    post:
      tags:
        - pull-requests
      summary: Merge Pull Request
      description: |-
        Merge a pull request into its target branch.

        Yertle only supports **fast-forward merges**: the target branch is
        advanced to the source branch's head commit — no merge commit is
        created, history stays linear. If a fast-forward is not possible
        (target has diverged), the call fails with 400 and the author must
        rebase the source branch before retrying.

        On success, the PR is marked merged and the returned `merge_commit`
        is the same commit as the source branch's head at merge time.
      operationId: >-
        merge_pull_request_orgs__org_id__nodes__node_id__pull_requests__pr_number__merge_post
      parameters:
        - name: org_id
          in: path
          required: true
          schema:
            type: string
            title: Org Id
        - name: node_id
          in: path
          required: true
          schema:
            type: string
            title: Node Id
        - name: pr_number
          in: path
          required: true
          schema:
            type: integer
            title: Pr Number
        - name: authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MergePRResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    MergePRResponse:
      properties:
        merged:
          type: boolean
          title: Merged
          description: Whether merge was successful
        merge_commit:
          type: string
          title: Merge Commit
          description: Merge commit ID
      type: object
      required:
        - merged
        - merge_commit
      title: MergePRResponse
      description: Response for merging a pull request.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````