PATCH
/repos/{owner}/{repo}/hooks/{hook_id}/configUpdate a repository webhook configuration
Updates the configuration for a webhook attached to a repository. Supply any configuration fields you want to change, including the delivery url, payload content_type, signing secret, or insecure_ssl setting. Use the repository webhook update operation to change the hook's active state or subscribed events.
- RetriesRetries up to 2×, 500ms backoff, 30s timeout.
ownerstringrequired
The account owner of the repository; the name is not case sensitive.
repostringrequired
The repository name without the `.git` extension; the name is not case sensitive.
hook_idintegerrequired
The unique identifier of the webhook, available in the `X-GitHub-Hook-ID` header of a webhook delivery.
Webhook configuration fields to update. Omit fields that you do not want to change.
urlstringoptional
The URL to which the payloads will be delivered.
content_typestringoptional
The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`.
secretstringoptional
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/webhooks/event-payloads/#delivery-headers).
insecure_sslstringoptional
Controls SSL certificate verification for the delivery URL. Use `0` to verify the certificate or `1` to disable verification; defaults to `0` when omitted.
200Returns the updated webhook configuration, including its delivery `url`, payload `content_type`, signing `secret`, and `insecure_ssl` setting.
urlstringoptional
The URL to which the payloads will be delivered.
content_typestringoptional
The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`.
secretstringoptional
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/webhooks/event-payloads/#delivery-headers).
insecure_sslstringoptional
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.**
Error handling
owner, repo, and hook_id must identify an existing repository webhook. If provided, url must use URI format, content_type should use json or form, and insecure_ssl must use 0 or 1; insecure_ssl defaults to 0 when omitted.