v1

latestOpenAPI 3.0.0Proprietary2026-07-26316155742.7 KB
Branches

Merge a branch

Merge an existing branch back into its base branch.

The merge runs asynchronously. The branch transitions to merging_branch and settles in merged, merge_error, or merge_conflict once the background job completes; the response body for this request is empty. Poll the branch resource to observe the final state.

A branch cannot be merged while it still has open jobs or open translation orders attached to its branch project — in that case the request is rejected with 409 Conflict. A branch whose current state does not allow a merge is rejected with 422 Unprocessable Entity.

Requires the Branching feature to be enabled on the account.

Note: Merging a branch may take several minutes depending on diff size.

patch/projects/{project_id}/branches/{name}/merge

Path parameters

project_idstring required

Project ID

namestring required

name

Headers

X-PhraseApp-OTPstring

Two-Factor-Authentication token (optional)

Request body

strategy'use_main' | 'use_branch'

Conflict resolution strategy applied when the branch and its base have diverged. use_main keeps the values from the base branch; use_branch keeps the values from the branch being merged.

Example request

{
  "strategy": "use_main"
}

Response

OK. The merge has been scheduled. The response body is empty; observe progress by polling the branch resource.