POST
Try POST /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules — GitHub API
GitHub playgroundCreate a custom deployment protection rule on an environment
Create a custom deployment protection rule on an environment