Skip to content

Update a webhook configuration for an organization

PATCH
/orgs/{org}/hooks/{hook_id}/config

Updates the webhook configuration for an organization. To update more information about the webhook, including the active state and events, use “Update an organization webhook .”

You must be an organization owner to use this endpoint.

OAuth app tokens and personal access tokens (classic) need admin:org_hook scope. OAuth apps cannot list, view, or edit webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps.

API method documentation

org
required
string

The organization name. The name is not case sensitive.

hook_id
required
integer

The unique identifier of the hook. You can find this value in the X-GitHub-Hook-ID header of a webhook delivery.

Media type application/json
object
url

The URL to which the payloads will be delivered.

string format: uri
content_type

The media type used to serialize the payloads. Supported values include json and form. The default is form.

string
secret

If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.

string
insecure_ssl
One of:

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.

string
Examples
Example default

Update an existing webhook

{
"url": "http://example.com/webhook",
"content_type": "json",
"insecure_ssl": "0",
"secret": "********"
}

Response

Media type application/json
Webhook Configuration

Configuration object of the webhook

object
url

The URL to which the payloads will be delivered.

string format: uri
content_type

The media type used to serialize the payloads. Supported values include json and form. The default is form.

string
secret

If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.

string
insecure_ssl
One of:

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.

string
Examples
Example default
{
"content_type": "json",
"insecure_ssl": "0",
"secret": "********",
"url": "https://example.com/webhook"
}