v1

latestOpenAPI 3.0.0Proprietary2026-07-26316155742.7 KB
Branches

Create a branch

Create a new branch.

Branch project provisioning runs asynchronously, so the newly created branch is returned in a transitional state (typically creating_branch) and only reaches success once the underlying project has been set up. Poll the branch resource until its state becomes success before performing further operations on it.

Requires the Branching feature to be enabled on the account.

Note: Creating a new branch may take several minutes depending on the project size.

post/projects/{project_id}/branches

Path parameters

project_idstring required

Project ID

Headers

X-PhraseApp-OTPstring

Two-Factor-Authentication token (optional)

Request body

namestring required

Name of the branch

basestring

Name of an existing branch to use as the base for the new branch.

Example request

{
  "name": "my-branch",
  "base": "parent-branch"
}

Response

Created

base_project_idstring
branch_project_idstring
namestring
basestring nullable

Name of the base branch this branch was created from. Only present for branches created with the newer branching system.

created_atstring date-time
updated_atstring date-time
merged_atstring date-time
state'creating_branch' | 'merging_branch' | 'syncing_branch' | 'merged' | 'success' | 'branch_error' | 'merge_conflict'
child_branchesstring[]

Example response

{
  "name": "new-branch",
  "created_at": "2015-01-28T09:52:53Z",
  "updated_at": "2015-01-28T09:52:53Z",
  "merged_at": "2015-01-28T09:52:53Z",
  "merged_by": {
    "id": "abcd1234cdef1234abcd1234cdef1234",
    "username": "joe.doe",
    "name": "Joe Doe"
  },
  "created_by": {
    "id": "abcd1234cdef1234abcd1234cdef1234",
    "username": "joe.doe",
    "name": "Joe Doe"
  },
  "state": "success",
  "child_branches": [
    "feature_2",
    "feature_3"
  ]
}