GitHub Configuration API

The Configuration API from GitHub — 6 operation(s) for configuration.

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-configuration-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  version: 1.1.4
  title: GitHub Application About Configuration 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: Configuration
paths:
  /app/hook/config:
    get:
      summary: GitHub Getwebhook Configuration for an App
      description: 'Returns the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)."


        You must use a [JWT](https://docs.github.com/enterprise-server@3.9/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.'
      tags:
      - Configuration
      operationId: getwebhookConfigurationForAnApp
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/apps/webhooks#get-a-webhook-configuration-for-an-app
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/webhook-config'
              examples:
                default:
                  $ref: '#/components/examples/webhook-config'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        category: apps
        subcategory: webhooks
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    patch:
      summary: GitHub Updatewebhook Configuration for an App
      description: 'Updates the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)."


        You must use a [JWT](https://docs.github.com/enterprise-server@3.9/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.'
      tags:
      - Configuration
      operationId: updatewebhookConfigurationForAnApp
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/apps/webhooks#update-a-webhook-configuration-for-an-app
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                url:
                  $ref: '#/components/schemas/webhook-config-url'
                content_type:
                  $ref: '#/components/schemas/webhook-config-content-type'
                secret:
                  $ref: '#/components/schemas/webhook-config-secret'
                insecure_ssl:
                  $ref: '#/components/schemas/webhook-config-insecure-ssl'
            examples:
              default:
                value:
                  content_type: json
                  insecure_ssl: '0'
                  secret: '********'
                  url: https://example.com/webhook
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/webhook-config'
              examples:
                default:
                  $ref: '#/components/examples/webhook-config'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        category: apps
        subcategory: webhooks
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /orgs/{org}/hooks/{hook_id}/config:
    get:
      summary: GitHub Get Webhook Configuration for an Organization
      description: 'Returns the webhook configuration for an organization. To get more information about the webhook, including the `active` state and `events`, use "[Get an organization webhook ](/rest/orgs/webhooks#get-an-organization-webhook)."


        OAuth app tokens and personal access tokens (classic) need the `admin:org_hook` scope to use this endpoint.'
      tags:
      - Configuration
      operationId: getWebhookConfigurationForAnOrganization
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/orgs/webhooks#get-a-webhook-configuration-for-an-organization
      parameters:
      - $ref: '#/components/parameters/org'
      - $ref: '#/components/parameters/hook-id'
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/webhook-config'
              examples:
                default:
                  $ref: '#/components/examples/webhook-config'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: orgs
        subcategory: webhooks
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    patch:
      summary: GitHub Update Webhook Configuration for an Organization
      description: 'Updates the webhook configuration for an organization. To update more information about the webhook, including the `active` state and `events`, use "[Update an organization webhook ](/rest/orgs/webhooks#update-an-organization-webhook)."


        OAuth app tokens and personal access tokens (classic) need the `admin:org_hook` scope to use this endpoint.'
      tags:
      - Configuration
      operationId: updateWebhookConfigurationForAnOrganization
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/orgs/webhooks#update-a-webhook-configuration-for-an-organization
      parameters:
      - $ref: '#/components/parameters/org'
      - $ref: '#/components/parameters/hook-id'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                url:
                  $ref: '#/components/schemas/webhook-config-url'
                content_type:
                  $ref: '#/components/schemas/webhook-config-content-type'
                secret:
                  $ref: '#/components/schemas/webhook-config-secret'
                insecure_ssl:
                  $ref: '#/components/schemas/webhook-config-insecure-ssl'
            examples:
              default:
                summary: Update an existing webhook
                value:
                  url: http://example.com/webhook
                  content_type: json
                  insecure_ssl: '0'
                  secret: '********'
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/webhook-config'
              examples:
                default:
                  $ref: '#/components/examples/webhook-config'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: orgs
        subcategory: webhooks
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /repos/{owner}/{repo}/code-scanning/default-setup:
    get:
      summary: GitHub Get Code Scanning Default Setup Configuration
      description: 'Gets a code scanning default setup configuration.


        OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.'
      tags:
      - Configuration
      operationId: getCodeScanningDefaultSetupConfiguration
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/code-scanning/code-scanning#get-a-code-scanning-default-setup-configuration
      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/code-scanning-default-setup'
              examples:
                default:
                  $ref: '#/components/examples/code-scanning-default-setup'
        '403':
          $ref: '#/components/responses/code_scanning_forbidden_read'
        '404':
          $ref: '#/components/responses/not_found'
        '503':
          $ref: '#/components/responses/service_unavailable'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: code-scanning
        subcategory: code-scanning
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    patch:
      summary: GitHub Update Code Scanning Default Setup Configuration
      description: 'Updates a code scanning default setup configuration.


        OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.'
      tags:
      - Configuration
      operationId: updateCodeScanningDefaultSetupConfiguration
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/code-scanning/code-scanning#update-a-code-scanning-default-setup-configuration
      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:
              $ref: '#/components/schemas/code-scanning-default-setup-update'
            examples:
              default:
                $ref: '#/components/examples/code-scanning-default-setup-update'
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/empty-object'
              examples:
                default:
                  value: {}
        '202':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/code-scanning-default-setup-update-response'
              examples:
                default:
                  $ref: '#/components/examples/code-scanning-default-setup-update-response'
        '403':
          $ref: '#/components/responses/code_scanning_forbidden_write'
        '404':
          $ref: '#/components/responses/not_found'
        '409':
          $ref: '#/components/responses/code_scanning_conflict'
        '503':
          $ref: '#/components/responses/service_unavailable'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: code-scanning
        subcategory: code-scanning
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /repos/{owner}/{repo}/hooks/{hook_id}/config:
    get:
      summary: GitHub Get Webhook Configuration for Repository
      description: 'Returns the webhook configuration for a repository. To get more information about the webhook, including the `active` state and `events`, use "[Get repository webhook](/rest/webhooks/repos#get-a-repository-webhook)."


        OAuth app tokens and personal access tokens (classic) need the `read:repo_hook` or `repo` scope to use this endpoint.'
      tags:
      - Configuration
      operationId: getWebhookConfigurationForRepository
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/repos/webhooks#get-a-webhook-configuration-for-a-repository
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - $ref: '#/components/parameters/hook-id'
      - 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/webhook-config'
              examples:
                default:
                  $ref: '#/components/examples/webhook-config'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: repos
        subcategory: webhooks
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    patch:
      summary: GitHub Update Webhook Configuration for Repository
      description: 'Updates the webhook configuration for a repository. To update more information about the webhook, including the `active` state and `events`, use "[Update a repository webhook](/rest/webhooks/repos#update-a-repository-webhook)."


        OAuth app tokens and personal access tokens (classic) need the `write:repo_hook` or `repo` scope to use this endpoint.'
      tags:
      - Configuration
      operationId: updateWebhookConfigurationForRepository
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/repos/webhooks#update-a-webhook-configuration-for-a-repository
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - $ref: '#/components/parameters/hook-id'
      - 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: false
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              properties:
                url:
                  $ref: '#/components/schemas/webhook-config-url'
                content_type:
                  $ref: '#/components/schemas/webhook-config-content-type'
                secret:
                  $ref: '#/components/schemas/webhook-config-secret'
                insecure_ssl:
                  $ref: '#/components/schemas/webhook-config-insecure-ssl'
            examples:
              default:
                summary: Example of updating content type and URL
                value:
                  content_type: json
                  url: https://example.com/webhook
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/webhook-config'
              examples:
                default:
                  $ref: '#/components/examples/webhook-config'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: repos
        subcategory: webhooks
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /setup/api/configcheck:
    get:
      summary: GitHub Get the Configuration Status
      description: 'This endpoint allows you to check the status of the most recent configuration process:


        Note that you may need to wait several seconds after you start a process before you can check its status.


        The different statuses are:


        | Status        | Description                       |

        | - |  |

        | `PENDING`     | The job has not started yet       |

        | `CONFIGURING` | The job is running                |

        | `DONE`        | The job has finished correctly    |

        | `FAILED`      | The job has finished unexpectedly |'
      operationId: getTheConfigurationStatus
      tags:
      - Configuration
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/enterprise-admin/management-console#get-the-configuration-status
      servers:
      - url: '{protocol}://{hostname}'
        variables:
          hostname:
            default: HOSTNAME
            description: Self-hosted Enterprise Server hostname
          protocol:
            default: http
            description: Self-hosted Enterprise Server protocol
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/configuration-status'
              examples:
                default:
                  $ref: '#/components/examples/configuration-status'
        '401':
          description: Unauthorized
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        category: enterprise-admin
        subcategory: management-console
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /setup/api/configure:
    post:
      summary: GitHub Start Configuration Process
      description: The GitHub Setup API's `/setup/api/configure` endpoint accepts POST requests to initiate the configuration process for a new GitHub Enterprise Server instance. This endpoint is typically called during the initial setup phase when administrators need to establish basic system settings such as management console password, hostname, and other foundational configurations. The API operation triggers the configuration workflow that prepares the instance for use, and it returns a response indicating whether the configuration process has successfully started or if any errors occurred during initialization.
      operationId: startConfigurationProcess
      tags:
      - Configuration
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/enterprise-admin/management-console#start-a-configuration-process
      servers:
      - url: '{protocol}://{hostname}'
        variables:
          hostname:
            default: HOSTNAME
            description: Self-hosted Enterprise Server hostname
          protocol:
            default: http
            description: Self-hosted Enterprise Server protocol
      responses:
        '202':
          description: Response
        '401':
          description: Unauthorized
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        category: enterprise-admin
        subcategory: management-console
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  responses:
    not_found:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/basic-error'
    code_scanning_conflict:
      description: Response if there is already a validation run in progress with a different default setup configuration
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/basic-error'
    service_unavailable:
      description: Service unavailable
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: string
              message:
                type: string
              documentation_url:
                type: string
    code_scanning_forbidden_write:
      description: Response if the repository is archived or if GitHub Advanced Security is not enabled for this repository
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/basic-error'
    code_scanning_forbidden_read:
      description: Response if GitHub Advanced Security is not enabled for this repository
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/basic-error'
  schemas:
    code-scanning-default-setup-update-response:
      description: 'You can use `run_url` to track the status of the run. This includes a property status and conclusion.

        You should not rely on this always being an actions workflow run object.'
      type: object
      properties:
        run_id:
          description: ID of the corresponding run.
          type: integer
          example: 42
        run_url:
          description: URL of the corresponding run.
          type: string
          example: https://api.github.com/repos/octocat/Hello-World
    code-scanning-default-setup-update:
      description: Configuration for code scanning default setup.
      type: object
      properties:
        state:
          description: The desired state of code scanning default setup.
          type: string
          enum:
          - configured
          - not-configured
          example: configured
        query_suite:
          description: CodeQL query suite to be used.
          type: string
          enum:
          - default
          - extended
          example: default
      additionalProperties: true
      required:
      - state
    code-scanning-default-setup:
      description: Configuration for code scanning default setup.
      type: object
      properties:
        state:
          description: Code scanning default setup has been configured or not.
          type: string
          enum:
          - configured
          - not-configured
          example: configured
        languages:
          description: Languages to be analyzed.
          type: array
          items:
            type: string
            enum:
            - c-cpp
            - csharp
            - go
            - java-kotlin
            - javascript-typescript
            - javascript
            - python
            - ruby
            - typescript
            - swift
        query_suite:
          description: CodeQL query suite to be used.
          type: string
          enum:
          - default
          - extended
          example: default
        updated_at:
          description: Timestamp of latest configuration update.
          type: string
          format: date-time
          example: '2023-12-06T14:20:20.000Z'
    webhook-config-secret:
      type: string
      description: If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value for [delivery signature headers](https://docs.github.com/enterprise-server@3.9/webhooks/event-payloads/#delivery-headers).
      example: '"********"'
    configuration-status:
      type: object
      properties:
        status:
          type: string
          example: open
        progress:
          type: array
          items:
            type: object
            properties:
              status:
                type: string
              key:
                type: string
            required:
            - status
            - key
    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
    webhook-config-url:
      type: string
      description: The URL to which the payloads will be delivered.
      example: https://example.com/webhook
      format: uri
    empty-object:
      title: Empty Object
      description: An object without any properties.
      type: object
      additionalProperties: false
    webhook-config-insecure-ssl:
      oneOf:
      - type: string
        description: Determines whether the SSL certificate of the host for `url` will be verified when delivering payloads. Supported values include `0` (verification is performed) and `1` (verification is not performed). The default is `0`. **We strongly recommend not setting this to `1` as you are subject to man-in-the-middle and other attacks.**
        example: '"0"'
      - type: number
    webhook-config:
      title: Webhook Configuration
      description: Configuration object of the webhook
      type: object
      properties:
        url:
          $ref: '#/components/schemas/webhook-config-url'
        content_type:
          $ref: '#/components/schemas/webhook-config-content-type'
        secret:
          $ref: '#/components/schemas/webhook-config-secret'
        insecure_ssl:
          $ref: '#/components/schemas/webhook-config-insecure-ssl'
    webhook-config-content-type:
      type: string
      description: The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`.
      example: '"json"'
  parameters:
    owner:
      name: owner
      description: The account owner of the repository. The name is not case sensitive.
      in: path
      required: true
      schema:
        type: string
    hook-id:
      name: hook_id
      description: The unique identifier of the hook. You can find this value in the `X-GitHub-Hook-ID` header of a webhook delivery.
      in: path
      required: true
      schema:
        type: integer
    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
    org:
      name: org
      description: The organization name. The name is not case sensitive.
      in: path
      required: true
      schema:
        type: string
  examples:
    code-scanning-default-setup:
      value:
        state: configured
        languages:
        - ruby
        - python
        query_suite: default
        updated_at: '2023-01-19T11:21:34Z'
    code-scanning-default-setup-update:
      value:
        state: configured
    webhook-config:
      value:
        content_type: json
        insecure_ssl: '0'
        secret: '********'
        url: https://example.com/webhook
    configuration-status:
      value:
        status: running
        progress:
        - status: DONE
          key: Appliance core components
        - status: DONE
          key: GitHub utilities
        - status: DONE
          key: GitHub applications
        - status: CONFIGURING
          key: GitHub services
        - status: PENDING
          key: Reloading appliance services
    code-scanning-default-setup-update-response:
      value:
        run_id: 42
        run_url: https://api.github.com/repos/octoorg/octocat/actions/runs/42
  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 

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