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

# Merge branch



## OpenAPI

````yaml POST /v1/agents/{agentId}/branches/{branchId}/merge
openapi: 3.1.0
info:
  title: PolyAI Agents API
  version: 1.0.11
  description: Manage PolyAI agents, telephony, deployments, and real-time configs.
servers:
  - url: https://api.us.poly.ai
    description: US region
  - url: https://api.eu.poly.ai
    description: EU region
  - url: https://api.uk.poly.ai
    description: UK region
  - url: https://api.studio.poly.ai
    description: Studio region
security:
  - polyApiKey: []
paths:
  /v1/agents/{agentId}/branches/{branchId}/merge:
    parameters:
      - name: agentId
        in: path
        required: true
        schema:
          type: string
      - name: branchId
        in: path
        required: true
        schema:
          type: string
    post:
      tags:
        - Branches
      summary: Merge branch
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MergeBranchBody'
      responses:
        '200':
          description: Branch merged
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MergeBranchResponse'
        '400':
          description: Merge conflicts or validation failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MergeBranchConflictResponse'
components:
  schemas:
    MergeBranchBody:
      type: object
      properties:
        deploymentMessage:
          type: string
          default: ''
        conflictResolutions:
          type: array
          items:
            type: object
            properties:
              path:
                type: array
                items:
                  type: string
              strategy:
                type: string
                enum:
                  - ours
                  - theirs
                  - base
              value: {}
            required:
              - path
              - strategy
            additionalProperties: false
      additionalProperties: false
      title: MergeBranchBody
    MergeBranchResponse:
      type: object
      properties:
        sequence:
          type: string
        message:
          type: string
        testRunIds:
          type: array
          items:
            type: string
      required:
        - sequence
        - message
        - testRunIds
      additionalProperties: false
      title: MergeBranchResponse
    MergeBranchConflictResponse:
      title: MergeBranchConflictResponse
  securitySchemes:
    polyApiKey:
      type: apiKey
      in: header
      name: X-API-KEY

````