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

# Merge a version branch

> Requires `projects:write`. Native projects only. Merges the branch onto `targetName`, or its parent when omitted, as Merge does in the app, and returns the branch merged into. `strategy` settles conflicted strings: `use_branch` keeps the merged branch's text, `use_base` keeps the target's. `deleteAfter` (default `true`) removes the merged branch's files and strings; the branch row stays with `status: merged`. A branch with active child branches returns `409 has_child_branches`.



## OpenAPI

````yaml https://public-api.hyperlocalise.com/openapi.yaml post /v1/projects/{projectId}/branches/{branchName}/merge
openapi: 3.1.0
info:
  title: Hyperlocalise Public API
  version: 1.0.0
  description: >-
    Read projects, Queries, jobs, glossaries, and translation memories from a
    Hyperlocalise workspace; create native projects from project templates and
    manage those templates; define custom project fields and set their values;
    manage the strings, translations, screenshots, and settings of native
    projects; search strings; round-trip bilingual files; update jobs one at a
    time or in bulk; register job-change webhook endpoints; import and export
    glossaries and translation memories; and read the Reports page's reports as
    JSON or CSV.
servers:
  - url: https://public-api.hyperlocalise.com
security:
  - personalAccessToken: []
tags:
  - name: Identity
  - name: Projects
  - name: Project templates
  - name: Custom fields
  - name: Queries
  - name: Jobs
  - name: Strings
  - name: Translations
  - name: Screenshots
  - name: Figma attachments
  - name: Bilingual files
  - name: Glossaries
  - name: Translation memories
  - name: Webhooks
  - name: CDN
  - name: Hyperlab
  - name: Reports
    description: >-
      The Reports page's reports for scripts, BI tools and payment systems.
      Every report needs `reports:read`, which only admins' and localization
      managers' keys hold, and the workspace's Reports feature. Each answer says
      whether recent work is still being counted (`stillUpdating`); figures can
      lag live work by one capture run. A workspace may ask for 30 reports a
      minute, in bursts of 10.
paths:
  /v1/projects/{projectId}/branches/{branchName}/merge:
    parameters:
      - $ref: '#/components/parameters/ProjectId'
      - $ref: '#/components/parameters/BranchName'
    post:
      tags:
        - Projects
      summary: Merge a version branch
      description: >-
        Requires `projects:write`. Native projects only. Merges the branch onto
        `targetName`, or its parent when omitted, as Merge does in the app, and
        returns the branch merged into. `strategy` settles conflicted strings:
        `use_branch` keeps the merged branch's text, `use_base` keeps the
        target's. `deleteAfter` (default `true`) removes the merged branch's
        files and strings; the branch row stays with `status: merged`. A branch
        with active child branches returns `409 has_child_branches`.
      operationId: mergeProjectBranch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required:
                - strategy
              properties:
                strategy:
                  type: string
                  enum:
                    - use_branch
                    - use_base
                targetName:
                  type:
                    - string
                    - 'null'
                  maxLength: 128
                deleteAfter:
                  type: boolean
                  default: true
      responses:
        '200':
          description: The branch merged into.
          content:
            application/json:
              schema:
                type: object
                required:
                  - branch
                properties:
                  branch:
                    $ref: '#/components/schemas/ProjectBranch'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '503':
          $ref: '#/components/responses/Unavailable'
components:
  parameters:
    ProjectId:
      name: projectId
      in: path
      required: true
      schema:
        type: string
        maxLength: 128
    BranchName:
      name: branchName
      in: path
      required: true
      description: >-
        The branch name. Encode a slash as `%2F`, for example
        `release%2F2026-12`.
      schema:
        type: string
        maxLength: 128
  schemas:
    ProjectBranch:
      type: object
      required:
        - id
        - projectId
        - name
        - title
        - baseBranchId
        - isDefault
        - isProtected
        - status
        - lastSyncedAt
        - createdByUserId
        - mergedAt
        - mergedIntoBranchId
        - createdAt
        - updatedAt
        - fileCount
        - keyCount
      properties:
        id:
          type: string
          format: uuid
        projectId:
          type: string
        name:
          type: string
        title:
          type:
            - string
            - 'null'
        baseBranchId:
          type:
            - string
            - 'null'
          format: uuid
          description: The parent branch a merge goes onto by default.
        isDefault:
          type: boolean
        isProtected:
          type: boolean
          description: Strings on a protected branch change only through merge.
        status:
          type: string
          enum:
            - active
            - merged
        lastSyncedAt:
          type:
            - string
            - 'null'
          format: date-time
        createdByUserId:
          type:
            - string
            - 'null'
          format: uuid
        mergedAt:
          type:
            - string
            - 'null'
          format: date-time
        mergedIntoBranchId:
          type:
            - string
            - 'null'
          format: uuid
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        fileCount:
          type: integer
        keyCount:
          type: integer
    Error:
      type: object
      required:
        - error
        - message
      properties:
        error:
          type: string
        message:
          type: string
        details:
          type: object
          description: >-
            Structured context, such as the `jobId` that stopped a bulk job
            update.
          additionalProperties: true
  responses:
    BadRequest:
      description: Invalid query parameters or request body.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: The personal access token is missing or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: The token lacks the required scope or workspace access.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: The resource is missing or inaccessible.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Conflict:
      description: >-
        The project is not native, the key already exists, the segment is
        locked, the webhook endpoint limit was reached, or the job, memory, or
        glossary is managed elsewhere or archived.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unavailable:
      description: Authentication or resource storage is temporarily unavailable.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    personalAccessToken:
      type: apiKey
      in: header
      name: x-api-key

````

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