Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server.
Adding admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled.
POST /repos/:owner/:repo/branches/:branch/protection/enforce_admins
Status: 200 OK
{
"url": "https://api.github.com/repos/octocat/Hello-World/branches/master/protection/enforce_admins",
"enabled": true
}