---
title: "Changes to Create a branch restriction rule"
method: POST
path: "/repositories/{workspace}/{repo_slug}/branch-restrictions"
---

# Changes to Create a branch restriction rule

`POST /repositories/{workspace}/{repo_slug}/branch-restrictions`

> Every recorded change to this operation, newest first.

## Timeline

Changed in 3 of 15 revisions.

- **2026-08-30** `5748cb124a33`: 2 info
- **2026-08-08** `8c7911c0a910`: 2 info
- **2026-07-13** `d344164ecb11`: 3 breaking, 4 warning, 15 info

## Changes

- **2026-08-30** `5748cb124a33`: 2 info
  - added the new optional request property `allOf[subschema #2: Branch Restriction]/pipelines_source_branches`
  - added the optional property `allOf[subschema #2: Branch Restriction]/pipelines_source_branches` to the response with the `201` status
- **2026-08-08** `8c7911c0a910`: 2 info
  - added the new optional request property `allOf[subschema #2: Branch Restriction]/groups/items/allOf[subschema #2: Group]/workspace/allOf[subschema #2: Workspace]/is_personal`
  - added the optional property `allOf[subschema #2: Branch Restriction]/groups/items/allOf[subschema #2: Group]/workspace/allOf[subschema #2: Workspace]/is_personal` to the response with the `201` status
- **2026-07-13** `d344164ecb11`: 3 breaking, 4 warning, 15 info
  - added the new required request property `allOf[subschema #2: Branch Restriction]/branch_match_kind`
  - added the new required request property `allOf[subschema #2: Branch Restriction]/kind`
  - added the new required request property `allOf[subschema #2: Branch Restriction]/pattern`
  - removed the request property `allOf[subschema #2: Branch Restriction]/groups/items/allOf[subschema #2: Group]/owner/allOf[subschema #2: Account]/username`
  - removed the request property `allOf[subschema #2: Branch Restriction]/users/items/allOf[subschema #2: Account]/username`
  - removed the optional property `allOf[subschema #2: Branch Restriction]/groups/items/allOf[subschema #2: Group]/owner/allOf[subschema #2: Account]/username` from the response with the `201` status
  - removed the optional property `allOf[subschema #2: Branch Restriction]/users/items/allOf[subschema #2: Account]/username` from the response with the `201` status
  - added the new optional request property `allOf[subschema #2: Branch Restriction]/branch_type`
  - added the new optional request property `allOf[subschema #2: Branch Restriction]/groups/items/allOf[subschema #2: Group]/workspace/allOf[subschema #2: Workspace]/forking_mode`
  - added the new optional request property `allOf[subschema #2: Branch Restriction]/groups/items/allOf[subschema #2: Group]/workspace/allOf[subschema #2: Workspace]/is_privacy_enforced`
  - added the new optional request property `allOf[subschema #2: Branch Restriction]/id`
  - added the new optional request property `allOf[subschema #2: Branch Restriction]/links`
  - added the new optional request property `allOf[subschema #2: Branch Restriction]/value`
  - added the optional property `allOf[subschema #2: Branch Restriction]/branch_type` to the response with the `201` status
  - added the optional property `allOf[subschema #2: Branch Restriction]/groups/items/allOf[subschema #2: Group]/workspace/allOf[subschema #2: Workspace]/forking_mode` to the response with the `201` status
  - added the optional property `allOf[subschema #2: Branch Restriction]/groups/items/allOf[subschema #2: Group]/workspace/allOf[subschema #2: Workspace]/is_privacy_enforced` to the response with the `201` status
  - added the optional property `allOf[subschema #2: Branch Restriction]/id` to the response with the `201` status
  - added the optional property `allOf[subschema #2: Branch Restriction]/links` to the response with the `201` status
  - added the optional property `allOf[subschema #2: Branch Restriction]/value` to the response with the `201` status
  - added the required property `allOf[subschema #2: Branch Restriction]/branch_match_kind` to the response with the `201` status
  - added the required property `allOf[subschema #2: Branch Restriction]/kind` to the response with the `201` status
  - added the required property `allOf[subschema #2: Branch Restriction]/pattern` to the response with the `201` status

---

[Operation](https://skmtc.dev/atlassian/apis/bitbucket-api/docs/repositories/:workspace/:repo_slug/branch-restrictions/post.md) - [API](https://skmtc.dev/atlassian/apis/bitbucket-api.md) - [Page](https://skmtc.dev/atlassian/apis/bitbucket-api/changes/repositories/:workspace/:repo_slug/branch-restrictions/post)
