GitHub Roles API

The Roles API from GitHub — 2 operation(s) for roles.

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-roles-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  version: 1.1.4
  title: GitHub Application About Roles 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: Roles
paths:
  /organizations/{organization_id}/custom_roles:
    get:
      summary: GitHub Deprecated - List Custom Repository Roles in an Organization
      description: '**Note**: This operation is deprecated and will be removed in the future.

        Use the "[List custom repository roles](https://docs.github.com/enterprise-server@3.9/rest/orgs/custom-roles#list-custom-repository-roles-in-an-organization)" endpoint instead.


        List the custom repository roles available in this organization. For more information on custom repository roles, see "[About custom repository roles](https://docs.github.com/enterprise-server@3.9/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-repository-roles)."


        The authenticated user must be administrator of the organization or of a repository of the organization to use this endpoint.


        OAuth app tokens and personal access tokens (classic) need the `admin:org` or `repo` scope to use this endpoint.'
      tags:
      - Roles
      operationId: deprecatedListCustomRepositoryRolesInAnOrganization
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/orgs/custom-roles#deprecatedlist-custom-repository-roles-in-an-organization
      parameters:
      - name: organization_id
        description: The unique identifier of the organization.
        in: path
        required: true
        schema:
          type: string
        example: '12345678'
      responses:
        '200':
          description: Response - list of custom role names
          content:
            application/json:
              schema:
                type: object
                properties:
                  total_count:
                    description: The number of custom roles in this organization
                    example: 3
                    type: integer
                  custom_roles:
                    type: array
                    items:
                      $ref: '#/components/schemas/organization-custom-repository-role'
              examples:
                default:
                  $ref: '#/components/examples/organization-custom-repository-role-example'
      x-github:
        githubCloudOnly: true
        enabledForGitHubApps: true
        removalDate: '2025-02-15'
        deprecationDate: '2023-02-15'
        category: orgs
        subcategory: custom-roles
      deprecated: true
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /orgs/{org}/custom-repository-roles:
    get:
      summary: GitHub List Custom Repository Roles in an Organization
      description: 'List the custom repository roles available in this organization. For more information on custom repository roles, see "[About custom repository roles](https://docs.github.com/enterprise-server@3.9/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-repository-roles)."


        The authenticated user must be an administrator of the organization or of a repository of the organization to use this endpoint.


        OAuth app tokens and personal access tokens (classic) need the `admin:org` or `repo` scope to use this endpoint.'
      tags:
      - Roles
      operationId: listCustomRepositoryRolesInAnOrganization
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/orgs/custom-roles#list-custom-repository-roles-in-an-organization
      parameters:
      - $ref: '#/components/parameters/org'
      responses:
        '200':
          description: Response - list of custom role names
          content:
            application/json:
              schema:
                type: object
                properties:
                  total_count:
                    description: The number of custom roles in this organization
                    example: 3
                    type: integer
                  custom_roles:
                    type: array
                    items:
                      $ref: '#/components/schemas/organization-custom-repository-role'
              examples:
                default:
                  $ref: '#/components/examples/organization-custom-repository-role-list-example'
      x-github:
        githubCloudOnly: true
        enabledForGitHubApps: true
        category: orgs
        subcategory: custom-roles
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  examples:
    organization-custom-repository-role-example:
      value:
        id: 8030
        name: Security Engineer
        description: Able to contribute code and maintain the security pipeline
        base_role: maintain
        permissions:
        - delete_alerts_code_scanning
        organization:
          login: github
          id: 1
          node_id: MDEyOk9yZ2FuaXphdGlvbjE=
          url: https://api.github.com/orgs/github
          repos_url: https://api.github.com/orgs/github/repos
          events_url: https://api.github.com/orgs/github/events
          hooks_url: https://api.github.com/orgs/github/hooks
          issues_url: https://api.github.com/orgs/github/issues
          members_url: https://api.github.com/orgs/github/members{/member}
          public_members_url: https://api.github.com/orgs/github/public_members{/member}
          avatar_url: https://github.com/images/error/octocat_happy.gif
          description: A great organization
        created_at: '2022-07-04T22:19:11Z'
        updated_at: '2022-07-04T22:20:11Z'
    organization-custom-repository-role-list-example:
      value:
        total_count: 2
        custom_roles:
        - id: 8030
          name: Security Engineer
          description: Able to contribute code and maintain the security pipeline
          base_role: maintain
          permissions:
          - delete_alerts_code_scanning
          organization:
            login: github
            id: 9919
            node_id: MDEyOk9yZ2FuaXphdGlvbjk5MTk=
            avatar_url: https://avatars.githubusercontent.com/u/9919?v=4
            gravatar_id: ''
            url: https://api.github.com/users/github
            html_url: https://github.com/github
            followers_url: https://api.github.com/users/github/followers
            following_url: https://api.github.com/users/github/following{/other_user}
            gists_url: https://api.github.com/users/github/gists{/gist_id}
            starred_url: https://api.github.com/users/github/starred{/owner}{/repo}
            subscriptions_url: https://api.github.com/users/github/subscriptions
            organizations_url: https://api.github.com/users/github/orgs
            repos_url: https://api.github.com/users/github/repos
            events_url: https://api.github.com/users/github/events{/privacy}
            received_events_url: https://api.github.com/users/github/received_events
            type: Organization
            site_admin: false
          created_at: '2022-07-04T22:19:11Z'
          updated_at: '2022-07-04T22:20:11Z'
        - id: 8031
          name: Community manager
          description: Able to handle all the community interactions without being able to contribute code
          base_role: read
          permissions:
          - mark_as_duplicate
          - manage_settings_pages
          - manage_settings_wiki
          - set_social_preview
          - edit_repo_metadata
          - toggle_discussion_comment_minimize
          organization:
            login: github
            id: 9919
            node_id: MDEyOk9yZ2FuaXphdGlvbjk5MTk=
            avatar_url: https://avatars.githubusercontent.com/u/9919?v=4
            gravatar_id: ''
            url: https://api.github.com/users/github
            html_url: https://github.com/github
            followers_url: https://api.github.com/users/github/followers
            following_url: https://api.github.com/users/github/following{/other_user}
            gists_url: https://api.github.com/users/github/gists{/gist_id}
            starred_url: https://api.github.com/users/github/starred{/owner}{/repo}
            subscriptions_url: https://api.github.com/users/github/subscriptions
            organizations_url: https://api.github.com/users/github/orgs
            repos_url: https://api.github.com/users/github/repos
            events_url: https://api.github.com/users/github/events{/privacy}
            received_events_url: https://api.github.com/users/github/received_events
            type: Organization
            site_admin: false
          created_at: '2022-07-05T12:01:11Z'
          updated_at: '2022-07-05T12:20:11Z'
  schemas:
    simple-user:
      title: Simple User
      description: A GitHub user.
      type: object
      properties:
        name:
          nullable: true
          type: string
          example: octocat
        email:
          nullable: true
          type: string
          example: octocat@github.com
        login:
          type: string
          example: octocat
        id:
          type: integer
          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
          nullable: true
        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
    organization-custom-repository-role:
      title: Organization Custom Repository Role
      description: Custom repository roles created by organization owners
      type: object
      properties:
        id:
          description: The unique identifier of the custom role.
          type: integer
          example: 42
        name:
          description: The name of the custom role.
          type: string
          example: octocat
        description:
          description: A short description about who this role is for or what permissions it grants.
          type: string
          nullable: true
          example: This is an example repository
        base_role:
          type: string
          description: The system role from which this role inherits permissions.
          enum:
          - read
          - triage
          - write
          - maintain
          example: read
        permissions:
          description: A list of additional permissions included in this role.
          type: array
          items:
            type: string
        organization:
          $ref: '#/components/schemas/simple-user'
        created_at:
          type: string
          format: date-time
          example: '2026-04-17T12:00:00Z'
        updated_at:
          type: string
          format: date-time
          example: '2026-04-17T12:00:00Z'
      required:
      - id
      - name
      - base_role
      - permissions
      - organization
      - created_at
      - updated_at
  parameters:
    org:
      name: org
      description: The organization name. The name is not case sensitive.
      in: path
      required: true
      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:
          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-sync
      externalDocs:
        url: https://docs.github.com/enterprise-server@3.9/webhooks/webhook-events-and-payloads#cache_sync
      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-cache-sync'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully
      x-github:
        githubCloudOnly: false
        category: webhooks
        subcategory: cache_sync
        supported-webhook-types:
        - repository
        - organization
        - app
  check-run-completed:
    post:
      summary: 'This event occurs when there is activity relating to a check run. For information about check runs, see "[Getting started with the Checks API](https://docs.github.com/enterprise-server@3.9/rest/guides/getting-started-with-the-checks-api)." For information about the APIs to manage check runs, see [the GraphQL API documentation](https://docs.github.com/enterprise-server@3.9/graphql/reference/objects#checkrun) or "[Check Runs](https://docs.github.com/enterprise-server@3.9/rest/checks/runs)" in the REST API documentation.


        For activity relating to check suites, use the `check-suite` event.


        To subscribe to this event, a GitHub App must have at least read-level access for the "Checks" repository permission. To receive the `rerequested` and `requested_action` event types, the app must have at least write-level access for the "Checks" permission. GitHub Apps with write-level access for the "Checks" permission are automatically subscribed to this webhook event.


        Repository and organization webhooks only receive payloads for the `created` and `completed` event types in repositories.


        **Note**: The API only looks for pushes in the repository where the check run was created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`.'
      description: A check run was completed, and a conclusion is available.
      operationId: check-run/completed
      externalDocs:
        url: https://docs.github.com/enterprise-server@3.9/webhooks/webhook-events-and-payloads#check_run
      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-check-run-completed'
            examples:
              default:
                $ref: '#/components/examples/check-run-completed'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/webhook-check-run-completed-form-encoded'
            examples:
              default:
                $ref: '#/components/examples/check-run-completed-form-encoded'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: webhooks
        subcategory: check_run
        supported-webhook-types:
        - repository
        - organization
        - app
  check-run-created:
    post:
      summary: 'This event occurs when there is activity relating to a check run. For information about check runs, see "[Getting started with the Checks API](https://docs.github.com/enterprise-server@3.9/rest/guides/getting-started-with-the-checks-api)." For information about the APIs to manage check runs, see [the GraphQL API documentation](https://docs.github.com/enterprise-server@3.9/graphql/reference/objects#checkrun) or "[Check Runs](https://docs.github.com/enterprise-server@3.9/rest/checks/runs)" in the REST API documentation.


        For activity relating to check suites, use the `check-suite` event.


        To subscribe to this event, a GitHub App must have at least read-level access for the "Checks" repository permission. To receive the `rerequested` and `requested_action` event types, the app must have at least write-level access for the "Checks" permission. GitHub Apps with write-level access for the "Checks" permission are automatically subscribed to this webhook event.


        Repository and organization webhooks only receive payloads for the `created` and `completed` event types in repositories.


        **Note**: The API only looks for pushes in the repository where the check run was created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`.'
      description: A new check run was created.
      operationId: check-run/created
      externalDocs:
        url: https://docs.github.com/enterprise-server@3.9/webhooks/webhook-events-and-payloads#check_run
      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-check-run-created'
            examples:
              default:
                $ref: '#/components/examples/check-run-created'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/webhook-check-run-created-form-encoded'
            examples:
              default:
                $ref: '#/components/examples/check-run-created-form-encoded'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: webhooks
        subcategory: check_run
        supported-webhook-types:
        - repository
        - organization
        - app
  check-run-requested-action:
    post:
      summary: 'This event occurs when there is activity relating to a check run. For information about check runs, see "[Getting started with the Checks API](https://docs.github.com/enterprise-server@3.9/rest/guides/getting-started-with-the-checks-api)." For information about the APIs to manage check runs, see [the GraphQL API documentation](https://docs.github.com/enterprise-server@3.9/graphql/reference/objects#checkrun) or "[Check Runs](https://docs.github.com/enterprise-server@3.9/rest/checks/runs)

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