Update a repository webhook
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/reference/repos#update-a-webhook-configuration-for-a-repository)."
/repos/{owner}/{repo}/hooks/{hook_id}- Source
github-v3-rest.json- Revision
f5f067c1e6f6- Active snapshot
85e53e3d0d65
Request
Path Parameters
- owner stringrequired
- repo stringrequired
- hook_id integerrequired
Body Params
requiredDetermines if notifications are sent when the webhook is triggered. Set to `true` to send notifications.
Determines a list of events to be added to the list of events that the Hook triggers for.
config objectoptionalKey/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/[email protected]/rest/reference/repos#create-hook-config-params).
Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/[email protected]/rest/reference/repos#create-hook-config-params).
Example: "[email protected]"
The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`.
Example: "json"
Example: "The Serious Room"
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/[email protected]/webhooks/event-payloads/#delivery-headers).
Example: "********"
The URL to which the payloads will be delivered.
Example: https://example.com/webhook
Determines what [events](https://docs.github.com/[email protected]/webhooks/event-payloads) the hook is triggered for. This replaces the entire array of events.
Determines a list of events to be removed from the list of events that the Hook triggers for.
Responses
Response
Determines whether the hook is actually triggered on pushes.
Example: true
config objectrequired
The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`.
Example: "json"
Example: "sha256"
Example: "[email protected]"
Example: "foo"
Example: "roomer"
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/[email protected]/webhooks/event-payloads/#delivery-headers).
Example: "********"
Example: "foo"
Example: "abc"
The URL to which the payloads will be delivered.
Example: https://example.com/webhook
Example: 2011-09-06T17:26:27Z
Determines what events the hook is triggered for. Default: ['push'].
[
"push",
"pull_request"
]Unique identifier of the webhook.
Example: 42
last_response Hook Response objectrequired
The name of a valid service, use 'web' for a webhook.
Example: web
Example: https://api.github.com/repos/octocat/Hello-World/hooks/1/pings
Example: https://api.github.com/repos/octocat/Hello-World/hooks/1/test
Example: 2011-09-06T20:39:23Z
Example: https://api.github.com/repos/octocat/Hello-World/hooks/1
Resource not found
Validation failed