GitHub Sites API

The Sites API from GitHub — 2 operation(s) for sites.

Documentation

📖
Documentation
https://docs.github.com/en/rest/apps
📖
Documentation
https://raw.githubusercontent.com/api-evangelist/github/refs/heads/main/ https://docs.github.com/en/rest/authentication/authenticating-to-the-rest-api
📖
Documentation
https://docs.github.com/en/rest/codes-of-conduct/codes-of-conduct
📖
Documentation
https://docs.github.com/en/rest/emojis
📖
Documentation
https://docs.github.com/en/rest/gitignore
📖
Documentation
https://docs.github.com/en/rest/apps/installations
📖
Documentation
https://docs.github.com/en/rest/enterprise-admin
📖
Documentation
https://docs.github.com/en/rest/activity/events
📖
Documentation
https://docs.github.com/en/rest/orgs
📖
Documentation
https://docs.github.com/en/rest/rate-limit
📖
Documentation
https://docs.github.com/en/enterprise-cloud@latest/rest/scim
📖
Documentation
https://docs.github.com/en/rest/using-the-rest-api/getting-started-with-the-rest-api
📖
Documentation
https://docs.github.com/en/rest/teams
📖
Documentation
https://docs.github.com/en/rest/meta/meta
📖
Documentation
https://docs.github.com/en/rest/actions
📖
Documentation
https://docs.github.com/en/rest/branches
📖
Documentation
https://docs.github.com/en/rest/code-scanning
📖
Documentation
https://docs.github.com/en/rest/collaborators
📖
Documentation
https://docs.github.com/en/rest/dependabot
📖
Documentation
https://docs.github.com/en/rest/webhooks
📖
Documentation
https://docs.github.com/en/rest/pulls
📖
Documentation
https://docs.github.com/en/rest/git/tags
📖
Documentation
https://docs.github.com/en/rest/repos/autolinks
📖
Documentation
https://docs.github.com/en/rest/collaborators/invitations

Specifications

Other Resources

OpenAPI Specification

github-sites-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  version: 1.1.4
  title: GitHub Application About Sites API
  description: 'Use the REST API to retrieve information about GitHub Apps and GitHub App

    installations.'
  license:
    name: MIT
    url: https://spdx.org/licenses/MIT
  termsOfService: https://docs.github.com/articles/github-terms-of-service
  contact:
    name: Support
    url: https://support.github.com/contact?tags=dotcom-rest-api
  x-github-plan: ghes
  x-github-release: 3.9
servers:
- url: '{protocol}://{hostname}/api/v3'
  variables:
    hostname:
      description: Self-hosted Enterprise Server hostname
      default: HOSTNAME
    protocol:
      description: Self-hosted Enterprise Server protocol
      default: http
