GitHub Milestones API

The Milestones API from GitHub — 3 operation(s) for milestones.

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-milestones-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  version: 1.1.4
  title: GitHub Application About Milestones 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: Milestones
paths:
  /repos/{owner}/{repo}/milestones:
    get:
      summary: GitHub List Milestones
      description: Lists milestones for a repository.
      tags:
      - Milestones
      operationId: listMilestones
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/issues/milestones#list-milestones
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - name: state
        description: The state of the milestone. Either `open`, `closed`, or `all`.
        in: query
        required: false
        schema:
          type: string
          enum:
          - open
          - closed
          - all
          default: open
        example: open
      - name: sort
        description: What to sort results by. Either `due_on` or `completeness`.
        in: query
        required: false
        schema:
          type: string
          enum:
          - due_on
          - completeness
          default: due_on
        example: due_on
      - name: direction
        description: The direction of the sort. Either `asc` or `desc`.
        in: query
        required: false
        schema:
          type: string
          enum:
          - asc
          - desc
          default: asc
        example: asc
      - $ref: '#/components/parameters/per-page'
      - $ref: '#/components/parameters/page'
      - 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:
                type: array
                items:
                  $ref: '#/components/schemas/milestone'
              examples:
                default:
                  $ref: '#/components/examples/milestone-items'
          headers:
            Link:
              $ref: '#/components/headers/link'
        '404':
          $ref: '#/components/responses/not_found'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: issues
        subcategory: milestones
      x-api-evangelist-certified: '2025-07-16'
      x-api-naftiko-published: '2025-07-25'
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    post:
      summary: GitHub Create Milestone
      description: Creates a milestone.
      tags:
      - Milestones
      operationId: createMilestone
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/issues/milestones#create-a-milestone
      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:
                title:
                  type: string
                  description: The title of the milestone.
                state:
                  type: string
                  description: The state of the milestone. Either `open` or `closed`.
                  enum:
                  - open
                  - closed
                  default: open
                description:
                  type: string
                  description: description of the milestone.
                due_on:
                  type: string
                  format: date-time
                  description: 'The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.'
              required:
              - title
            examples:
              default:
                value:
                  title: v1.0
                  state: open
                  description: Tracking milestone for version 1.0
                  due_on: '2012-10-09T23:39:01Z'
      responses:
        '201':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/milestone'
              examples:
                default:
                  $ref: '#/components/examples/milestone'
          headers:
            Location:
              example: https://api.github.com/repos/octocat/Hello-World/milestones/1
              schema:
                type: string
        '404':
          $ref: '#/components/responses/not_found'
        '422':
          $ref: '#/components/responses/validation_failed'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: issues
        subcategory: milestones
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /repos/{owner}/{repo}/milestones/{milestone_number}:
    get:
      summary: GitHub Get Milestone
      description: Gets a milestone using the given milestone number.
      tags:
      - Milestones
      operationId: getMilestone
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/issues/milestones#get-a-milestone
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - $ref: '#/components/parameters/milestone-number'
      - 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/milestone'
              examples:
                default:
                  $ref: '#/components/examples/milestone'
        '404':
          $ref: '#/components/responses/not_found'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: issues
        subcategory: milestones
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    patch:
      summary: GitHub Update Milestone
      description: The Update Milestone operation in the GitHub Repos API allows you to modify an existing milestone within a repository by sending a PATCH request to /repos/{owner}/{repo}/milestones/{milestone_number}. This endpoint enables you to update various milestone properties such as the title, state (open or closed), description, and due date. You must specify the repository owner, repository name, and milestone number in the URL path, while the fields you wish to update are provided in the request body as JSON. This operation requires appropriate authentication and write permissions to the repository, and it returns the updated milestone object upon successful execution, making it useful for project management tasks like adjusting deadlines, renaming milestones, or closing completed milestones.
      tags:
      - Milestones
      operationId: updateMilestone
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/issues/milestones#update-a-milestone
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - $ref: '#/components/parameters/milestone-number'
      - 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
              properties:
                title:
                  type: string
                  description: The title of the milestone.
                state:
                  type: string
                  description: The state of the milestone. Either `open` or `closed`.
                  enum:
                  - open
                  - closed
                  default: open
                description:
                  type: string
                  description: description of the milestone.
                due_on:
                  type: string
                  format: date-time
                  description: 'The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.'
            examples:
              default:
                value:
                  title: v1.0
                  state: open
                  description: Tracking milestone for version 1.0
                  due_on: '2012-10-09T23:39:01Z'
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/milestone'
              examples:
                default:
                  $ref: '#/components/examples/milestone'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: issues
        subcategory: milestones
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    delete:
      summary: GitHub Delete Milestone
      description: Deletes a milestone using the given milestone number.
      tags:
      - Milestones
      operationId: deleteMilestone
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/issues/milestones#delete-a-milestone
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - $ref: '#/components/parameters/milestone-number'
      - 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'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: issues
        subcategory: milestones
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /repos/{owner}/{repo}/milestones/{milestone_number}/labels:
    get:
      summary: GitHub List Labels for Issues in Milestone
      description: Lists labels for issues in a milestone.
      tags:
      - Milestones
      operationId: listLabelsForIssuesInMilestone
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/issues/labels#list-labels-for-issues-in-a-milestone
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - $ref: '#/components/parameters/milestone-number'
      - $ref: '#/components/parameters/per-page'
      - $ref: '#/components/parameters/page'
      - 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:
                type: array
                items:
                  $ref: '#/components/schemas/label'
              examples:
                default:
                  $ref: '#/components/examples/label-items'
          headers:
            Link:
              $ref: '#/components/headers/link'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: issues
        subcategory: labels
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  schemas:
    nullable-simple-user:
      title: Simple User
      description: GitHub user.
      type: object
      properties:
        name:
          type: string
          example: octocat
        email:
          type: string
          example: octocat@github.com
        login:
          type: string
          example: octocat
        id:
          type: integer
          format: int64
          example: 1
        node_id:
          type: string
          example: MDQ6VXNlcjE=
        avatar_url:
          type: string
          format: uri
          example: https://github.com/images/error/octocat_happy.gif
        gravatar_id:
          type: string
          example: 41d064eb2195891e12d0413f63227ea7
        url:
          type: string
          format: uri
          example: https://api.github.com/users/octocat
        html_url:
          type: string
          format: uri
          example: https://github.com/octocat
        followers_url:
          type: string
          format: uri
          example: https://api.github.com/users/octocat/followers
        following_url:
          type: string
          example: https://api.github.com/users/octocat/following{/other_user}
        gists_url:
          type: string
          example: https://api.github.com/users/octocat/gists{/gist_id}
        starred_url:
          type: string
          example: https://api.github.com/users/octocat/starred{/owner}{/repo}
        subscriptions_url:
          type: string
          format: uri
          example: https://api.github.com/users/octocat/subscriptions
        organizations_url:
          type: string
          format: uri
          example: https://api.github.com/users/octocat/orgs
        repos_url:
          type: string
          format: uri
          example: https://api.github.com/users/octocat/repos
        events_url:
          type: string
          example: https://api.github.com/users/octocat/events{/privacy}
        received_events_url:
          type: string
          format: uri
          example: https://api.github.com/users/octocat/received_events
        type:
          type: string
          example: User
        site_admin:
          type: boolean
          example: true
        starred_at:
          type: string
          example: '"2020-07-09T00:17:55Z"'
      required:
      - avatar_url
      - events_url
      - followers_url
      - following_url
      - gists_url
      - gravatar_id
      - html_url
      - id
      - node_id
      - login
      - organizations_url
      - received_events_url
      - repos_url
      - site_admin
      - starred_url
      - subscriptions_url
      - type
      - url
    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
    milestone:
      title: Milestone
      description: collection of related issues and pull requests.
      type: object
      properties:
        url:
          type: string
          format: uri
          example: https://api.github.com/repos/octocat/Hello-World/milestones/1
        html_url:
          type: string
          format: uri
          example: https://github.com/octocat/Hello-World/milestones/v1.0
        labels_url:
          type: string
          format: uri
          example: https://api.github.com/repos/octocat/Hello-World/milestones/1/labels
        id:
          type: integer
          example: 1002604
        node_id:
          type: string
          example: MDk6TWlsZXN0b25lMTAwMjYwNA==
        number:
          description: The number of the milestone.
          type: integer
          example: 42
        state:
          description: The state of the milestone.
          example: open
          type: string
          enum:
          - open
          - closed
          default: open
        title:
          description: The title of the milestone.
          example: v1.0
          type: string
        description:
          type: string
          example: Tracking milestone for version 1.0
        creator:
          $ref: '#/components/schemas/nullable-simple-user'
        open_issues:
          type: integer
          example: 4
        closed_issues:
          type: integer
          example: 8
        created_at:
          type: string
          format: date-time
          example: '2011-04-10T20:09:31Z'
        updated_at:
          type: string
          format: date-time
          example: '2014-03-03T18:58:10Z'
        closed_at:
          type: string
          format: date-time
          example: '2013-02-12T13:22:01Z'
        due_on:
          type: string
          format: date-time
          example: '2012-10-09T23:39:01Z'
      required:
      - closed_issues
      - creator
      - description
      - due_on
      - closed_at
      - id
      - node_id
      - labels_url
      - html_url
      - number
      - open_issues
      - state
      - title
      - url
      - created_at
      - updated_at
    label:
      title: Label
      description: Color-coded labels help you categorize and filter your issues (just like labels in Gmail).
      type: object
      properties:
        id:
          type: integer
          format: int64
          example: 208045946
        node_id:
          type: string
          example: MDU6TGFiZWwyMDgwNDU5NDY=
        url:
          description: URL for the label
          example: https://api.github.com/repositories/42/labels/bug
          type: string
          format: uri
        name:
          description: The name of the label.
          example: bug
          type: string
        description:
          type: string
          example: Something isn't working
        color:
          description: '6-character hex code, without the leading #, identifying the color'
          example: FFFFFF
          type: string
        default:
          type: boolean
          example: true
      required:
      - id
      - node_id
      - url
      - name
      - description
      - color
      - default
    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
  parameters:
    milestone-number:
      name: milestone_number
      description: The number that identifies the milestone.
      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
    owner:
      name: owner
      description: The account owner of the repository. The name is not case sensitive.
      in: path
      required: true
      schema:
        type: string
    per-page:
      name: per_page
      description: The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-server@3.9/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
      in: query
      schema:
        type: integer
        default: 30
    page:
      name: page
      description: The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-server@3.9/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
      in: query
      schema:
        type: integer
        default: 1
  responses:
    not_found:
      description: Resource not found
      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'
  examples:
    label-items:
      value:
      - id: 208045946
        node_id: MDU6TGFiZWwyMDgwNDU5NDY=
        url: https://api.github.com/repos/octocat/Hello-World/labels/bug
        name: bug
        description: Something isn't working
        color: f29513
        default: true
      - id: 208045947
        node_id: MDU6TGFiZWwyMDgwNDU5NDc=
        url: https://api.github.com/repos/octocat/Hello-World/labels/enhancement
        name: enhancement
        description: New feature or request
        color: a2eeef
        default: false
    milestone:
      value:
        url: https://api.github.com/repos/octocat/Hello-World/milestones/1
        html_url: https://github.com/octocat/Hello-World/milestones/v1.0
        labels_url: https://api.github.com/repos/octocat/Hello-World/milestones/1/labels
        id: 1002604
        node_id: MDk6TWlsZXN0b25lMTAwMjYwNA==
        number: 1
        state: open
        title: v1.0
        description: Tracking milestone for version 1.0
        creator:
          login: octocat
          id: 1
          node_id: MDQ6VXNlcjE=
          avatar_url: https://github.com/images/error/octocat_happy.gif
          gravatar_id: ''
          url: https://api.github.com/users/octocat
          html_url: https://github.com/octocat
          followers_url: https://api.github.com/users/octocat/followers
          following_url: https://api.github.com/users/octocat/following{/other_user}
          gists_url: https://api.github.com/users/octocat/gists{/gist_id}
          starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo}
          subscriptions_url: https://api.github.com/users/octocat/subscriptions
          organizations_url: https://api.github.com/users/octocat/orgs
          repos_url: https://api.github.com/users/octocat/repos
          events_url: https://api.github.com/users/octocat/events{/privacy}
          received_events_url: https://api.github.com/users/octocat/received_events
          type: User
          site_admin: false
        open_issues: 4
        closed_issues: 8
        created_at: '2011-04-10T20:09:31Z'
        updated_at: '2014-03-03T18:58:10Z'
        closed_at: '2013-02-12T13:22:01Z'
        due_on: '2012-10-09T23:39:01Z'
    milestone-items:
      value:
      - url: https://api.github.com/repos/octocat/Hello-World/milestones/1
        html_url: https://github.com/octocat/Hello-World/milestones/v1.0
        labels_url: https://api.github.com/repos/octocat/Hello-World/milestones/1/labels
        id: 1002604
        node_id: MDk6TWlsZXN0b25lMTAwMjYwNA==
        number: 1
        state: open
        title: v1.0
        description: Tracking milestone for version 1.0
        creator:
          login: octocat
          id: 1
          node_id: MDQ6VXNlcjE=
          avatar_url: https://github.com/images/error/octocat_happy.gif
          gravatar_id: ''
          url: https://api.github.com/users/octocat
          html_url: https://github.com/octocat
          followers_url: https://api.github.com/users/octocat/followers
          following_url: https://api.github.com/users/octocat/following{/other_user}
          gists_url: https://api.github.com/users/octocat/gists{/gist_id}
          starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo}
          subscriptions_url: https://api.github.com/users/octocat/subscriptions
          organizations_url: https://api.github.com/users/octocat/orgs
          repos_url: https://api.github.com/users/octocat/repos
          events_url: https://api.github.com/users/octocat/events{/privacy}
          received_events_url: https://api.github.com/users/octocat/received_events
          type: User
          site_admin: false
        open_issues: 4
        closed_issues: 8
        created_at: '2011-04-10T20:09:31Z'
        updated_at: '2014-03-03T18:58:10Z'
        closed_at: '2013-02-12T13:22:01Z'
        due_on: '2012-10-09T23:39:01Z'
  headers:
    link:
      example: <https://api.github.com/resource?page=2>; rel="next", <https://api.github.com/resource?page=5>; rel="last"
      schema:
        type: string
  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:
 

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