{% extends "docs/base.html" %} {% block docs_content %}

Create branch protection

Create a new branch protection rule.

Endpoints

POST /api/v1/teams/{team_slug}/repos/{repo_slug}/protections
POST /api/v1/users/{username}/repos/{repo_slug}/protections
Authenticated

Success

Returns JSON response.

{% endblock %}