How AI is applied across API Evangelist and APIs.io. Read my AI disclosure →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

GitHub Protections API

The Protections API from GitHub — 7 operation(s) for protections.

GitHub Protections API is one of 350 APIs that GitHub publishes on the APIs.io network, described by a machine-readable OpenAPI specification and an AsyncAPI event-driven specification.

Tagged areas include Protections. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, an AsyncAPI specification, and an API reference.

This API exposes 18 operations across 7 paths, and defines 16 schemas. It is described by OpenAPI 3.2.0, at version 1.1.4.

Requests are made against a single base URL, {protocol}://{hostname}.

18 operations 7 paths 16 schemas 6 DELETE6 GET2 PATCH3 POST1 PUT

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.2.0
API Version
1.1.4
Base URL
https://api.github.com
Authentication
HTTP Bearer
Contact
License
Terms of Service
Resource Areas
1

Authentication & Security 1

GitHub Protections API declares 1 security scheme for authenticating requests. It accepts HTTP bearer tokens (bearerHttpAuthentication).

  • bearerHttpAuthentication — Bearer Token

Paths & Operations 18

Across 7 paths, the API surfaces 18 operations — 6 DELETE, 6 GET, 2 PATCH, 3 POST, 1 PUT. Each is listed below with its method, path, parameters, and response codes.

Protections 18
GET
/repos/{owner}/{repo}/branches/{branch}/protection
GitHub Get Branch Protection
getBranchProtection 6 params → 200404
PUT
/repos/{owner}/{repo}/branches/{branch}/protection
GitHub Update Branch Protection
updateBranchProtection 6 params body → 200403404422
DELETE
/repos/{owner}/{repo}/branches/{branch}/protection
GitHub Delete Branch Protection
deleteBranchProtection 6 params → 204403
GET
/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins
GitHub Get Admin Branch Protection
getAdminBranchProtection 6 params → 200
POST
/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins
GitHub Set Admin Branch Protection
setAdminBranchProtection 6 params → 200
DELETE
/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins
GitHub Delete Admin Branch Protection
deleteAdminBranchProtection 6 params → 204404
GET
/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews
GitHub Get Pull Request Review Protection
getPullRequestReviewProtection 6 params → 200
PATCH
/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews
GitHub Update Pull Request Review Protection
updatePullRequestReviewProtection 6 params body → 200422
DELETE
/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews
GitHub Delete Pull Request Review Protection
deletePullRequestReviewProtection 6 params → 204404
GET
/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures
GitHub Get Commit Signature Protection
getCommitSignatureProtection 6 params → 200404
POST
/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures
GitHub Create Commit Signature Protection
createCommitSignatureProtection 6 params → 200404
DELETE
/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures
GitHub Delete Commit Signature Protection
deleteCommitSignatureProtection 6 params → 204404
GET
/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks
GitHub Get Status Checks Protection
getStatusChecksProtection 6 params → 200404
PATCH
/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks
GitHub Update Status Check Protection
updateStatusCheckProtection 6 params body → 200404422
DELETE
/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks
GitHub Remove Status Check Protection
removeStatusCheckProtection 6 params → 204
GET
/repos/{owner}/{repo}/tags/protection
GitHub List Tag Protection States for Repository
listTagProtectionStatesForRepository 5 params → 200403404
POST
/repos/{owner}/{repo}/tags/protection
GitHub Create Tag Protection State for Repository
createTagProtectionStateForRepository 5 params body → 201403404
DELETE
/repos/{owner}/{repo}/tags/protection/{tag_protection_id}
GitHub Delete Tag Protection State for Repository
deleteTagProtectionStateForRepository 6 params → 204403404

Schemas 16

The contract defines 16 schemas that model the data the API accepts and returns. The most detailed are simple-user (21 properties), nullable-simple-user (21 properties), integration (17 properties), branch-protection (16 properties). Each schema is shown below with its type and property counts.

status-check-policy
object
Status Check Policy
5 properties 5 required
validation-error-simple
object
Validation Error Simple
3 properties 2 required
protected-branch-required-status-check
object
Protected Branch Required Status Check
6 properties 2 required
team
object
Groups of organization members that gives permissions on specified repositories.
13 properties 11 required
branch-restriction-policy
object
Branch Restriction Policy
7 properties 7 required
simple-user
object
GitHub user.
21 properties 18 required
protected-branch-pull-request-review
object
Protected Branch Pull Request Review
7 properties 2 required
validation-error
object
Validation Error
3 properties 2 required
basic-error
object
Basic Error
4 properties
branch-protection
object
Branch Protection
16 properties
protected-branch-admin-enforced
object
Protected Branch Admin Enforced
2 properties 2 required
integration
object
GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They…
17 properties 11 required
nullable-team-simple
object
Groups of organization members that gives permissions on specified repositories.
12 properties 10 required
protected-branch
object
Branch protections protect branches
13 properties 1 required
nullable-simple-user
object
GitHub user.
21 properties 18 required
tag-protection
object
Tag protection
5 properties 1 required

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

github-protections-api-openapi.yml Raw ↑

Other APIs GitHub publishes across the network.

GitHub Events API
GitHub Feeds API
GitHub Gists API
GitHub Issues API
GitHub Licenses API
GitHub Markdown API
GitHub Meta API
GitHub Notifications API
GitHub Octocat API
GitHub Projects API
GitHub Repos API
GitHub Search API
Where this information came from

This is an independent, third-party profile of GitHub Protections API, published by API Evangelist. We do not operate, host, resell, or support these APIs, and we are not affiliated with or endorsed by the company unless stated above. Everything here is built from publicly available information — the company's own site, developer portal, documentation, public repositories, and the specifications it publishes for public use. Nothing is obtained by breaching a system, defeating an access control, or using credentials.

The Kin Score and Agent Readiness rating are independently calculated assessments of a company's public API artifacts, scored against a published rubric. They are not certifications, endorsements, security assessments, or audits.

Corrections, re-scores, and removal are free — no partnership or purchase required, and you do not need to justify the request. A removed company is recorded as unrated, never scored zero for having asked. Acknowledgement within one business day; removal within two.

info@apievangelist.com · Read the full data-sourcing policy →
On a security or compliance team? Put security in the subject line and you will get a person, not a form — we will tell you exactly which public URLs this profile was built from.