tags:
- name: Sites
paths:
  /repos/{owner}/{repo}/pages:
    get:
      summary: GitHub Get Github Enterprise Server Pages Site
      description: 'Gets information about a GitHub Enterprise Server Pages site.


        OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.'
      tags:
      - Sites
      operationId: getGithubEnterpriseServerPagesSite
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/pages/pages#get-a-apiname-pages-site
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - in: header
        name: Authorization
        schema:
          type: string
        example: example_value
      - in: header
        name: X-GitHub-Api-Version
        schema:
          type: string
          default: '2022-11-28'
        example: example_value
      - in: header
        name: Accept
        schema:
          type: string
          default: application/vnd.github+json
        example: example_value
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/page'
              examples:
                default:
                  $ref: '#/components/examples/page'
        '404':
          $ref: '#/components/responses/not_found'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: pages
        subcategory: pages
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    post:
      summary: GitHub Create Github Enterprise Server Pages Site
      description: 'Configures a GitHub Enterprise Server Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages)."


        The authenticated user must be a repository administrator, maintainer, or have the ''manage GitHub Pages settings'' permission.


        OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.'
      tags:
      - Sites
      operationId: createGithubEnterpriseServerPagesSite
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/pages/pages#create-a-apiname-pages-site
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - in: header
        name: Authorization
        schema:
          type: string
        example: example_value
      - in: header
        name: X-GitHub-Api-Version
        schema:
          type: string
          default: '2022-11-28'
        example: example_value
      - in: header
        name: Accept
        schema:
          type: string
          default: application/vnd.github+json
        example: example_value
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              description: The source branch and directory used to publish your Pages site.
              properties:
                build_type:
                  type: string
                  description: The process in which the Page will be built. Possible values are `"legacy"` and `"workflow"`.
                  enum:
                  - legacy
                  - workflow
                source:
                  type: object
                  description: The source branch and directory used to publish your Pages site.
                  properties:
                    branch:
                      type: string
                      description: The repository branch used to publish your site's source files.
                    path:
                      type: string
                      description: 'The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. Default: `/`'
                      enum:
                      - /
                      - /docs
                      default: /
                  required:
                  - branch
              anyOf:
              - required:
                - source
              - required:
                - build_type
            examples:
              default:
                value:
                  source:
                    branch: main
                    path: /docs
      responses:
        '201':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/page'
              examples:
                default:
                  $ref: '#/components/examples/page'
        '409':
          $ref: '#/components/responses/conflict'
        '422':
          $ref: '#/components/responses/validation_failed'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: pages
        subcategory: pages
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    put:
      summary: GitHub Update Information About Github Enterprise Server Pages Site
      description: 'Updates information for a GitHub Enterprise Server Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages).


        The authenticated user must be a repository administrator, maintainer, or have the ''manage GitHub Pages settings'' permission.


        OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.'
      tags:
      - Sites
      operationId: updateInformationAboutGithubEnterpriseServerPagesSite
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/pages/pages#update-information-about-a-apiname-pages-site
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - in: header
        name: Authorization
        schema:
          type: string
        example: example_value
      - in: header
        name: X-GitHub-Api-Version
        schema:
          type: string
          default: '2022-11-28'
        example: example_value
      - in: header
        name: Accept
        schema:
          type: string
          default: application/vnd.github+json
        example: example_value
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                cname:
                  type: string
                  description: Specify a custom domain for the repository. Sending a `null` value will remove the custom domain. For more about custom domains, see "[Using a custom domain with GitHub Pages](https://docs.github.com/enterprise-server@3.9/articles/using-a-custom-domain-with-github-pages/)."
                https_enforced:
                  type: boolean
                  description: Specify whether HTTPS should be enforced for the repository.
                build_type:
                  type: string
                  description: The process by which the GitHub Pages site will be built. `workflow` means that the site is built by a custom GitHub Actions workflow. `legacy` means that the site is built by GitHub when changes are pushed to a specific branch.
                  enum:
                  - legacy
                  - workflow
                source:
                  anyOf:
                  - type: string
                    description: Update the source for the repository. Must include the branch name, and may optionally specify the subdirectory `/docs`. Possible values are `"gh-pages"`, `"master"`, and `"master /docs"`.
                    enum:
                    - gh-pages
                    - master
                    - master /docs
                  - type: object
                    description: Update the source for the repository. Must include the branch name and path.
                    properties:
                      branch:
                        type: string
                        description: The repository branch used to publish your site's source files.
                      path:
                        type: string
                        description: The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`.
                        enum:
                        - /
                        - /docs
                    required:
                    - branch
                    - path
              anyOf:
              - required:
                - build_type
              - required:
                - source
              - required:
                - cname
              - required:
                - public
              - required:
                - https_enforced
            examples:
              default:
                value:
                  cname: octocatblog.com
                  source:
                    branch: main
                    path: /
      responses:
        '204':
          description: Response
        '400':
          $ref: '#/components/responses/bad_request'
        '409':
          $ref: '#/components/responses/conflict'
        '422':
          $ref: '#/components/responses/validation_failed'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: pages
        subcategory: pages
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    delete:
      summary: GitHub Delete Github Enterprise Server Pages Site
      description: 'Deletes a GitHub Enterprise Server Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages).


        The authenticated user must be a repository administrator, maintainer, or have the ''manage GitHub Pages settings'' permission.


        OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.'
      tags:
      - Sites
      operationId: deleteGithubEnterpriseServerPagesSite
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/pages/pages#delete-a-apiname-pages-site
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - in: header
        name: Authorization
        schema:
          type: string
        example: example_value
      - in: header
        name: X-GitHub-Api-Version
        schema:
          type: string
          default: '2022-11-28'
        example: example_value
      - in: header
        name: Accept
        schema:
          type: string
          default: application/vnd.github+json
        example: example_value
      responses:
        '204':
          description: Response
        '404':
          $ref: '#/components/responses/not_found'
        '409':
          $ref: '#/components/responses/conflict'
        '422':
          $ref: '#/components/responses/validation_failed'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: pages
        subcategory: pages
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /users/{username}/site_admin:
    put:
      summary: GitHub Promote User to Be Site Administrator
      description: Promotes a specified GitHub user to site administrator status through a PUT request to the /users/{username}/site_admin endpoint. This operation requires authentication with appropriate administrative privileges and is typically only available to GitHub Enterprise installations. The endpoint accepts the target user's username as a path parameter and, upon successful execution, grants the user elevated site-wide administrative permissions, allowing them to manage the GitHub instance, configure settings, and oversee all repositories and users within the organization or enterprise.
      operationId: promoteUserToBeSiteAdministrator
      tags:
      - Sites
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/enterprise-admin/users#promote-a-user-to-be-a-site-administrator
      parameters:
      - $ref: '#/components/parameters/username'
      - in: header
        name: Authorization
        schema:
          type: string
        example: example_value
      - in: header
        name: X-GitHub-Api-Version
        schema:
          type: string
          default: '2022-11-28'
        example: example_value
      - in: header
        name: Accept
        schema:
          type: string
          default: application/vnd.github+json
        example: example_value
      responses:
        '204':
          description: Response
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        category: enterprise-admin
        subcategory: users
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    delete:
      summary: GitHub Demote Site Administrator
      description: The GitHub User API endpoint DELETE /users/{username}/site_admin is used to revoke site administrator privileges from a specified user account. This operation demotes a user who currently has site-wide administrative access, removing their elevated permissions while maintaining their regular user account. The endpoint requires authentication with appropriate administrative credentials and accepts the target username as a path parameter. Upon successful execution, the specified user will no longer have site admin capabilities and will be restricted to standard user permissions. This is a critical administrative function typically used in GitHub Enterprise environments for managing user access levels and maintaining proper security controls across the platform.
      operationId: demoteSiteAdministrator
      tags:
      - Sites
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/enterprise-admin/users#demote-a-site-administrator
      parameters:
      - $ref: '#/components/parameters/username'
      - in: header
        name: Authorization
        schema:
          type: string
        example: example_value
      - in: header
        name: X-GitHub-Api-Version
        schema:
          type: string
          default: '2022-11-28'
        example: example_value
      - in: header
        name: Accept
        schema:
          type: string
          default: application/vnd.github+json
        example: example_value
      responses:
        '204':
          description: Response
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        category: enterprise-admin
        subcategory: users
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  responses:
    bad_request:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/basic-error'
        application/scim+json:
          schema:
            $ref: '#/components/schemas/scim-error'
    not_found:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/basic-error'
    conflict:
      description: Conflict
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/basic-error'
    validation_failed:
      description: Validation failed, or the endpoint has been spammed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/validation-error'
  schemas:
    basic-error:
      title: Basic Error
      description: Basic Error
      type: object
      properties:
        message:
          type: string
          example: Example body text
        documentation_url:
          type: string
          example: https://api.github.com/repos/octocat/Hello-World
        url:
          type: string
          example: https://api.github.com/repos/octocat/Hello-World
        status:
          type: string
          example: open
    scim-error:
      title: Scim Error
      description: Scim Error
      type: object
      properties:
        message:
          type: string
          example: Example body text
        documentation_url:
          type: string
          example: https://api.github.com/repos/octocat/Hello-World
        detail:
          type: string
          example: example_value
        status:
          type: integer
          example: 42
        scimType:
          type: string
          example: User
        schemas:
          type: array
          items:
            type: string
    page:
      title: GitHub Pages
      description: The configuration for GitHub Pages for a repository.
      type: object
      properties:
        url:
          type: string
          description: The API address for accessing this Page resource.
          format: uri
          example: https://api.github.com/repos/github/hello-world/pages
        status:
          type: string
          description: The status of the most recent build of the Page.
          example: built
          enum:
          - built
          - building
          - errored
        cname:
          description: The Pages site's custom domain
          example: example.com
          type: string
        protected_domain_state:
          type: string
          description: The state if the domain is verified
          example: pending
          enum:
          - pending
          - verified
          - unverified
        pending_domain_unverified_at:
          type: string
          description: The timestamp when a pending domain becomes unverified.
          format: date-time
          example: '2026-04-17T12:00:00Z'
        custom_404:
          type: boolean
          description: Whether the Page has a custom 404 page.
          example: false
          default: false
        html_url:
          type: string
          description: The web address the Page can be accessed from.
          format: uri
          example: https://example.com
        build_type:
          type: string
          description: The process in which the Page will be built.
          example: legacy
          enum:
          - legacy
          - workflow
        source:
          $ref: '#/components/schemas/pages-source-hash'
        public:
          type: boolean
          description: Whether the GitHub Pages site is publicly visible. If set to `true`, the site is accessible to anyone on the internet. If set to `false`, the site will only be accessible to users who have at least `read` access to the repository that published the site.
          example: true
        https_certificate:
          $ref: '#/components/schemas/pages-https-certificate'
        https_enforced:
          type: boolean
          description: Whether https is enabled on the domain
          example: true
      required:
      - url
      - status
      - cname
      - custom_404
      - public
    pages-source-hash:
      title: Pages Source Hash
      type: object
      properties:
        branch:
          type: string
          example: main
        path:
          type: string
          example: src/index.js
      required:
      - branch
      - path
    validation-error:
      title: Validation Error
      description: Validation Error
      type: object
      required:
      - message
      - documentation_url
      properties:
        message:
          type: string
          example: Example body text
        documentation_url:
          type: string
          example: https://api.github.com/repos/octocat/Hello-World
        errors:
          type: array
          items:
            type: object
            required:
            - code
            properties:
              resource:
                type: string
              field:
                type: string
              message:
                type: string
              code:
                type: string
              index:
                type: integer
              value:
                oneOf:
                - type: string
                - type: integer
                - type: array
                  items:
                    type: string
    pages-https-certificate:
      title: Pages Https Certificate
      type: object
      properties:
        state:
          type: string
          enum:
          - new
          - authorization_created
          - authorization_pending
          - authorized
          - authorization_revoked
          - issued
          - uploaded
          - approved
          - errored
          - bad_authz
          - destroy_pending
          - dns_changed
          example: approved
        description:
          type: string
          example: Certificate is approved
        domains:
          type: array
          items:
            type: string
          description: Array of the domain set and its alternate name (if it is configured)
          example:
          - example.com
          - www.example.com
        expires_at:
          type: string
          format: date
          example: '2026-04-17T12:00:00Z'
      required:
      - state
      - description
      - domains
  parameters:
    username:
      name: username
      description: The handle for the GitHub user account.
      in: path
      required: true
      schema:
        type: string
    repo:
      name: repo
      description: The name of the repository without the `.git` extension. The name is not case sensitive.
      in: path
      required: true
      schema:
        type: string
    owner:
      name: owner
      description: The account owner of the repository. The name is not case sensitive.
      in: path
      required: true
      schema:
        type: string
  examples:
    page:
      value:
        url: https://api.github.com/repos/github/developer.github.com/pages
        status: built
        cname: developer.github.com
        custom_404: false
        html_url: https://developer.github.com
        source:
          branch: master
          path: /
        public: true
        pending_domain_unverified_at: '2024-04-30T19:33:31Z'
        protected_domain_state: verified
        https_certificate:
          state: approved
          description: Certificate is approved
          domains:
          - developer.github.com
          expires_at: '2021-05-22'
        https_enforced: true
  securitySchemes:
    bearerHttpAuthentication:
      description: Bearer Token
      type: http
      scheme: Bearer
externalDocs:
  description: GitHub Enterprise Developer Docs
  url: https://docs.github.com/enterprise-server@3.9/rest/
x-webhooks:
  branch-protection-rule-created:
    post:
      summary: 'This event occurs when there is activity relating to branch protection rules. For more information, see "[About protected branches](https://docs.github.com/enterprise-server@3.9/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/about-protected-branches)." For information about the APIs to manage branch protection rules, see [the GraphQL documentation](https://docs.github.com/enterprise-server@3.9/graphql/reference/objects#branchprotectionrule) or "[Branch protection](https://docs.github.com/enterprise-server@3.9/rest/branches/branch-protection)" in the REST API documentation.


        To subscribe to this event, a GitHub App must have at least read-level access for the "Administration" repository permission.'
      description: A branch protection rule was created.
      operationId: branch-protection-rule/created
      externalDocs:
        url: https://docs.github.com/enterprise-server@3.9/webhooks/webhook-events-and-payloads#branch_protection_rule
      parameters:
      - name: User-Agent
        in: header
        example: GitHub-Hookshot/123abc
        schema:
          type: string
      - name: X-Github-Hook-Id
        in: header
        example: 12312312
        schema:
          type: string
      - name: X-Github-Event
        in: header
        example: issues
        schema:
          type: string
      - name: X-Github-Hook-Installation-Target-Id
        in: header
        example: 123123
        schema:
          type: string
      - name: X-Github-Hook-Installation-Target-Type
        in: header
        example: repository
        schema:
          type: string
      - name: X-GitHub-Delivery
        in: header
        example: 0b989ba4-242f-11e5-81e1-c7b6966d2516
        schema:
          type: string
      - name: X-Hub-Signature-256
        in: header
        example: sha256=6dcb09b5b57875f334f61aebed695e2e4193db5e
        schema:
          type: string
      - name: X-GitHub-Enterprise-Version
        in: header
        example: 3.1.9
        schema:
          type: string
      - name: X-GitHub-Enterprise-Host
        in: header
        example: ghes.github.com
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/webhook-branch-protection-rule-created'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully
      x-github:
        githubCloudOnly: false
        category: webhooks
        subcategory: branch_protection_rule
        supported-webhook-types:
        - repository
        - organization
        - app
  branch-protection-rule-deleted:
    post:
      summary: 'This event occurs when there is activity relating to branch protection rules. For more information, see "[About protected branches](https://docs.github.com/enterprise-server@3.9/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/about-protected-branches)." For information about the APIs to manage branch protection rules, see [the GraphQL documentation](https://docs.github.com/enterprise-server@3.9/graphql/reference/objects#branchprotectionrule) or "[Branch protection](https://docs.github.com/enterprise-server@3.9/rest/branches/branch-protection)" in the REST API documentation.


        To subscribe to this event, a GitHub App must have at least read-level access for the "Administration" repository permission.'
      description: A branch protection rule was deleted.
      operationId: branch-protection-rule/deleted
      externalDocs:
        url: https://docs.github.com/enterprise-server@3.9/webhooks/webhook-events-and-payloads#branch_protection_rule
      parameters:
      - name: User-Agent
        in: header
        example: GitHub-Hookshot/123abc
        schema:
          type: string
      - name: X-Github-Hook-Id
        in: header
        example: 12312312
        schema:
          type: string
      - name: X-Github-Event
        in: header
        example: issues
        schema:
          type: string
      - name: X-Github-Hook-Installation-Target-Id
        in: header
        example: 123123
        schema:
          type: string
      - name: X-Github-Hook-Installation-Target-Type
        in: header
        example: repository
        schema:
          type: string
      - name: X-GitHub-Delivery
        in: header
        example: 0b989ba4-242f-11e5-81e1-c7b6966d2516
        schema:
          type: string
      - name: X-Hub-Signature-256
        in: header
        example: sha256=6dcb09b5b57875f334f61aebed695e2e4193db5e
        schema:
          type: string
      - name: X-GitHub-Enterprise-Version
        in: header
        example: 3.1.9
        schema:
          type: string
      - name: X-GitHub-Enterprise-Host
        in: header
        example: ghes.github.com
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/webhook-branch-protection-rule-deleted'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully
      x-github:
        githubCloudOnly: false
        category: webhooks
        subcategory: branch_protection_rule
        supported-webhook-types:
        - repository
        - organization
        - app
  branch-protection-rule-edited:
    post:
      summary: 'This event occurs when there is activity relating to branch protection rules. For more information, see "[About protected branches](https://docs.github.com/enterprise-server@3.9/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/about-protected-branches)." For information about the APIs to manage branch protection rules, see [the GraphQL documentation](https://docs.github.com/enterprise-server@3.9/graphql/reference/objects#branchprotectionrule) or "[Branch protection](https://docs.github.com/enterprise-server@3.9/rest/branches/branch-protection)" in the REST API documentation.


        To subscribe to this event, a GitHub App must have at least read-level access for the "Administration" repository permission.'
      description: A branch protection rule was edited.
      operationId: branch-protection-rule/edited
      externalDocs:
        url: https://docs.github.com/enterprise-server@3.9/webhooks/webhook-events-and-payloads#branch_protection_rule
      parameters:
      - name: User-Agent
        in: header
        example: GitHub-Hookshot/123abc
        schema:
          type: string
      - name: X-Github-Hook-Id
        in: header
        example: 12312312
        schema:
          type: string
      - name: X-Github-Event
        in: header
        example: issues
        schema:
          type: string
      - name: X-Github-Hook-Installation-Target-Id
        in: header
        example: 123123
        schema:
          type: string
      - name: X-Github-Hook-Installation-Target-Type
        in: header
        example: repository
        schema:
          type: string
      - name: X-GitHub-Delivery
        in: header
        example: 0b989ba4-242f-11e5-81e1-c7b6966d2516
        schema:
          type: string
      - name: X-Hub-Signature-256
        in: header
        example: sha256=6dcb09b5b57875f334f61aebed695e2e4193db5e
        schema:
          type: string
      - name: X-GitHub-Enterprise-Version
        in: header
        example: 3.1.9
        schema:
          type: string
      - name: X-GitHub-Enterprise-Host
        in: header
        example: ghes.github.com
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/webhook-branch-protection-rule-edited'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully
      x-github:
        githubCloudOnly: false
        category: webhooks
        subcategory: branch_protection_rule
        supported-webhook-types:
        - repository
        - organization
        - app
  cache-sync:
    post:
      summary: This event occurs when a Git ref has been successfully synced to a cache replica. For more information, see "[About repository caching](https://docs.github.com/enterprise-server@3.9/admin/enterprise-management/caching-repositories/about-repository-caching)."
      operationId: cache

# --- truncated at 32 KB (625 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/github/refs/heads/main/openapi/github-sites-api-openapi.yml