---
title: "Get the branching model for a project"
method: GET
path: "/workspaces/{workspace}/projects/{project_key}/branching-model"
tags: ["Branching model"]
---

# Get the branching model for a project

`GET /workspaces/{workspace}/projects/{project_key}/branching-model`

Return the branching model set at the project level. This view is
read-only. The branching model settings can be changed using the
[settings](#api-workspaces-workspace-projects-project-key-branching-model-settings-get)
API.

The returned object:

1. Always has a `development` property. `development.name` is
   the user-specified branch that can be inherited by an individual repository's
   branching model.
2. Might have a `production` property. `production` will not
   be present when `production` is disabled.
   `production.name` is the user-specified branch that can be
   inherited by an individual repository's branching model.
3. Always has a `branch_types` array which contains all enabled branch
   types.

## Response `200`

The branching model object

- ProjectBranchingModel — A project's branching model
  - `type` string, required
  - `branch_types` object[] — The active branch types.
    - `kind` 'feature' | 'bugfix' | 'release' | 'hotfix', required — The kind of branch.
    - `prefix` string, required — The prefix for this branch type. A branch with this prefix will be classified as per `kind`. The prefix must be a valid prefix for a branch and must always exist. It cannot be blank, empty or `null`.
  - `development` object
    - `name` string, required — Name of the target branch. If inherited by a repository, it will default to the main branch if the specified branch does not exist.
    - `use_mainbranch` boolean, required — Indicates if the setting points at an explicit branch (`false`) or tracks the main branch (`true`).
  - `production` object
    - `name` string, required — Name of the target branch. If inherited by a repository, it will default to the main branch if the specified branch does not exist.
    - `use_mainbranch` boolean, required — Indicates if the setting points at an explicit branch (`false`) or tracks the main branch (`true`).

## Other responses

- `401` — If the request was not authenticated
- `403` — If the authenticated user does not have read access to the project
- `404` — If the project does not exist

---

[API](https://skmtc.dev/atlassian/apis/bitbucket-api.md) · [All operations](https://skmtc.dev/atlassian/apis/bitbucket-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/atlassian/bitbucket-api/revisions/3dbfe6a80143/schema)
