Branches

Add Branch

Required scopes: project.source.file (Read and Write).

post/projects/{projectId}/branches

Request

Path parameters

projectIdinteger required

Project Identifier. Get via List Projects

Request body

namestring required

Branch name

Note: Can't contain \ / : * ? " < > | symbols

titlestring

Use to provide more details for translators. Title is available in UI only

isProtectedboolean

If true, the branch is protected from some actions (for example, delete or force-push operations may be restricted)

Example request

{
  "name": "develop-master",
  "title": "Master branch",
  "isProtected": true
}

Response

Branch was successfully created

Example response

{
  "data": {
    "id": 34,
    "projectId": 2,
    "name": "develop-master",
    "title": "Master branch",
    "createdAt": "2019-09-16T13:48:04+00:00",
    "updatedAt": "2019-09-19T13:25:27+00:00",
    "isProtected": true
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.