GitLab Protected branches API
Use this API to manage [protected branches](https://docs.gitlab.com/user/project/repository/branches/protected/) for a project, and the [protected branch settings](https://docs.gitlab.com/user/project/repository/branches/protected/#in-a-group) that all projects in a group inherit. GitLab Premium and GitLab Ultimate support more granular protections for pushing to branches. Administrators can grant permission to modify and push to protected branches only to deploy keys, instead of specific users. > [!warning] > Group protected branch settings are restricted to top-level groups. They support only > [valid access levels](https://docs.gitlab.com/api/group_protected_branches/#valid-access-levels), > and cannot name individual users or groups.