Sample - GitHub REST API
PATCH/orgs/{org}/hooks/{hook_id}/config

Update an organization webhook configuration

Updates the delivery configuration for an organization webhook. Supply only the configuration fields you want to change, including url, content_type, secret, or insecure_ssl. You must be an organization owner and use a token with the required webhook-management scope.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

2 parameters · 4 body fields
orgstringrequired
The organization name; matching is not case sensitive.
hook_idintegerrequired
The unique identifier of the webhook, available from the `X-GitHub-Hook-ID` header of a webhook delivery.

Optional webhook delivery configuration fields; send only the settings you want to update.

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 `url`; use `0` to verify the certificate or `1` to disable verification. Defaults to `0` when omitted.

1 status code
200Returns the updated webhook configuration, including its delivery URL, content type, secret setting, and SSL verification 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

You must be an organization owner and use an OAuth app token or classic personal access token with the admin:org_hook scope. If provided, url must use URI format, content_type must be json or form, and insecure_ssl must use a supported value such as 0 or 1.