openapi: 3.1.0 info: version: 1.1.4 title: github-repo-hooks-api description: |- Use the REST API to create, manage and control the workflow of public and private GitHub repositories. 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 servers: - url: '{protocol}://{hostname}' variables: hostname: description: Self-hosted Enterprise Server hostname default: api.github.com protocol: description: Self-hosted Enterprise Server protocol default: https externalDocs: description: GitHub Enterprise Developer Docs url: https://docs.github.com/enterprise-server@3.9/rest/ tags: - name: Configuration - name: Create - name: Delete - name: Deliveries - name: Enforcement - name: Get - name: Hook - name: Hooks - name: Lists - name: Ping - name: Pre-Receive - name: Push - name: Re-Deliver - name: Remove - name: Repositories description: Source control repositories. - name: Tests - name: Update - name: Webhooks paths: /repos/{owner}/{repo}/hooks: get: summary: GitHub List Repository Webhooks description: |- Lists webhooks for a repository. `last response` may return null if there have not been any deliveries within 30 days. tags: - Lists - Repositories - Webhooks operationId: listRepositoryWebhooks externalDocs: description: API method documentation url: |- https://docs.github.com/enterprise-server@3.9/rest/repos/webhooks#list-repository-webhooks parameters: - $ref: '#/components/parameters/owner' - $ref: '#/components/parameters/repo' - $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/hook' examples: default: $ref: '#/components/examples/hook-items' headers: Link: $ref: '#/components/headers/link' '404': $ref: '#/components/responses/not_found' x-github: githubCloudOnly: false enabledForGitHubApps: true category: repos subcategory: webhooks 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 Repository Webhook description: |- Repositories can have multiple webhooks installed. Each webhook should have a unique `config`. Multiple webhooks can share the same `config` as long as those webhooks do not have any `events` that overlap. tags: - Create - Repositories - Webhooks operationId: createRepositoryWebhook externalDocs: description: API method documentation url: |- https://docs.github.com/enterprise-server@3.9/rest/repos/webhooks#create-a-repository-webhook 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: false content: application/json: schema: type: object properties: name: type: string description: |- Use `web` to create a webhook. Default: `web`. This parameter only accepts the value `web`. config: type: object description: Key/value pairs to provide settings for this webhook. 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' events: type: array description: |- Determines what [events](https://docs.github.com/enterprise-server@3.9/webhooks/event-payloads) the hook is triggered for. default: - push items: type: string active: type: boolean description: |- Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. default: true additionalProperties: false examples: default: value: name: web active: true events: - push - pull_request config: url: https://example.com/webhook content_type: json insecure_ssl: '0' responses: '201': description: Response content: application/json: schema: $ref: '#/components/schemas/hook' examples: default: $ref: '#/components/examples/hook' headers: Location: example: https://api.github.com/repos/octocat/Hello-World/hooks/12345678 schema: type: string '403': $ref: '#/components/responses/forbidden' '404': $ref: '#/components/responses/not_found' '422': $ref: '#/components/responses/validation_failed' x-github: githubCloudOnly: false enabledForGitHubApps: true category: repos subcategory: webhooks security: - bearerHttpAuthentication: [] x-microcks-operation: delay: 0 dispatcher: FALLBACK /repos/{owner}/{repo}/hooks/{hook_id}: get: summary: GitHub Get Repository Webhook description: |- Returns a webhook configured in a repository. To get only the webhook `config` properties, see "[Get webhook configuration for a repository](/rest/webhooks/repo-config#get-a-webhook-configuration-for-a-repository)." tags: - Get - Repositories - Webhooks operationId: getRepositoryWebhook externalDocs: description: API method documentation url: |- https://docs.github.com/enterprise-server@3.9/rest/repos/webhooks#get-a-repository-webhook 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/hook' examples: default: $ref: '#/components/examples/hook' '404': $ref: '#/components/responses/not_found' x-github: githubCloudOnly: false enabledForGitHubApps: true category: repos subcategory: webhooks security: - bearerHttpAuthentication: [] x-microcks-operation: delay: 0 dispatcher: FALLBACK patch: summary: GitHub Update Repository Webhook description: |- Updates a webhook configured in a repository. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for a repository](/rest/webhooks/repo-config#update-a-webhook-configuration-for-a-repository)." tags: - Repositories - Update - Webhooks operationId: updateRepositoryWebhook externalDocs: description: API method documentation url: |- https://docs.github.com/enterprise-server@3.9/rest/repos/webhooks#update-a-repository-webhook 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: true content: application/json: schema: type: object properties: config: $ref: '#/components/schemas/webhook-config' events: type: array description: |- Determines what [events](https://docs.github.com/enterprise-server@3.9/webhooks/event-payloads) the hook is triggered for. This replaces the entire array of events. default: - push items: type: string add_events: type: array description: |- Determines a list of events to be added to the list of events that the Hook triggers for. items: type: string remove_events: type: array description: |- Determines a list of events to be removed from the list of events that the Hook triggers for. items: type: string active: type: boolean description: |- Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. default: true examples: default: value: active: true add_events: - pull_request responses: '200': description: Response content: application/json: schema: $ref: '#/components/schemas/hook' examples: default: $ref: '#/components/examples/hook' '404': $ref: '#/components/responses/not_found' '422': $ref: '#/components/responses/validation_failed' x-github: githubCloudOnly: false enabledForGitHubApps: true category: repos subcategory: webhooks security: - bearerHttpAuthentication: [] x-microcks-operation: delay: 0 dispatcher: FALLBACK delete: summary: GitHub Delete Repository Webhook description: |- This API operation deletes a specific webhook from a GitHub repository by sending a DELETE request to the endpoint /repos/{owner}/{repo}/hooks/{hook_id}. The operation requires three path parameters: the repository owner's username, the repository name, and the unique identifier of the webhook to be removed. Upon successful execution, the webhook is permanently deleted from the repository, meaning it will no longer receive or trigger events for that repository. This operation typically requires appropriate authentication and repository admin permissions to execute, and it returns a 204 No Content status code when the deletion is successful. tags: - Delete - Repositories - Webhooks operationId: deleteRepositoryWebhook externalDocs: description: API method documentation url: |- https://docs.github.com/enterprise-server@3.9/rest/repos/webhooks#delete-a-repository-webhook 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: '204': description: Response '404': $ref: '#/components/responses/not_found' x-github: githubCloudOnly: false enabledForGitHubApps: true category: repos subcategory: webhooks 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 - Get - Repositories - Webhooks 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 - Repositories - Update - Webhooks 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 /repos/{owner}/{repo}/hooks/{hook_id}/deliveries: get: summary: GitHub List Deliveries for Repository Webhook description: |- Returns a list of webhook deliveries for a webhook configured in a repository. tags: - Deliveries - Lists - Repositories - Webhooks operationId: listDeliveriesForRepositoryWebhook externalDocs: description: API method documentation url: |- https://docs.github.com/enterprise-server@3.9/rest/repos/webhooks#list-deliveries-for-a-repository-webhook parameters: - $ref: '#/components/parameters/owner' - $ref: '#/components/parameters/repo' - $ref: '#/components/parameters/hook-id' - $ref: '#/components/parameters/per-page' - $ref: '#/components/parameters/cursor' - name: redelivery in: query required: false schema: type: boolean example: true - 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/hook-delivery-item' examples: default: $ref: '#/components/examples/hook-delivery-items' '400': $ref: '#/components/responses/bad_request' '422': $ref: '#/components/responses/validation_failed' x-github: githubCloudOnly: false enabledForGitHubApps: true category: repos subcategory: webhooks security: - bearerHttpAuthentication: [] x-microcks-operation: delay: 0 dispatcher: FALLBACK /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}: get: summary: GitHub Get Delivery for Repository Webhook description: Returns a delivery for a webhook configured in a repository. tags: - Deliveries - Get - Repositories - Webhooks operationId: getDeliveryForRepositoryWebhook externalDocs: description: API method documentation url: |- https://docs.github.com/enterprise-server@3.9/rest/repos/webhooks#get-a-delivery-for-a-repository-webhook parameters: - $ref: '#/components/parameters/owner' - $ref: '#/components/parameters/repo' - $ref: '#/components/parameters/hook-id' - $ref: '#/components/parameters/delivery-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/hook-delivery' examples: default: $ref: '#/components/examples/hook-delivery' '400': $ref: '#/components/responses/bad_request' '422': $ref: '#/components/responses/validation_failed' x-github: githubCloudOnly: false enabledForGitHubApps: true category: repos subcategory: webhooks security: - bearerHttpAuthentication: [] x-microcks-operation: delay: 0 dispatcher: FALLBACK /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts: post: summary: GitHub Redeliver Delivery for Repository Webhook description: Redeliver a webhook delivery for a webhook configured in a repository. tags: - Deliveries - Re-Deliver - Repositories - Webhooks operationId: redeliverDeliveryForRepositoryWebhook externalDocs: description: API method documentation url: |- https://docs.github.com/enterprise-server@3.9/rest/repos/webhooks#redeliver-a-delivery-for-a-repository-webhook parameters: - $ref: '#/components/parameters/owner' - $ref: '#/components/parameters/repo' - $ref: '#/components/parameters/hook-id' - $ref: '#/components/parameters/delivery-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: '202': $ref: '#/components/responses/accepted' '400': $ref: '#/components/responses/bad_request' '422': $ref: '#/components/responses/validation_failed' x-github: githubCloudOnly: false enabledForGitHubApps: true category: repos subcategory: webhooks security: - bearerHttpAuthentication: [] x-microcks-operation: delay: 0 dispatcher: FALLBACK /repos/{owner}/{repo}/hooks/{hook_id}/pings: post: summary: GitHub Ping Repository Webhook description: |- This will trigger a [ping event](https://docs.github.com/enterprise-server@3.9/webhooks/#ping-event) to be sent to the hook. tags: - Ping - Repositories - Webhooks operationId: pingRepositoryWebhook externalDocs: description: API method documentation url: |- https://docs.github.com/enterprise-server@3.9/rest/repos/webhooks#ping-a-repository-webhook 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: '204': description: Response '404': $ref: '#/components/responses/not_found' x-github: githubCloudOnly: false enabledForGitHubApps: true category: repos subcategory: webhooks security: - bearerHttpAuthentication: [] x-microcks-operation: delay: 0 dispatcher: FALLBACK /repos/{owner}/{repo}/hooks/{hook_id}/tests: post: summary: GitHub Test the Push Repository Webhook description: |- This will trigger the hook with the latest push to the current repository if the hook is subscribed to `push` events. If the hook is not subscribed to `push` events, the server will respond with 204 but no test POST will be generated. **Note**: Previously `/repos/:owner/:repo/hooks/:hook_id/test` tags: - Push - Repositories - Tests - Webhooks operationId: testThePushRepositoryWebhook externalDocs: description: API method documentation url: |- https://docs.github.com/enterprise-server@3.9/rest/repos/webhooks#test-the-push-repository-webhook 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: '204': description: Response '404': $ref: '#/components/responses/not_found' x-github: githubCloudOnly: false enabledForGitHubApps: true category: repos subcategory: webhooks security: - bearerHttpAuthentication: [] x-microcks-operation: delay: 0 dispatcher: FALLBACK /repos/{owner}/{repo}/pre-receive-hooks: get: summary: GitHub List Pre-receive Hooks for Repository description: |- List all pre-receive hooks that are enabled or testing for this repository as well as any disabled hooks that are allowed to be enabled at the repository level. Pre-receive hooks that are disabled at a higher level and are not configurable will not be listed. operationId: listPrereceiveHooksForRepository tags: - Hooks - Lists - Pre-Receive - Repositories externalDocs: description: API method documentation url: |- https://docs.github.com/enterprise-server@3.9/rest/enterprise-admin/repo-pre-receive-hooks#list-pre-receive-hooks-for-a-repository parameters: - $ref: '#/components/parameters/owner' - $ref: '#/components/parameters/repo' - $ref: '#/components/parameters/per-page' - $ref: '#/components/parameters/page' - $ref: '#/components/parameters/direction' - name: sort in: query required: false schema: type: string enum: - created - updated - name default: created example: created - 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/repository-pre-receive-hook' examples: default: $ref: '#/components/examples/repository-pre-receive-hook-items' x-github: githubCloudOnly: false enabledForGitHubApps: true category: enterprise-admin subcategory: repo-pre-receive-hooks security: - bearerHttpAuthentication: [] x-microcks-operation: delay: 0 dispatcher: FALLBACK /repos/{owner}/{repo}/pre-receive-hooks/{pre_receive_hook_id}: get: summary: GitHub Get Pre-receive Hook for Repository description: |- This API endpoint retrieves detailed information about a specific pre-receive hook configured for a GitHub repository. Pre-receive hooks are scripts that run on the GitHub server before code is accepted into a repository, allowing administrators to enforce quality standards or policies. By providing the repository owner, repository name, and the pre-receive hook ID in the URL path, this GET operation returns comprehensive details about that particular hook, including its configuration, enforcement level, and current status within the specified repository. operationId: getPrereceiveHookForRepository tags: - Get - Hook - Pre-Receive - Repositories externalDocs: description: API method documentation url: |- https://docs.github.com/enterprise-server@3.9/rest/enterprise-admin/repo-pre-receive-hooks#get-a-pre-receive-hook-for-a-repository parameters: - $ref: '#/components/parameters/owner' - $ref: '#/components/parameters/repo' - $ref: '#/components/parameters/pre-receive-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/repository-pre-receive-hook' examples: default: $ref: '#/components/examples/repository-pre-receive-hook' x-github: githubCloudOnly: false enabledForGitHubApps: true category: enterprise-admin subcategory: repo-pre-receive-hooks security: - bearerHttpAuthentication: [] x-microcks-operation: delay: 0 dispatcher: FALLBACK patch: summary: GitHub Update Pre-receive Hook Enforcement for Repository description: |- For pre-receive hooks which are allowed to be configured at the repo level, you can set `enforcement` operationId: updatePrereceiveHookEnforcementForRepository tags: - Enforcement - Hook - Pre-Receive - Repositories - Update externalDocs: description: API method documentation url: |- https://docs.github.com/enterprise-server@3.9/rest/enterprise-admin/repo-pre-receive-hooks#update-pre-receive-hook-enforcement-for-a-repository parameters: - $ref: '#/components/parameters/owner' - $ref: '#/components/parameters/repo' - $ref: '#/components/parameters/pre-receive-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/repository-pre-receive-hook' examples: default: $ref: '#/components/examples/repository-pre-receive-hook-2' requestBody: required: false content: application/json: schema: type: object properties: enforcement: description: The state of enforcement for the hook on this repository. type: string enum: - enabled - disabled - testing examples: default: value: enforcement: enabled x-github: githubCloudOnly: false enabledForGitHubApps: true category: enterprise-admin subcategory: repo-pre-receive-hooks security: - bearerHttpAuthentication: [] x-microcks-operation: delay: 0 dispatcher: FALLBACK delete: summary: GitHub Remove Pre-receive Hook Enforcement for Repository description: |- Deletes any overridden enforcement on this repository for the specified hook. Responds with effective values inherited from owner and/or global level. operationId: removePrereceiveHookEnforcementForRepository tags: - Enforcement - Hook - Pre-Receive - Remove - Repositories externalDocs: description: API method documentation url: |- https://docs.github.com/enterprise-server@3.9/rest/enterprise-admin/repo-pre-receive-hooks#remove-pre-receive-hook-enforcement-for-a-repository parameters: - $ref: '#/components/parameters/owner' - $ref: '#/components/parameters/repo' - $ref: '#/components/parameters/pre-receive-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: |- Responds with effective values inherited from owner and/or global level. content: application/json: schema: $ref: '#/components/schemas/repository-pre-receive-hook' examples: default: $ref: '#/components/examples/repository-pre-receive-hook' x-github: githubCloudOnly: false enabledForGitHubApps: true category: enterprise-admin subcategory: repo-pre-receive-hooks security: - bearerHttpAuthentication: [] x-microcks-operation: delay: 0 dispatcher: FALLBACK components: schemas: basic-error: title: Basic Error description: Basic Error type: object properties: message: type: string example: Example body text documentation_url: type: string example: https://api.github.com/repos/octocat/Hello-World url: type: string example: https://api.github.com/repos/octocat/Hello-World status: type: string example: open webhook-config-url: type: string description: The URL to which the payloads will be delivered. example: https://example.com/webhook format: uri 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"' 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: '"********"' 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' hook-delivery-item: title: Simple webhook delivery description: Delivery made by a webhook, without request and response information. type: object properties: id: description: Unique identifier of the webhook delivery. type: integer example: 42 guid: description: |- Unique identifier for the event (shared with all deliveries for all webhooks that subscribe to this event). type: string example: 58474f00-b361-11eb-836d-0e4f3503ccbe delivered_at: description: Time when the webhook delivery occurred. type: string format: date-time example: '2021-05-12T20:33:44Z' redelivery: description: Whether the webhook delivery is a redelivery. type: boolean example: false duration: description: Time spent delivering. type: number example: 0.03 status: description: Describes the response returned after attempting the delivery. type: string example: failed to connect status_code: description: Status code received when delivery was made. type: integer example: 502 event: description: The event that triggered the delivery. type: string example: issues action: description: The type of activity for the event that triggered the delivery. type: string example: opened installation_id: description: The id of the GitHub App installation associated with this event. type: integer example: 123 repository_id: description: The id of the repository associated with this event. type: integer example: 123 throttled_at: description: Time when the webhook delivery was throttled. type: string format: date-time example: '2021-05-12T20:33:44Z' required: - id - guid - delivered_at - redelivery - duration - status - status_code - event - action - installation_id - repository_id scim-error: title: Scim Error description: Scim Error type: object properties: message: type: string example: Example body text documentation_url: type: string example: https://api.github.com/repos/octocat/Hello-World detail: type: string example: example_value status: type: integer example: 42 scimType: type: string example: User schemas: type: array items: type: string 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 hook-delivery: title: Webhook delivery description: Delivery made by a webhook. type: object properties: id: description: Unique identifier of the delivery. type: integer example: 42 guid: description: |- Unique identifier for the event (shared with all deliveries for all webhooks that subscribe to this event). type: string example: 58474f00-b361-11eb-836d-0e4f3503ccbe delivered_at: description: Time when the delivery was delivered. type: string format: date-time example: '2021-05-12T20:33:44Z' redelivery: description: Whether the delivery is a redelivery. type: boolean example: false duration: description: Time spent delivering. type: number example: 0.03 status: description: Description of the status of the attempted delivery type: string example: failed to connect status_code: description: Status code received when delivery was made. type: integer example: 502 event: description: The event that triggered the delivery. type: string example: issues action: description: The type of activity for the event that triggered the delivery. type: string example: opened installation_id: description: The id of the GitHub App installation associated with this event. type: integer example: 123 repository_id: description: The id of the repository associated with this event. type: integer example: 123 throttled_at: description: Time when the webhook delivery was throttled. type: string format: date-time example: '2021-05-12T20:33:44Z' url: description: The URL target of the delivery. type: string example: https://www.example.com request: type: object properties: headers: description: The request headers sent with the webhook delivery. type: object additionalProperties: true payload: description: The webhook payload. type: object additionalProperties: true required: - headers - payload response: type: object properties: headers: description: The response headers received when the delivery was made. type: object additionalProperties: true payload: description: The response payload received. type: string additionalProperties: true required: - headers - payload required: - id - guid - delivered_at - redelivery - duration - status - status_code - event - action - installation_id - repository_id - request - response hook-response: title: Hook Response type: object properties: code: type: integer example: 42 status: type: string example: open message: type: string example: Example body text required: - code - status - message hook: title: Webhook description: Webhooks for repositories. type: object properties: type: type: string example: User id: description: Unique identifier of the webhook. example: 42 type: integer name: description: The name of a valid service, use 'web' for a webhook. example: web type: string active: description: Determines whether the hook is actually triggered on pushes. type: boolean example: true events: description: 'Determines what events the hook is triggered for. Default: [''push''].' type: array items: type: string example: - push - pull_request config: $ref: '#/components/schemas/webhook-config' updated_at: type: string format: date-time example: '2011-09-06T20:39:23Z' created_at: type: string format: date-time example: '2011-09-06T17:26:27Z' url: type: string format: uri example: https://api.github.com/repos/octocat/Hello-World/hooks/1 test_url: type: string format: uri example: https://api.github.com/repos/octocat/Hello-World/hooks/1/test ping_url: type: string format: uri example: https://api.github.com/repos/octocat/Hello-World/hooks/1/pings deliveries_url: type: string format: uri example: https://api.github.com/repos/octocat/Hello-World/hooks/1/deliveries last_response: $ref: '#/components/schemas/hook-response' required: - id - url - type - name - active - events - config - ping_url - created_at - updated_at - last_response - test_url repository-pre-receive-hook: type: object properties: id: type: integer example: 42 name: type: string example: octocat enforcement: type: string example: example_value configuration_url: type: string example: https://api.github.com/repos/octocat/Hello-World examples: webhook-config: value: content_type: json insecure_ssl: '0' secret: '********' url: https://example.com/webhook hook-delivery-items: value: - id: 12345678 guid: 0b989ba4-242f-11e5-81e1-c7b6966d2516 delivered_at: '2019-06-03T00:57:16Z' redelivery: false duration: 0.27 status: OK status_code: 200 event: issues action: opened installation_id: 123 repository_id: 456 throttled_at: '2019-06-03T00:57:16Z' - id: 123456789 guid: 0b989ba4-242f-11e5-81e1-c7b6966d2516 delivered_at: '2019-06-04T00:57:16Z' redelivery: true duration: 0.28 status: OK status_code: 200 event: issues action: opened installation_id: 123 repository_id: 456 throttled_at: '2019-06-03T00:57:16Z' hook-delivery: value: id: 12345678 guid: 0b989ba4-242f-11e5-81e1-c7b6966d2516 delivered_at: '2019-06-03T00:57:16Z' redelivery: false duration: 0.27 status: OK status_code: 200 event: issues action: opened installation_id: 123 repository_id: 456 url: https://www.example.com throttled_at: '2019-06-03T00:57:16Z' request: headers: X-GitHub-Delivery: 0b989ba4-242f-11e5-81e1-c7b6966d2516 X-Hub-Signature-256: sha256=6dcb09b5b57875f334f61aebed695e2e4193db5e Accept: '*/*' X-GitHub-Hook-ID: '42' User-Agent: GitHub-Hookshot/b8c71d8 X-GitHub-Event: issues X-GitHub-Hook-Installation-Target-ID: '123' X-GitHub-Hook-Installation-Target-Type: repository content-type: application/json X-Hub-Signature: sha1=a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d payload: action: opened issue: body: foo repository: id: 123 response: headers: Content-Type: text/html;charset=utf-8 payload: ok hook-items: value: - type: Repository id: 12345678 name: web active: true events: - push - pull_request config: content_type: json insecure_ssl: '0' url: https://example.com/webhook updated_at: '2019-06-03T00:57:16Z' created_at: '2019-06-03T00:57:16Z' url: https://api.github.com/repos/octocat/Hello-World/hooks/12345678 test_url: https://api.github.com/repos/octocat/Hello-World/hooks/12345678/test ping_url: |- https://api.github.com/repos/octocat/Hello-World/hooks/12345678/pings deliveries_url: |- https://api.github.com/repos/octocat/Hello-World/hooks/12345678/deliveries last_response: code: 1 status: unused message: '' hook: value: type: Repository id: 12345678 name: web active: true events: - push - pull_request config: content_type: json insecure_ssl: '0' url: https://example.com/webhook updated_at: '2019-06-03T00:57:16Z' created_at: '2019-06-03T00:57:16Z' url: https://api.github.com/repos/octocat/Hello-World/hooks/12345678 test_url: https://api.github.com/repos/octocat/Hello-World/hooks/12345678/test ping_url: https://api.github.com/repos/octocat/Hello-World/hooks/12345678/pings deliveries_url: |- https://api.github.com/repos/octocat/Hello-World/hooks/12345678/deliveries last_response: code: 1 status: unused message: '' repository-pre-receive-hook-items: value: - id: 42 name: Check Commits enforcement: disabled configuration_url: https://github.example.com/api/v3/orgs/octocat/pre-receive-hooks/42 repository-pre-receive-hook: value: id: 42 name: Check Commits enforcement: disabled configuration_url: https://github.example.com/api/v3/orgs/octocat/pre-receive-hooks/42 repository-pre-receive-hook-2: value: id: 42 name: Check Commits enforcement: enabled configuration_url: |- https://github.example.com/api/v3/repos/octocat/hello-world/pre-receive-hooks/42 parameters: 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 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 direction: name: direction description: The direction to sort the results by. in: query required: false schema: type: string enum: - asc - desc default: desc pre-receive-hook-id: name: pre_receive_hook_id description: The unique identifier of the pre-receive hook. in: path required: true schema: type: integer cursor: name: cursor description: |- Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. in: query required: false schema: type: string delivery-id: name: delivery_id in: path required: true schema: type: integer owner: name: owner description: The account owner of the repository. The name is not case sensitive. in: path required: true schema: type: string repo: name: repo description: |- The name of the repository without the `.git` extension. The name is not case sensitive. in: path required: true schema: type: string headers: link: example: |- ; rel="next", ; rel="last" schema: type: string responses: not_found: description: Resource not found content: application/json: schema: $ref: '#/components/schemas/basic-error' bad_request: description: Bad Request content: application/json: schema: $ref: '#/components/schemas/basic-error' application/scim+json: schema: $ref: '#/components/schemas/scim-error' validation_failed: description: Validation failed, or the endpoint has been spammed. content: application/json: schema: $ref: '#/components/schemas/validation-error' accepted: description: Accepted content: application/json: schema: type: object examples: default: value: {} forbidden: description: Forbidden content: application/json: schema: $ref: '#/components/schemas/basic-error' securitySchemes: bearerHttpAuthentication: description: Bearer Token type: http scheme: Bearer